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 GLSL mix(T,T,bool) SPIR-V output #6006

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

juliusikkala
Copy link
Contributor

@juliusikkala juliusikkala commented Jan 5, 2025

mix(a,b,t) should be a when t=0 and b t=1. The cases where t is bool have special overloads in glsl.meta.slang, which use the OpSelect instruction. The parameters for OpSelect were flipped, so mix(a,b,true) returned a instead of b. This PR fixes that.

@juliusikkala juliusikkala requested a review from a team as a code owner January 5, 2025 17:01
Copy link
Collaborator

@csyonghe csyonghe left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@csyonghe csyonghe added the pr: non-breaking PRs without breaking changes label Jan 5, 2025
@csyonghe csyonghe merged commit 22dab44 into shader-slang:master Jan 5, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants