Commit baf85bf3 authored by Caio Oliveira's avatar Caio Oliveira
Browse files

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: 891886da

 "spirv: Add no-op support for VK_GOOGLE_hlsl_functionality1"
Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
parent 29ad2a20
Pipeline #32701 passed with stages
in 35 minutes and 29 seconds
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment