Skip to content

Instantly share code, notes, and snippets.

@SaschaWillems
Created July 3, 2016 10:56
Show Gist options
  • Save SaschaWillems/a46a8a230de42b057f0cb8a6a0d2a581 to your computer and use it in GitHub Desktop.
Save SaschaWillems/a46a8a230de42b057f0cb8a6a0d2a581 to your computer and use it in GitHub Desktop.
debug.frag generated by glslangvalidator from the sdk
debug.frag
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 100
Capability Shader
Capability ImageQuery
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 21 94
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
SourceExtension "GL_ARB_separate_shader_objects"
SourceExtension "GL_ARB_shading_language_420pack"
Name 4 "main"
Name 12 "components"
Name 18 "samplerPosition"
Name 21 "inUV"
Name 31 "samplerNormal"
Name 40 "texDim"
Name 44 "samplerAlbedo"
Name 50 "albedo"
Name 60 "color"
Name 74 "spec"
Name 88 "index"
Name 94 "outFragColor"
Decorate 18(samplerPosition) DescriptorSet 0
Decorate 18(samplerPosition) Binding 1
Decorate 21(inUV) Location 0
Decorate 31(samplerNormal) DescriptorSet 0
Decorate 31(samplerNormal) Binding 2
Decorate 44(samplerAlbedo) DescriptorSet 0
Decorate 44(samplerAlbedo) Binding 3
Decorate 94(outFragColor) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 3
8: TypeInt 32 0
9: 8(int) Constant 3
10: TypeArray 7(fvec3) 9
11: TypePointer Function 10
13: TypeInt 32 1
14: 13(int) Constant 0
15: TypeImage 6(float) 2D sampled format:Unknown
16: TypeSampledImage 15
17: TypePointer UniformConstant 16
18(samplerPosition): 17(ptr) Variable UniformConstant
20: TypePointer Input 7(fvec3)
21(inUV): 20(ptr) Variable Input
22: TypeVector 6(float) 2
25: TypeVector 6(float) 4
28: TypePointer Function 7(fvec3)
30: 13(int) Constant 1
31(samplerNormal): 17(ptr) Variable UniformConstant
38: TypeVector 13(int) 2
39: TypePointer Function 38(ivec2)
41: TypeImage 8(int) 2D sampled format:Unknown
42: TypeSampledImage 41
43: TypePointer UniformConstant 42
44(samplerAlbedo): 43(ptr) Variable UniformConstant
48: TypeVector 8(int) 4
49: TypePointer Function 48(ivec4)
59: TypePointer Function 25(fvec4)
61: 8(int) Constant 0
62: TypePointer Function 8(int)
68: 8(int) Constant 1
75: 8(int) Constant 2
81: 13(int) Constant 2
82: TypePointer Function 6(float)
87: TypePointer Function 13(int)
89: TypePointer Input 6(float)
93: TypePointer Output 25(fvec4)
94(outFragColor): 93(ptr) Variable Output
4(main): 2 Function None 3
5: Label
12(components): 11(ptr) Variable Function
40(texDim): 39(ptr) Variable Function
50(albedo): 49(ptr) Variable Function
60(color): 59(ptr) Variable Function
74(spec): 59(ptr) Variable Function
88(index): 87(ptr) Variable Function
19: 16 Load 18(samplerPosition)
23: 7(fvec3) Load 21(inUV)
24: 22(fvec2) VectorShuffle 23 23 0 1
26: 25(fvec4) ImageSampleImplicitLod 19 24
27: 7(fvec3) VectorShuffle 26 26 0 1 2
29: 28(ptr) AccessChain 12(components) 14
Store 29 27
32: 16 Load 31(samplerNormal)
33: 7(fvec3) Load 21(inUV)
34: 22(fvec2) VectorShuffle 33 33 0 1
35: 25(fvec4) ImageSampleImplicitLod 32 34
36: 7(fvec3) VectorShuffle 35 35 0 1 2
37: 28(ptr) AccessChain 12(components) 30
Store 37 36
45: 42 Load 44(samplerAlbedo)
46: 41 Image 45
47: 38(ivec2) ImageQuerySizeLod 46 14
Store 40(texDim) 47
51: 42 Load 44(samplerAlbedo)
52: 7(fvec3) Load 21(inUV)
53: 22(fvec2) VectorShuffle 52 52 0 1
54: 38(ivec2) Load 40(texDim)
55: 22(fvec2) ConvertSToF 54
56: 22(fvec2) FMul 53 55
57: 38(ivec2) ConvertFToS 56
58: 48(ivec4) ImageFetch 51 57 Lod 14
Store 50(albedo) 58
63: 62(ptr) AccessChain 50(albedo) 61
64: 8(int) Load 63
65: 22(fvec2) ExtInst 1(GLSL.std.450) 62(UnpackHalf2x16) 64
66: 25(fvec4) Load 60(color)
67: 25(fvec4) VectorShuffle 66 65 4 5 2 3
Store 60(color) 67
69: 62(ptr) AccessChain 50(albedo) 68
70: 8(int) Load 69
71: 22(fvec2) ExtInst 1(GLSL.std.450) 62(UnpackHalf2x16) 70
72: 25(fvec4) Load 60(color)
73: 25(fvec4) VectorShuffle 72 71 0 1 4 5
Store 60(color) 73
76: 62(ptr) AccessChain 50(albedo) 75
77: 8(int) Load 76
78: 22(fvec2) ExtInst 1(GLSL.std.450) 62(UnpackHalf2x16) 77
79: 25(fvec4) Load 74(spec)
80: 25(fvec4) VectorShuffle 79 78 4 5 2 3
Store 74(spec) 80
83: 82(ptr) AccessChain 60(color) 61
84: 6(float) Load 83
85: 7(fvec3) CompositeConstruct 84 84 84
86: 28(ptr) AccessChain 12(components) 81
Store 86 85
90: 89(ptr) AccessChain 21(inUV) 75
91: 6(float) Load 90
92: 13(int) ConvertFToS 91
Store 88(index) 92
95: 13(int) Load 88(index)
96: 28(ptr) AccessChain 12(components) 95
97: 7(fvec3) Load 96
98: 25(fvec4) Load 94(outFragColor)
99: 25(fvec4) VectorShuffle 98 97 4 5 6 3
Store 94(outFragColor) 99
Return
FunctionEnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment