Parameters of spirv_decorate_id should accept variables
spirv_decorate_id will generate OpDecorateId. The parameter list should accept variables as part of decorations. This is because OpDecorateId allows this. The spec says: All such <id> Extra Operands must be constant instructions or OpVariable instructions.
This commit is contained in:
46
Test/baseResults/spv.intrinsicsSpirvDecorateId.comp.out
Normal file
46
Test/baseResults/spv.intrinsicsSpirvDecorateId.comp.out
Normal file
@@ -0,0 +1,46 @@
|
||||
spv.intrinsicsSpirvDecorateId.comp
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 16
|
||||
|
||||
Capability Shader
|
||||
Extension "SPV_GOOGLE_hlsl_functionality1"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint GLCompute 4 "main"
|
||||
ExecutionMode 4 LocalSize 1 1 1
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_spirv_intrinsics"
|
||||
Name 4 "main"
|
||||
Name 10 "CounterBuffer"
|
||||
MemberName 10(CounterBuffer) 0 "counter"
|
||||
Name 12 "x"
|
||||
Name 13 "Uniform"
|
||||
MemberName 13(Uniform) 0 "y"
|
||||
Name 15 ""
|
||||
Decorate 9 BuiltIn WorkgroupSize
|
||||
MemberDecorate 10(CounterBuffer) 0 Offset 0
|
||||
Decorate 10(CounterBuffer) Block
|
||||
Decorate 12(x) DescriptorSet 0
|
||||
Decorate 12(x) Binding 1
|
||||
MemberDecorate 13(Uniform) 0 Offset 0
|
||||
Decorate 13(Uniform) Block
|
||||
Decorate 15 DescriptorSet 0
|
||||
Decorate 15 Binding 0
|
||||
DecorateId 15 DecorationHlslCounterBufferGOOGLE 12(x)
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 3
|
||||
8: 6(int) Constant 1
|
||||
9: 7(ivec3) ConstantComposite 8 8 8
|
||||
10(CounterBuffer): TypeStruct 6(int)
|
||||
11: TypePointer Uniform 10(CounterBuffer)
|
||||
12(x): 11(ptr) Variable Uniform
|
||||
13(Uniform): TypeStruct 6(int)
|
||||
14: TypePointer Uniform 13(Uniform)
|
||||
15: 14(ptr) Variable Uniform
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
Reference in New Issue
Block a user