nir/uub: properly limit float support to 32bit
Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
(cherry picked from commit 0b366a7ab2
)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
This commit is contained in:

committed by
Dylan Baker

parent
0f1abde4cc
commit
17da2666c7
@@ -824,7 +824,7 @@
|
||||
"description": "nir/uub: properly limit float support to 32bit",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
@@ -1720,8 +1720,6 @@ get_alu_uub(struct analysis_state *state, struct uub_query q, uint32_t *result,
|
||||
case nir_op_b32csel:
|
||||
case nir_op_ubfe:
|
||||
case nir_op_bfm:
|
||||
case nir_op_fmul:
|
||||
case nir_op_fmulz:
|
||||
case nir_op_extract_u8:
|
||||
case nir_op_extract_i8:
|
||||
case nir_op_extract_u16:
|
||||
@@ -1734,12 +1732,19 @@ get_alu_uub(struct analysis_state *state, struct uub_query q, uint32_t *result,
|
||||
case nir_op_u2u8:
|
||||
case nir_op_u2u16:
|
||||
case nir_op_u2u32:
|
||||
case nir_op_f2u32:
|
||||
if (nir_scalar_chase_alu_src(q.scalar, 0).def->bit_size > 32) {
|
||||
/* If src is >32 bits, return max */
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case nir_op_fmul:
|
||||
case nir_op_fmulz:
|
||||
case nir_op_f2u32:
|
||||
if (nir_scalar_chase_alu_src(q.scalar, 0).def->bit_size != 32) {
|
||||
/* Only 32bit floats support for now, return max */
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user