mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
nir: Fix constant evaluation of bfm.
NIR's bfm, like Intel/AMD's hardware instructions and GLSL IR's ir_binop_bfm takes <bits> as src0 and <offset> as src1. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
parent
7dc2e5f940
commit
92f1773869
1 changed files with 1 additions and 1 deletions
|
|
@ -512,7 +512,7 @@ binop_horiz("pack_half_2x16_split", 1, tuint, 1, tfloat, 1, tfloat,
|
|||
"pack_half_1x16(src0.x) | (pack_half_1x16(src1.x) << 16)")
|
||||
|
||||
binop_convert("bfm", tuint, tint, "", """
|
||||
int offset = src0, bits = src1;
|
||||
int bits = src0, offset = src1;
|
||||
if (offset < 0 || bits < 0 || offset + bits > 32)
|
||||
dst = 0; /* undefined per the spec */
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue