spirv: Only set workgroup_size_variable on compute-like stages
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

This should be ignored on non-compute stages but AGX changes 3D shaders
to compute without setting the workgroup size and blows up if it claims
variable workgroups.  The safest thing is to only set it from
spirv_to_nir for stages that actually have workgroups.

Fixes: 6d9f563960 ("spirv: Assume variable workgroup size unless it's set")
LoLed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38555>
This commit is contained in:
Faith Ekstrand 2025-11-20 10:26:47 -05:00 committed by Marge Bot
parent 0f2dcf656a
commit 17b9bc2770

View file

@ -7302,7 +7302,8 @@ spirv_to_nir(const uint32_t *words, size_t word_count,
b->shader = nir_shader_create(b, stage, nir_options);
b->shader->info.float_controls_execution_mode = options->float_controls_execution_mode;
b->shader->info.workgroup_size_variable = true;
if (mesa_shader_stage_uses_workgroup(stage))
b->shader->info.workgroup_size_variable = true;
b->shader->info.cs.shader_index = options->shader_index;
b->shader->has_debug_info = options->debug_info;
_mesa_blake3_compute(words, word_count * sizeof(uint32_t), b->shader->info.source_blake3);