spirv: Track when a shader has a cooperative matrix

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23825>
This commit is contained in:
Ian Romanick 2023-07-26 14:42:59 -07:00 committed by Marge Bot
parent b98f87612b
commit 03c1e67b6c
2 changed files with 8 additions and 0 deletions

View file

@ -524,6 +524,12 @@ typedef struct shader_info {
*/
bool has_variable_shared_mem:1;
/**
* If the shader has any use of a cooperative matrix. From
* SPV_KHR_cooperative_matrix.
*/
bool has_cooperative_matrix:1;
/**
* pointer size is:
* AddressingModelLogical: 0 (default)

View file

@ -29,6 +29,8 @@ vtn_handle_cooperative_type(struct vtn_builder *b, struct vtn_value *val,
{
vtn_assert(opcode == SpvOpTypeCooperativeMatrixKHR);
b->shader->info.cs.has_cooperative_matrix = true;
struct vtn_type *component_type = vtn_get_type(b, w[2]);
const mesa_scope scope = vtn_translate_scope(b, vtn_constant_uint(b, w[3]));