Skip to content

Commit

Permalink
Fix GLSL mix(T,T,bool) SPIR-V output (#6006)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusikkala authored Jan 5, 2025
1 parent f0431b8 commit 22dab44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/slang/glsl.meta.slang
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public T mix(T x, T y, bool a)
{
case glsl: __intrinsic_asm "mix";
case spirv: return spirv_asm {
result:$$T = OpSelect $a $x $y
result:$$T = OpSelect $a $y $x
};
default:
return (a ? y : x);
Expand All @@ -510,7 +510,7 @@ public vector<T, N> mix(vector<T, N> x, vector<T, N> y, vector<bool, N> a)
{
case glsl: __intrinsic_asm "mix";
case spirv: return spirv_asm {
result:$$vector<T,N> = OpSelect $a $x $y
result:$$vector<T,N> = OpSelect $a $y $x
};
default:
vector<T, N> result;
Expand Down

0 comments on commit 22dab44

Please sign in to comment.