This implements a new nonunifom analysis suggested by @jbolz. This change generates nonUniform decorations that were previously missing and avoids generation of incorrect decorations. Most notably, it now generates decorations for nonuniform functions and out params. It avoids generating decorations for lvalues which themselves are not nonuniform.
52 lines
2.5 KiB
Plaintext
52 lines
2.5 KiB
Plaintext
spv.nonuniform4.frag
|
|
// Module Version 10000
|
|
// Generated by (magic number): 8000a
|
|
// Id's are bound by 24
|
|
|
|
Capability Shader
|
|
Capability ImageBuffer
|
|
Capability ShaderNonUniformEXT
|
|
Capability RuntimeDescriptorArrayEXT
|
|
Capability StorageTexelBufferArrayNonUniformIndexingEXT
|
|
Extension "SPV_EXT_descriptor_indexing"
|
|
1: ExtInstImport "GLSL.std.450"
|
|
MemoryModel Logical GLSL450
|
|
EntryPoint Fragment 4 "main" 13
|
|
ExecutionMode 4 OriginUpperLeft
|
|
Source GLSL 450
|
|
SourceExtension "GL_EXT_nonuniform_qualifier"
|
|
Name 4 "main"
|
|
Name 10 "data"
|
|
Name 13 "rIndex"
|
|
Decorate 10(data) DescriptorSet 0
|
|
Decorate 10(data) Binding 4
|
|
Decorate 13(rIndex) Flat
|
|
Decorate 13(rIndex) Location 3
|
|
Decorate 15 DecorationNonUniformEXT
|
|
Decorate 17 DecorationNonUniformEXT
|
|
Decorate 21 DecorationNonUniformEXT
|
|
2: TypeVoid
|
|
3: TypeFunction 2
|
|
6: TypeInt 32 0
|
|
7: TypeImage 6(int) Buffer nonsampled format:R32ui
|
|
8: TypeRuntimeArray 7
|
|
9: TypePointer UniformConstant 8
|
|
10(data): 9(ptr) Variable UniformConstant
|
|
11: TypeInt 32 1
|
|
12: TypePointer Input 11(int)
|
|
13(rIndex): 12(ptr) Variable Input
|
|
16: TypePointer UniformConstant 7
|
|
18: 11(int) Constant 0
|
|
19: 6(int) Constant 0
|
|
20: TypePointer Image 6(int)
|
|
22: 6(int) Constant 1
|
|
4(main): 2 Function None 3
|
|
5: Label
|
|
14: 11(int) Load 13(rIndex)
|
|
15: 11(int) CopyObject 14
|
|
17: 16(ptr) AccessChain 10(data) 15
|
|
21: 20(ptr) ImageTexelPointer 17 18 19
|
|
23: 6(int) AtomicIAdd 21 22 19 19
|
|
Return
|
|
FunctionEnd
|