mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
spirv: Don't leak GS initialization to other stages
The stage specific fields of shader_info are in an union. We've likely been lucky that this value was either overwritten or ignored by other stages. The recent change in shader_info layout in commit84a1a2578d("compiler: pack shader_info from 160 bytes to 96 bytes") made this issue visible. Fixes:cf2257069c("nir/spirv: Set a default number of invocations for geometry shaders") Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit087ecd9ca5)
This commit is contained in:
parent
2b89e68a2e
commit
6e98a923cb
1 changed files with 2 additions and 1 deletions
|
|
@ -4647,7 +4647,8 @@ spirv_to_nir(const uint32_t *words, size_t word_count,
|
|||
}
|
||||
|
||||
/* Set shader info defaults */
|
||||
b->shader->info.gs.invocations = 1;
|
||||
if (stage == MESA_SHADER_GEOMETRY)
|
||||
b->shader->info.gs.invocations = 1;
|
||||
|
||||
b->specializations = spec;
|
||||
b->num_specializations = num_spec;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue