Do not generate samplerBuffer for spirv1.6 and beyond
This type was removed from spirv1.6. If samplerBuffer is specified in GLSL, generate textureBuffer. If samplerBuffer type is constructed, just return the buffer. Fixes #2956
This commit is contained in:
43
Test/baseResults/spv.1.6.samplerBuffer.frag.out
Normal file
43
Test/baseResults/spv.1.6.samplerBuffer.frag.out
Normal file
@@ -0,0 +1,43 @@
|
||||
spv.1.6.samplerBuffer.frag
|
||||
// Module Version 10600
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 23
|
||||
|
||||
Capability Shader
|
||||
Capability SampledBuffer
|
||||
Capability ImageQuery
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 9 13
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 140
|
||||
Name 4 "main"
|
||||
Name 9 "o"
|
||||
Name 13 "sampB"
|
||||
Decorate 9(o) Location 0
|
||||
Decorate 13(sampB) DescriptorSet 0
|
||||
Decorate 13(sampB) Binding 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypePointer Output 7(fvec4)
|
||||
9(o): 8(ptr) Variable Output
|
||||
10: TypeInt 32 1
|
||||
11: TypeImage 10(int) Buffer sampled format:Unknown
|
||||
12: TypePointer UniformConstant 11
|
||||
13(sampB): 12(ptr) Variable UniformConstant
|
||||
17: 6(float) Constant 1120403456
|
||||
19: TypeInt 32 0
|
||||
20: 19(int) Constant 3
|
||||
21: TypePointer Output 6(float)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
14: 11 Load 13(sampB)
|
||||
15: 10(int) ImageQuerySize 14
|
||||
16: 6(float) ConvertSToF 15
|
||||
18: 6(float) FDiv 16 17
|
||||
22: 21(ptr) AccessChain 9(o) 20
|
||||
Store 22 18
|
||||
Return
|
||||
FunctionEnd
|
||||
52
Test/baseResults/spv.1.6.separate.frag.out
Normal file
52
Test/baseResults/spv.1.6.separate.frag.out
Normal file
@@ -0,0 +1,52 @@
|
||||
spv.1.6.separate.frag
|
||||
// Module Version 10600
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 27
|
||||
|
||||
Capability Shader
|
||||
Capability SampledBuffer
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 9 13 18 24
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 400
|
||||
Name 4 "main"
|
||||
Name 9 "texBuffer"
|
||||
Name 13 "s"
|
||||
Name 18 "itexBuffer"
|
||||
Name 24 "utexBuffer"
|
||||
Decorate 9(texBuffer) DescriptorSet 0
|
||||
Decorate 9(texBuffer) Binding 1
|
||||
Decorate 13(s) DescriptorSet 0
|
||||
Decorate 13(s) Binding 0
|
||||
Decorate 18(itexBuffer) DescriptorSet 0
|
||||
Decorate 18(itexBuffer) Binding 2
|
||||
Decorate 24(utexBuffer) DescriptorSet 0
|
||||
Decorate 24(utexBuffer) Binding 3
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeImage 6(float) Buffer sampled format:Unknown
|
||||
8: TypePointer UniformConstant 7
|
||||
9(texBuffer): 8(ptr) Variable UniformConstant
|
||||
11: TypeSampler
|
||||
12: TypePointer UniformConstant 11
|
||||
13(s): 12(ptr) Variable UniformConstant
|
||||
15: TypeInt 32 1
|
||||
16: TypeImage 15(int) Buffer sampled format:Unknown
|
||||
17: TypePointer UniformConstant 16
|
||||
18(itexBuffer): 17(ptr) Variable UniformConstant
|
||||
21: TypeInt 32 0
|
||||
22: TypeImage 21(int) Buffer sampled format:Unknown
|
||||
23: TypePointer UniformConstant 22
|
||||
24(utexBuffer): 23(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
10: 7 Load 9(texBuffer)
|
||||
14: 11 Load 13(s)
|
||||
19: 16 Load 18(itexBuffer)
|
||||
20: 11 Load 13(s)
|
||||
25: 22 Load 24(utexBuffer)
|
||||
26: 11 Load 13(s)
|
||||
Return
|
||||
FunctionEnd
|
||||
Reference in New Issue
Block a user