Skip to content

Conversation

@mbechard
Copy link

Fixes #9086

Increase the initial max ID to a much larger value. In optimization modes where the CompactID pass isn't already run, manually apply that pass if the ID bound of the final SPIRV is higher than kDefaultMaxIdBound.

This gives the optimizer more room to maneuver,
and in low-optimization cases helps avoids invalid SPIRV if the optimization result ended up with IDs beyond kDefaultMaxIdBound.

Fixes shader-slang#9086

Increase the initial max ID to a much larger value.
In optimization modes where the CompactID pass isn't
already run, manually apply that pass if the ID bound
of the final SPIRV is higher than kDefaultMaxIdBound.

This gives the optimizer more room to maneuver,
and in low-optimization cases helps avoids invalid
SPIRV if the optimization result ended up with IDs
beyond kDefaultMaxIdBound.
@mbechard mbechard requested a review from a team as a code owner November 21, 2025 21:37
@CLAassistant
Copy link

CLAassistant commented Nov 21, 2025

CLA assistant check
All committers have signed the CLA.

@mbechard
Copy link
Author

A possible middle ground for this would be to make the max_id setting a compiler option that defaults back to what the old default was.

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.

Suggested tweaks for SPIR-V ID limits

2 participants