mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 09:20:13 +01:00
nir: Initialize workgroup_size in builder_init_simple_shader
It can't be 0 in Vulkan. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24158>
This commit is contained in:
parent
ce25668d02
commit
d0f0afc6a4
1 changed files with 7 additions and 0 deletions
|
|
@ -50,6 +50,13 @@ nir_builder_init_simple_shader(gl_shader_stage stage,
|
|||
/* Simple shaders are typically internal, e.g. blit shaders */
|
||||
b.shader->info.internal = true;
|
||||
|
||||
/* Compute shaders on Vulkan require some workgroup size initialized, pick
|
||||
* a safe default value. This relies on merging workgroups for efficiency.
|
||||
*/
|
||||
b.shader->info.workgroup_size[0] = 1;
|
||||
b.shader->info.workgroup_size[1] = 1;
|
||||
b.shader->info.workgroup_size[2] = 1;
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue