diff options
Diffstat (limited to 'src/glsl/nir')
-rw-r--r-- | src/glsl/nir/nir_opcodes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/nir/nir_opcodes.py b/src/glsl/nir/nir_opcodes.py index 3c0f1da94af..729f695cf9c 100644 --- a/src/glsl/nir/nir_opcodes.py +++ b/src/glsl/nir/nir_opcodes.py @@ -563,7 +563,7 @@ opcode("bcsel", 0, tunsigned, [0, 0, 0], [tbool, tunsigned, tunsigned], "", "src0 ? src1 : src2") triop("bfi", tunsigned, """ -unsigned mask = src0, insert = src1 & mask, base = src2; +unsigned mask = src0, insert = src1, base = src2; if (mask == 0) { dst = base; } else { @@ -572,7 +572,7 @@ if (mask == 0) { tmp >>= 1; insert <<= 1; } - dst = (base & ~mask) | insert; + dst = (base & ~mask) | (insert & mask); } """) |