Skip to content

Commit 22dab44

Browse files
authored
Fix GLSL mix(T,T,bool) SPIR-V output (shader-slang#6006)
1 parent f0431b8 commit 22dab44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/slang/glsl.meta.slang

+2-2
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ public T mix(T x, T y, bool a)
493493
{
494494
case glsl: __intrinsic_asm "mix";
495495
case spirv: return spirv_asm {
496-
result:$$T = OpSelect $a $x $y
496+
result:$$T = OpSelect $a $y $x
497497
};
498498
default:
499499
return (a ? y : x);
@@ -510,7 +510,7 @@ public vector<T, N> mix(vector<T, N> x, vector<T, N> y, vector<bool, N> a)
510510
{
511511
case glsl: __intrinsic_asm "mix";
512512
case spirv: return spirv_asm {
513-
result:$$vector<T,N> = OpSelect $a $x $y
513+
result:$$vector<T,N> = OpSelect $a $y $x
514514
};
515515
default:
516516
vector<T, N> result;

0 commit comments

Comments
 (0)