yum-mirror/glslang

git clone https://git.yummers.dev/yum-mirror/glslang

janharaldUpdate compute shader derivative rules such that texture operations with implicit derivatives can be used without the extensions (and fall back to LoD 0).19808a89

main
4.2 KiB82 linesraw
1spv.texture_implicit.comp
2// Module Version 10300
3// Generated by (magic number): 8000b
4// Id's are bound by 47
5
6                              Capability Shader
7               1:             ExtInstImport  "GLSL.std.450"
8                              MemoryModel Logical GLSL450
9                              EntryPoint GLCompute 4  "main" 37
10                              ExecutionMode 4 LocalSize 3 3 1
11                              Source GLSL 460
12                              Name 4  "main"
13                              Name 9  "texCoords"
14                              Name 11  "PCBlock"
15                              MemberName 11(PCBlock) 0  "coords"
16                              MemberName 11(PCBlock) 1  "size"
17                              MemberName 11(PCBlock) 2  "lod"
18                              Name 13  "pc"
19                              Name 21  "pixel"
20                              Name 25  "inTex"
21                              Name 32  "outColor"
22                              Name 37  "gl_LocalInvocationID"
23                              Decorate 11(PCBlock) Block
24                              MemberDecorate 11(PCBlock) 0 Offset 0
25                              MemberDecorate 11(PCBlock) 1 Offset 16
26                              MemberDecorate 11(PCBlock) 2 Offset 24
27                              Decorate 25(inTex) Binding 0
28                              Decorate 25(inTex) DescriptorSet 0
29                              Decorate 32(outColor) Binding 2
30                              Decorate 32(outColor) DescriptorSet 0
31                              Decorate 37(gl_LocalInvocationID) BuiltIn LocalInvocationId
32                              Decorate 46 BuiltIn WorkgroupSize
33               2:             TypeVoid
34               3:             TypeFunction 2
35               6:             TypeFloat 32
36               7:             TypeVector 6(float) 2
37               8:             TypePointer Function 7(fvec2)
38              10:             TypeVector 6(float) 4
39     11(PCBlock):             TypeStruct 10(fvec4) 7(fvec2) 6(float)
40              12:             TypePointer PushConstant 11(PCBlock)
41          13(pc):     12(ptr) Variable PushConstant
42              14:             TypeInt 32 1
43              15:     14(int) Constant 0
44              16:             TypePointer PushConstant 10(fvec4)
45              20:             TypePointer Function 10(fvec4)
46              22:             TypeImage 6(float) 2D sampled format:Unknown
47              23:             TypeSampledImage 22
48              24:             TypePointer UniformConstant 23
49       25(inTex):     24(ptr) Variable UniformConstant
50              28:    6(float) Constant 0
51              30:             TypeImage 6(float) 2D nonsampled format:Rgba8
52              31:             TypePointer UniformConstant 30
53    32(outColor):     31(ptr) Variable UniformConstant
54              34:             TypeInt 32 0
55              35:             TypeVector 34(int) 3
56              36:             TypePointer Input 35(ivec3)
5737(gl_LocalInvocationID):     36(ptr) Variable Input
58              38:             TypeVector 34(int) 2
59              41:             TypeVector 14(int) 2
60              44:     34(int) Constant 3
61              45:     34(int) Constant 1
62              46:   35(ivec3) ConstantComposite 44 44 45
63         4(main):           2 Function None 3
64               5:             Label
65    9(texCoords):      8(ptr) Variable Function
66       21(pixel):     20(ptr) Variable Function
67              17:     16(ptr) AccessChain 13(pc) 15
68              18:   10(fvec4) Load 17
69              19:    7(fvec2) VectorShuffle 18 18 0 1
70                              Store 9(texCoords) 19
71              26:          23 Load 25(inTex)
72              27:    7(fvec2) Load 9(texCoords)
73              29:   10(fvec4) ImageSampleExplicitLod 26 27 Lod 28
74                              Store 21(pixel) 29
75              33:          30 Load 32(outColor)
76              39:   35(ivec3) Load 37(gl_LocalInvocationID)
77              40:   38(ivec2) VectorShuffle 39 39 0 1
78              42:   41(ivec2) Bitcast 40
79              43:   10(fvec4) Load 21(pixel)
80                              ImageWrite 33 42 43
81                              Return
82                              FunctionEnd