Skip to content

Conversation

@brianreavis
Copy link
Contributor

@brianreavis brianreavis commented Feb 17, 2025

Objective

This fixes NonMesh draw commands not receiving render-world entities since

This unbreaks item queries for queued non-mesh entities:

struct MyDrawCommand {
    type ItemQuery = Read<DynamicUniformIndex<SomeUniform>>;
    // ...
}

Solution

Pass render entity to NonMesh draw commands instead of Entity::PLACEHOLDER. This PR also introduces sorting of the NonMesh bin keys like other types, which I assume is the intended behavior. @pcwalton

Testing

  • Tested on a local project that extensively uses NonMesh items.

…nd sort by key like other phase items

Unbreaks draw command item queries
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen P-Regression Functionality that used to work but no longer does. Add a test for this! labels Feb 23, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Feb 23, 2025
@alice-i-cecile alice-i-cecile added the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label Feb 23, 2025
@IceSentry IceSentry added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Mar 28, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 30, 2025
Merged via the queue into bevyengine:main with commit 8ece2ee Mar 30, 2025
36 checks passed
mockersf pushed a commit that referenced this pull request Mar 30, 2025
# Objective

This fixes `NonMesh` draw commands not receiving render-world entities
since
- #17698

This unbreaks item queries for queued non-mesh entities:

```rust
struct MyDrawCommand {
    type ItemQuery = Read<DynamicUniformIndex<SomeUniform>>;
    // ...
}
```

### Solution

Pass render entity to `NonMesh` draw commands instead of
`Entity::PLACEHOLDER`. This PR also introduces sorting of the `NonMesh`
bin keys like other types, which I assume is the intended behavior.
@pcwalton

## Testing

- Tested on a local project that extensively uses `NonMesh` items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior P-Regression Functionality that used to work but no longer does. Add a test for this! S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants