nir: Fix unsigned upper bound of local_invocation_index for non-CS stages.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>
This commit is contained in:
parent
132171dc4e
commit
084863bb5d
|
@ -1275,7 +1275,8 @@ nir_unsigned_upper_bound(nir_shader *shader, struct hash_table *range_ht,
|
|||
nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(scalar.def->parent_instr);
|
||||
switch (intrin->intrinsic) {
|
||||
case nir_intrinsic_load_local_invocation_index:
|
||||
if (shader->info.cs.local_size_variable) {
|
||||
if (shader->info.stage != MESA_SHADER_COMPUTE ||
|
||||
shader->info.cs.local_size_variable) {
|
||||
res = config->max_work_group_invocations - 1;
|
||||
} else {
|
||||
res = (shader->info.cs.local_size[0] *
|
||||
|
|
Loading…
Reference in New Issue