ac/nir/ngg: Remove erroneous NUW addition from workgroup scan.

This may add constant -1 so naturally it can indeed cause
an unsigned wrap.

Fixes: 492d8f3778
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12204
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32338>
This commit is contained in:
Timur Kristóf 2024-11-25 22:19:28 +01:00 committed by Marge Bot
parent 96b38119ea
commit 8653abac09

View file

@ -419,7 +419,7 @@ repack_invocations_in_workgroup(nir_builder *b, nir_def **input_bool,
for (unsigned i = 0; i < num_repacks; ++i) {
nir_def *index_base_lane = nir_iadd_imm_nuw(b, wave_id, i * 16);
nir_def *num_invocartions_lane = nir_iadd_imm_nuw(b, num_waves, i * 16 - 1);
nir_def *num_invocartions_lane = nir_iadd_imm(b, num_waves, i * 16 - 1);
nir_def *wg_repacked_index_base =
nir_isub(b, nir_read_invocation(b, sum, index_base_lane), surviving_invocations_in_current_wave[i]);
results[i].num_repacked_invocations =