Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
gl_shader: also checksum engine constants to invalidate the shader on cvar change #211
That's an issue I'm facing since a long time, with problems appearing randomly… Last time I got it was when I was working on #193 and this time it was fully reproducible.
The cached binary shader is expected to be invalidated (then rebuilt) when the content of the shader source change. This is done by computing a checksum at shader compile time and comparing it lately.
Unfortunately, the checksum operation was not checksuming against the header that defines constants like
This fixes the issue by concatenating the constant header to the text that is sent to the checksum operation.