
SPIR-V disallows bool in interface blocks, which is emulated with uint. When loading a bool variable (through accessChainLoad()), it's converted from uint to bool if it came from an interface block. This was handled for bool and bvecN, but not for bool arrays. This change implements the conversion for bool arrays. Closes #2694
105 lines
4.8 KiB
Plaintext
105 lines
4.8 KiB
Plaintext
spv.1.4.load.bool.array.interface.block.frag
|
|
Validation failed
|
|
// Module Version 10400
|
|
// Generated by (magic number): 8000a
|
|
// Id's are bound by 64
|
|
|
|
Capability Shader
|
|
1: ExtInstImport "GLSL.std.450"
|
|
MemoryModel Logical GLSL450
|
|
EntryPoint Fragment 4 "main" 13 20 61
|
|
ExecutionMode 4 OriginUpperLeft
|
|
Source GLSL 450
|
|
Name 4 "main"
|
|
Name 11 "ssbo"
|
|
MemberName 11(ssbo) 0 "bo"
|
|
Name 13 ""
|
|
Name 18 "ub"
|
|
MemberName 18(ub) 0 "bi"
|
|
Name 20 ""
|
|
Name 61 "color"
|
|
Decorate 8 ArrayStride 4
|
|
Decorate 10 ArrayStride 12
|
|
MemberDecorate 11(ssbo) 0 Offset 0
|
|
Decorate 11(ssbo) Block
|
|
Decorate 13 DescriptorSet 0
|
|
Decorate 13 Binding 1
|
|
Decorate 16 ArrayStride 16
|
|
Decorate 17 ArrayStride 48
|
|
MemberDecorate 18(ub) 0 Offset 0
|
|
Decorate 18(ub) Block
|
|
Decorate 20 DescriptorSet 0
|
|
Decorate 20 Binding 0
|
|
Decorate 61(color) Location 0
|
|
2: TypeVoid
|
|
3: TypeFunction 2
|
|
6: TypeInt 32 0
|
|
7: 6(int) Constant 3
|
|
8: TypeArray 6(int) 7
|
|
9: 6(int) Constant 2
|
|
10: TypeArray 8 9
|
|
11(ssbo): TypeStruct 10
|
|
12: TypePointer StorageBuffer 11(ssbo)
|
|
13: 12(ptr) Variable StorageBuffer
|
|
14: TypeInt 32 1
|
|
15: 14(int) Constant 0
|
|
16: TypeArray 6(int) 7
|
|
17: TypeArray 16 9
|
|
18(ub): TypeStruct 17
|
|
19: TypePointer Uniform 18(ub)
|
|
20: 19(ptr) Variable Uniform
|
|
21: TypePointer Uniform 17
|
|
24: TypeBool
|
|
25: TypeArray 24(bool) 7
|
|
26: TypeArray 25 9
|
|
28: TypePointer StorageBuffer 10
|
|
31: TypePointer StorageBuffer 8
|
|
34: 6(int) Constant 1
|
|
35: 6(int) Constant 0
|
|
37: TypePointer StorageBuffer 6(int)
|
|
40: 14(int) Constant 1
|
|
44: 14(int) Constant 2
|
|
58: TypeFloat 32
|
|
59: TypeVector 58(float) 4
|
|
60: TypePointer Output 59(fvec4)
|
|
61(color): 60(ptr) Variable Output
|
|
62: 58(float) Constant 0
|
|
63: 59(fvec4) ConstantComposite 62 62 62 62
|
|
4(main): 2 Function None 3
|
|
5: Label
|
|
22: 21(ptr) AccessChain 20 15
|
|
23: 17 Load 22
|
|
27: 26 CopyLogical 23
|
|
29: 28(ptr) AccessChain 13 15
|
|
30: 25 CompositeExtract 27 0
|
|
32: 31(ptr) AccessChain 29 15
|
|
33: 24(bool) CompositeExtract 30 0
|
|
36: 6(int) Select 33 34 35
|
|
38: 37(ptr) AccessChain 32 15
|
|
Store 38 36
|
|
39: 24(bool) CompositeExtract 30 1
|
|
41: 6(int) Select 39 34 35
|
|
42: 37(ptr) AccessChain 32 40
|
|
Store 42 41
|
|
43: 24(bool) CompositeExtract 30 2
|
|
45: 6(int) Select 43 34 35
|
|
46: 37(ptr) AccessChain 32 44
|
|
Store 46 45
|
|
47: 25 CompositeExtract 27 1
|
|
48: 31(ptr) AccessChain 29 40
|
|
49: 24(bool) CompositeExtract 47 0
|
|
50: 6(int) Select 49 34 35
|
|
51: 37(ptr) AccessChain 48 15
|
|
Store 51 50
|
|
52: 24(bool) CompositeExtract 47 1
|
|
53: 6(int) Select 52 34 35
|
|
54: 37(ptr) AccessChain 48 40
|
|
Store 54 53
|
|
55: 24(bool) CompositeExtract 47 2
|
|
56: 6(int) Select 55 34 35
|
|
57: 37(ptr) AccessChain 48 44
|
|
Store 57 56
|
|
Store 61(color) 63
|
|
Return
|
|
FunctionEnd
|