Spirv_intrinsics: Add support of type specifier to spirv_type

Previously, spirv_type doesn't accept type specifier as its parameter.
With this change, we can input non-array type specifier. This is because
some SPIR-V type definition intructions often need to reference other
SPIR-V types as its source operands. We add the support to facilitate
such usage.
This commit is contained in:
Rex Xu 2023-06-24 11:23:45 +08:00 committed by arcady-lunarg
parent eaa7057768
commit 051f18c0cc
10 changed files with 1468 additions and 1359 deletions

View file

@ -4439,6 +4439,9 @@ spirv_type_parameter
: constant_expression {
$$ = parseContext.makeSpirvTypeParameters($1->getLoc(), $1->getAsConstantUnion());
}
| type_specifier_nonarray {
$$ = parseContext.makeSpirvTypeParameters($1.loc, $1);
}
spirv_instruction_qualifier
: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN {