Skip to content

Conversation

@tychedelia
Copy link
Member

@tychedelia tychedelia commented Mar 19, 2025

Objective

For materials that aren't being used or a visible entity doesn't have an instance of, we were unnecessarily constantly checking whether they needed specialization, saying yes (because the material had never been specialized for that entity), and failing to look up the material instance.

Solution

If an entity doesn't have an instance of the material, it can't possibly need specialization, so exit early before spending time doing the check.

Fixes #18388.

@tychedelia tychedelia added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen labels Mar 19, 2025
@tychedelia tychedelia added the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label Mar 19, 2025
@tychedelia tychedelia added this to the 0.16 milestone Mar 19, 2025
Copy link
Contributor

@JMS55 JMS55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm.

We never did cold specialization for meshlet meshes, right?

@tychedelia
Copy link
Member Author

Lgtm.

We never did cold specialization for meshlet meshes, right?

Yup, I promised to do so and then it slipped my mind. My 0.16 list is a little long right now but totally still happy to do it if there's time to get it in or right after.

@JMS55
Copy link
Contributor

JMS55 commented Mar 19, 2025

No worries. Lets do it for 0.17.

@superdump superdump added this pull request to the merge queue Mar 19, 2025
Merged via the queue into bevyengine:main with commit 8d5474a Mar 19, 2025
36 checks passed
mockersf pushed a commit that referenced this pull request Mar 19, 2025
…8410)

# Objective

For materials that aren't being used or a visible entity doesn't have an
instance of, we were unnecessarily constantly checking whether they
needed specialization, saying yes (because the material had never been
specialized for that entity), and failing to look up the material
instance.

## Solution

If an entity doesn't have an instance of the material, it can't possibly
need specialization, so exit early before spending time doing the check.

Fixes #18388.
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 S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Pipeline specialization tick not being cached, causing unnecessary re-specialization

3 participants