summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-04-22 16:09:56 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-04-23 14:58:01 -0700
commit7e2684ce014c3f7813c4f0b2d8424fd588606d5f (patch)
treec587ebed8a2974fffe8530224d88152b5e849248 /src/compiler/spirv
parent7b66d584a3c685bf70893fe5cda2432cf4fbfdfb (diff)
spirv: Handle SpvOpDecorateId
This operation decorate with an Id instead of a Literal or String. It is used by HlslCounterBufferGOOGLE (provided by SPV_GOOGLE_hlsl_functionality1). Even if we don't do anything with that decoration, we must be able to parse SPIR-V that uses it. Fixes: 891886da2f9 "spirv: Add no-op support for VK_GOOGLE_hlsl_functionality1" Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/spirv')
-rw-r--r--src/compiler/spirv/spirv_to_nir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 103efad22cc..e876562cb48 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -500,6 +500,7 @@ vtn_handle_decoration(struct vtn_builder *b, SpvOp opcode,
break;
case SpvOpDecorate:
+ case SpvOpDecorateId:
case SpvOpMemberDecorate:
case SpvOpDecorateStringGOOGLE:
case SpvOpMemberDecorateStringGOOGLE:
@@ -510,6 +511,7 @@ vtn_handle_decoration(struct vtn_builder *b, SpvOp opcode,
struct vtn_decoration *dec = rzalloc(b, struct vtn_decoration);
switch (opcode) {
case SpvOpDecorate:
+ case SpvOpDecorateId:
case SpvOpDecorateStringGOOGLE:
dec->scope = VTN_DEC_DECORATION;
break;
@@ -3812,6 +3814,7 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
case SpvOpExecutionModeId:
case SpvOpDecorationGroup:
case SpvOpDecorate:
+ case SpvOpDecorateId:
case SpvOpMemberDecorate:
case SpvOpGroupDecorate:
case SpvOpGroupMemberDecorate:
@@ -4021,6 +4024,7 @@ vtn_handle_variable_or_type_instruction(struct vtn_builder *b, SpvOp opcode,
case SpvOpMemberName:
case SpvOpDecorationGroup:
case SpvOpDecorate:
+ case SpvOpDecorateId:
case SpvOpMemberDecorate:
case SpvOpGroupDecorate:
case SpvOpGroupMemberDecorate: