Module: Mesa Branch: staging/22.2 Commit: b01498700c17b8633086c26ead077e8e6a1e58d1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b01498700c17b8633086c26ead077e8e6a1e58d1
Author: Mike Blumenkrantz <[email protected]> Date: Tue Aug 9 17:58:01 2022 -0400 nir/validate: clamp unsized tex dests to 32bit this is the "default" size that's expected cc: mesa-stable Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17874> (cherry picked from commit b7eda568a4acf8b3d551e22b6ef72689663f9550) --- .pick_status.json | 2 +- src/compiler/nir/nir_validate.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 9c1a34b9c26..1eddf7692d2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -400,7 +400,7 @@ "description": "nir/validate: clamp unsized tex dests to 32bit", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index 3216e6ca066..eca05e0eab3 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -938,8 +938,9 @@ validate_tex_instr(nir_tex_instr *instr, validate_state *state) validate_dest(&instr->dest, state, 0, nir_tex_instr_dest_size(instr)); + unsigned bit_size = nir_alu_type_get_type_size(instr->dest_type); validate_assert(state, - nir_alu_type_get_type_size(instr->dest_type) == + (bit_size ? bit_size : 32) == nir_dest_bit_size(instr->dest)); }
