spirv: Handle the SubgroupSize execution mode
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12959>
This commit is contained in:
parent
e5dc900226
commit
518693c3ec
|
@ -431,6 +431,11 @@ typedef struct shader_info {
|
|||
*/
|
||||
enum gl_derivative_group derivative_group:2;
|
||||
|
||||
/**
|
||||
* Explicit subgroup size if set by the shader, otherwise 0.
|
||||
*/
|
||||
unsigned subgroup_size;
|
||||
|
||||
/**
|
||||
* pointer size is:
|
||||
* AddressingModelLogical: 0 (default)
|
||||
|
|
|
@ -5137,6 +5137,11 @@ vtn_handle_execution_mode(struct vtn_builder *b, struct vtn_value *entry_point,
|
|||
/* Handled later by vtn_handle_execution_mode_id(). */
|
||||
break;
|
||||
|
||||
case SpvExecutionModeSubgroupSize:
|
||||
vtn_assert(b->shader->info.stage == MESA_SHADER_KERNEL);
|
||||
b->shader->info.cs.subgroup_size = mode->operands[0];
|
||||
break;
|
||||
|
||||
case SpvExecutionModeSubgroupUniformControlFlowKHR:
|
||||
/* There's no corresponding SPIR-V capability, so check here. */
|
||||
vtn_fail_if(!b->options->caps.subgroup_uniform_control_flow,
|
||||
|
|
Loading…
Reference in New Issue