Skip to content

Instantly share code, notes, and snippets.

@SaschaWillems
Created July 3, 2016 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SaschaWillems/e266b889cb87e4c1a170c08dc53e0e4a to your computer and use it in GitHub Desktop.
Save SaschaWillems/e266b889cb87e4c1a170c08dc53e0e4a to your computer and use it in GitHub Desktop.
debug.frag generated by glslangvalidator built from current source
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 101
Capability Shader
Capability ImageQuery
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 21 95
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 61 "color"
Name 75 "spec"
Name 89 "index"
Name 95 "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 95(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)
60: TypePointer Function 25(fvec4)
62: 8(int) Constant 0
63: TypePointer Function 8(int)
69: 8(int) Constant 1
76: 8(int) Constant 2
82: 13(int) Constant 2
83: TypePointer Function 6(float)
88: TypePointer Function 13(int)
90: TypePointer Input 6(float)
94: TypePointer Output 25(fvec4)
95(outFragColor): 94(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
61(color): 60(ptr) Variable Function
75(spec): 60(ptr) Variable Function
89(index): 88(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: 41 Image 51
59: 48(ivec4) ImageFetch 58 57 Lod 14
Store 50(albedo) 59
64: 63(ptr) AccessChain 50(albedo) 62
65: 8(int) Load 64
66: 22(fvec2) ExtInst 1(GLSL.std.450) 62(UnpackHalf2x16) 65
67: 25(fvec4) Load 61(color)
68: 25(fvec4) VectorShuffle 67 66 4 5 2 3
Store 61(color) 68
70: 63(ptr) AccessChain 50(albedo) 69
71: 8(int) Load 70
72: 22(fvec2) ExtInst 1(GLSL.std.450) 62(UnpackHalf2x16) 71
73: 25(fvec4) Load 61(color)
74: 25(fvec4) VectorShuffle 73 72 0 1 4 5
Store 61(color) 74
77: 63(ptr) AccessChain 50(albedo) 76
78: 8(int) Load 77
79: 22(fvec2) ExtInst 1(GLSL.std.450) 62(UnpackHalf2x16) 78
80: 25(fvec4) Load 75(spec)
81: 25(fvec4) VectorShuffle 80 79 4 5 2 3
Store 75(spec) 81
84: 83(ptr) AccessChain 75(spec) 62
85: 6(float) Load 84
86: 7(fvec3) CompositeConstruct 85 85 85
87: 28(ptr) AccessChain 12(components) 82
Store 87 86
91: 90(ptr) AccessChain 21(inUV) 76
92: 6(float) Load 91
93: 13(int) ConvertFToS 92
Store 89(index) 93
96: 13(int) Load 89(index)
97: 28(ptr) AccessChain 12(components) 96
98: 7(fvec3) Load 97
99: 25(fvec4) Load 95(outFragColor)
100: 25(fvec4) VectorShuffle 99 98 4 5 6 3
Store 95(outFragColor) 100
Return
FunctionEnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment