mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 18:40:13 +01:00
spirv: Only set workgroup_size_variable on compute-like stages
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:
parent
0f2dcf656a
commit
17b9bc2770
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue