Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicated spec constant on SPIR-V reflection. #101343

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

DarioSamo
Copy link
Contributor

There's a very minor error that affects the result of the SPIR-V reflection that ends up duplicating the first specialization constant in the structure.

The code intends to use -1 as the value for indicating the spec constant was not found in the existing array. However, the if checks for > 0 instead of >= 0, so the spec constant being found in the first available slot is never a valid possibility.

This fixes any code that uses the result from the reflection from having duplicated spec constants.

@akien-mga akien-mga added this to the 4.4 milestone Jan 9, 2025
@akien-mga akien-mga merged commit 7285e89 into godotengine:master Jan 9, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release topic:rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants