intel/compiler: Use gl_shader_stage_uses_workgroup() helpers

Instead of checking for MESA_SHADER_COMPUTE (and KERNEL).  Where
appropriate, also use gl_shader_stage_is_compute().

This allows most of the workgroup-related lowering to be applied to
Task and Mesh shaders.  These will be added later and "inherit" from
cs_prog_data structure.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13629>
This commit is contained in:
Caio Oliveira
2021-05-18 10:01:49 -07:00
parent c4355d3f24
commit 858424bd2e
6 changed files with 16 additions and 13 deletions

View File

@@ -1285,7 +1285,7 @@ get_subgroup_size(gl_shader_stage stage,
case BRW_SUBGROUP_SIZE_REQUIRE_8:
case BRW_SUBGROUP_SIZE_REQUIRE_16:
case BRW_SUBGROUP_SIZE_REQUIRE_32:
assert(stage == MESA_SHADER_COMPUTE);
assert(gl_shader_stage_uses_workgroup(stage));
/* These enum values are expressly chosen to be equal to the subgroup
* size that they require.
*/