Skip to content

Conversation

DerSchmale
Copy link
Contributor

@DerSchmale DerSchmale commented Oct 2, 2025

Description
When using GLES as a backend, shaders would not recompile when changing push constants because they were not included in the program cache key. They are now, but the way the key field is generated could be improved.

Testing
Using a simple shader choosing between two colours depending on an override constant.

Squash or Rebase?

Squash

@DerSchmale DerSchmale marked this pull request as ready for review October 2, 2025 13:06
@jimblandy jimblandy self-assigned this Oct 8, 2025
Copy link
Member

@jimblandy jimblandy left a comment

Choose a reason for hiding this comment

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

@Wumpf also has a question about this, but assuming that's addressed:

I understand that f64 doesn't implement hashing, but I think we should be able to do something a little better than formatting them as a string. For example, simply reinterpreting them as bytes and saving a Vec would be better.

@Wumpf Wumpf changed the title Cause shader recompilation when changing push constants in GLES Cause shader recompilation when changing shader constants in GLES Oct 8, 2025
@Wumpf
Copy link
Member

Wumpf commented Oct 8, 2025

resolved: title was misleading, this not about push constants which shouldn't be part of shader compilation, but rather about shader constants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants