mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 11:30:06 +00:00
9caca7a17b
The containsPhysicalStorageBufferOrArray function now handles struct types correctly, checking their contents recursively for buffer reference types. As a result, OpVariables containing structs that have members that are buffer references now have the appropriate AliasedPointer or RestrictPointer decoration as per the spec. Fixes #3188
109 lines
5.8 KiB
Plaintext
109 lines
5.8 KiB
Plaintext
spv.bufferhandle8.frag
|
|
// Module Version 10000
|
|
// Generated by (magic number): 8000b
|
|
// Id's are bound by 39
|
|
|
|
Capability Shader
|
|
Capability PhysicalStorageBufferAddressesEXT
|
|
Extension "SPV_KHR_physical_storage_buffer"
|
|
Extension "SPV_KHR_storage_buffer_storage_class"
|
|
1: ExtInstImport "GLSL.std.450"
|
|
MemoryModel PhysicalStorageBuffer64EXT GLSL450
|
|
EntryPoint Fragment 4 "main"
|
|
ExecutionMode 4 OriginUpperLeft
|
|
Source GLSL 450
|
|
SourceExtension "GL_EXT_buffer_reference"
|
|
Name 4 "main"
|
|
Name 8 "Blah"
|
|
MemberName 8(Blah) 0 "t1"
|
|
MemberName 8(Blah) 1 "t2"
|
|
Name 10 "T1"
|
|
MemberName 10(T1) 0 "x"
|
|
Name 11 "T2"
|
|
MemberName 11(T2) 0 "x"
|
|
Name 13 "x"
|
|
Name 14 "Blah"
|
|
MemberName 14(Blah) 0 "t1"
|
|
MemberName 14(Blah) 1 "t2"
|
|
Name 16 "T3"
|
|
MemberName 16(T3) 0 "Bindings"
|
|
Name 18 "t3"
|
|
Name 35 "t2"
|
|
MemberName 35(t2) 0 "f"
|
|
MemberName 35(t2) 1 "g"
|
|
Name 36 "blockType"
|
|
MemberName 36(blockType) 0 "a"
|
|
MemberName 36(blockType) 1 "b"
|
|
MemberName 36(blockType) 2 "c"
|
|
MemberName 36(blockType) 3 "d"
|
|
MemberName 36(blockType) 4 "e"
|
|
Name 38 "t"
|
|
MemberDecorate 10(T1) 0 Offset 0
|
|
Decorate 10(T1) Block
|
|
MemberDecorate 11(T2) 0 Offset 0
|
|
Decorate 11(T2) Block
|
|
MemberDecorate 14(Blah) 0 Offset 0
|
|
MemberDecorate 14(Blah) 1 Offset 8
|
|
Decorate 15 ArrayStride 16
|
|
MemberDecorate 16(T3) 0 Offset 0
|
|
Decorate 16(T3) Block
|
|
Decorate 18(t3) DescriptorSet 0
|
|
Decorate 18(t3) Binding 0
|
|
MemberDecorate 35(t2) 0 Offset 0
|
|
MemberDecorate 35(t2) 1 Offset 8
|
|
Decorate 35(t2) Block
|
|
MemberDecorate 36(blockType) 0 Offset 0
|
|
MemberDecorate 36(blockType) 1 Offset 4
|
|
MemberDecorate 36(blockType) 2 Offset 8
|
|
MemberDecorate 36(blockType) 3 Offset 12
|
|
MemberDecorate 36(blockType) 4 Offset 16
|
|
Decorate 36(blockType) Block
|
|
Decorate 38(t) DescriptorSet 0
|
|
Decorate 38(t) Binding 0
|
|
Decorate 13(x) DecorationAliasedPointerEXT
|
|
2: TypeVoid
|
|
3: TypeFunction 2
|
|
TypeForwardPointer 6 PhysicalStorageBufferEXT
|
|
TypeForwardPointer 7 PhysicalStorageBufferEXT
|
|
8(Blah): TypeStruct 6 7
|
|
9: TypeInt 32 1
|
|
10(T1): TypeStruct 9(int)
|
|
6: TypePointer PhysicalStorageBufferEXT 10(T1)
|
|
11(T2): TypeStruct 9(int)
|
|
7: TypePointer PhysicalStorageBufferEXT 11(T2)
|
|
12: TypePointer Function 8(Blah)
|
|
14(Blah): TypeStruct 6(ptr) 7(ptr)
|
|
15: TypeRuntimeArray 14(Blah)
|
|
16(T3): TypeStruct 15
|
|
17: TypePointer StorageBuffer 16(T3)
|
|
18(t3): 17(ptr) Variable StorageBuffer
|
|
19: 9(int) Constant 0
|
|
20: 9(int) Constant 2
|
|
21: TypePointer StorageBuffer 14(Blah)
|
|
25: TypePointer Function 6(ptr)
|
|
28: 9(int) Constant 1
|
|
29: TypePointer Function 7(ptr)
|
|
TypeForwardPointer 34 PhysicalStorageBufferEXT
|
|
35(t2): TypeStruct 34 34
|
|
36(blockType): TypeStruct 9(int) 9(int) 9(int) 9(int) 9(int)
|
|
34: TypePointer PhysicalStorageBufferEXT 36(blockType)
|
|
37: TypePointer StorageBuffer 35(t2)
|
|
38(t): 37(ptr) Variable StorageBuffer
|
|
4(main): 2 Function None 3
|
|
5: Label
|
|
13(x): 12(ptr) Variable Function
|
|
22: 21(ptr) AccessChain 18(t3) 19 20
|
|
23: 14(Blah) Load 22
|
|
24: 6(ptr) CompositeExtract 23 0
|
|
26: 25(ptr) AccessChain 13(x) 19
|
|
Store 26 24
|
|
27: 7(ptr) CompositeExtract 23 1
|
|
30: 29(ptr) AccessChain 13(x) 28
|
|
Store 30 27
|
|
31: 21(ptr) AccessChain 18(t3) 19 28
|
|
32: 14(Blah) Load 31
|
|
33: 21(ptr) AccessChain 18(t3) 19 19
|
|
Store 33 32
|
|
Return
|
|
FunctionEnd
|