1 #include <stdint.h> 2 3 #if 0 4 ../cube.vert 5 Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. 6 7 8 Linked vertex stage: 9 10 11 // Module Version 10000 12 // Generated by (magic number): 80001 13 // Id's are bound by 55 14 15 Capability Shader 16 1: ExtInstImport "GLSL.std.450" 17 MemoryModel Logical GLSL450 18 EntryPoint Vertex 4 "main" 9 21 28 19 Source GLSL 400 20 SourceExtension "GL_ARB_separate_shader_objects" 21 SourceExtension "GL_ARB_shading_language_420pack" 22 Name 4 "main" 23 Name 9 "texcoord" 24 Name 15 "buf" 25 MemberName 15(buf) 0 "MVP" 26 MemberName 15(buf) 1 "position" 27 MemberName 15(buf) 2 "attr" 28 Name 17 "ubuf" 29 Name 21 "gl_VertexIndex" 30 Name 26 "gl_PerVertex" 31 MemberName 26(gl_PerVertex) 0 "gl_Position" 32 Name 28 "" 33 Decorate 9(texcoord) Location 0 34 Decorate 13 ArrayStride 16 35 Decorate 14 ArrayStride 16 36 MemberDecorate 15(buf) 0 ColMajor 37 MemberDecorate 15(buf) 0 Offset 0 38 MemberDecorate 15(buf) 0 MatrixStride 16 39 MemberDecorate 15(buf) 1 Offset 64 40 MemberDecorate 15(buf) 2 Offset 640 41 Decorate 15(buf) Block 42 Decorate 17(ubuf) DescriptorSet 0 43 Decorate 17(ubuf) Binding 0 44 Decorate 21(gl_VertexIndex) BuiltIn VertexIndex 45 MemberDecorate 26(gl_PerVertex) 0 BuiltIn Position 46 Decorate 26(gl_PerVertex) Block 47 2: TypeVoid 48 3: TypeFunction 2 49 6: TypeFloat 32 50 7: TypeVector 6(float) 4 51 8: TypePointer Output 7(fvec4) 52 9(texcoord): 8(ptr) Variable Output 53 10: TypeMatrix 7(fvec4) 4 54 11: TypeInt 32 0 55 12: 11(int) Constant 36 56 13: TypeArray 7(fvec4) 12 57 14: TypeArray 7(fvec4) 12 58 15(buf): TypeStruct 10 13 14 59 16: TypePointer Uniform 15(buf) 60 17(ubuf): 16(ptr) Variable Uniform 61 18: TypeInt 32 1 62 19: 18(int) Constant 2 63 20: TypePointer Input 18(int) 64 21(gl_VertexIndex): 20(ptr) Variable Input 65 23: TypePointer Uniform 7(fvec4) 66 26(gl_PerVertex): TypeStruct 7(fvec4) 67 27: TypePointer Output 26(gl_PerVertex) 68 28: 27(ptr) Variable Output 69 29: 18(int) Constant 0 70 30: TypePointer Uniform 10 71 33: 18(int) Constant 1 72 39: 11(int) Constant 1 73 40: TypePointer Output 6(float) 74 45: 11(int) Constant 2 75 48: 11(int) Constant 3 76 52: 6(float) Constant 1073741824 77 4(main): 2 Function None 3 78 5: Label 79 22: 18(int) Load 21(gl_VertexIndex) 80 24: 23(ptr) AccessChain 17(ubuf) 19 22 81 25: 7(fvec4) Load 24 82 Store 9(texcoord) 25 83 31: 30(ptr) AccessChain 17(ubuf) 29 84 32: 10 Load 31 85 34: 18(int) Load 21(gl_VertexIndex) 86 35: 23(ptr) AccessChain 17(ubuf) 33 34 87 36: 7(fvec4) Load 35 88 37: 7(fvec4) MatrixTimesVector 32 36 89 38: 8(ptr) AccessChain 28 29 90 Store 38 37 91 41: 40(ptr) AccessChain 28 29 39 92 42: 6(float) Load 41 93 43: 6(float) FNegate 42 94 44: 40(ptr) AccessChain 28 29 39 95 Store 44 43 96 46: 40(ptr) AccessChain 28 29 45 97 47: 6(float) Load 46 98 49: 40(ptr) AccessChain 28 29 48 99 50: 6(float) Load 49 100 51: 6(float) FAdd 47 50 101 53: 6(float) FDiv 51 52 102 54: 40(ptr) AccessChain 28 29 45 103 Store 54 53 104 Return 105 FunctionEnd 106 #endif 107 108 static const uint32_t cube_vert[396] = { 109 0x07230203, 0x00010000, 0x00080001, 0x00000037, 110 0x00000000, 0x00020011, 0x00000001, 0x0006000b, 111 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 112 0x00000000, 0x0003000e, 0x00000000, 0x00000001, 113 0x0008000f, 0x00000000, 0x00000004, 0x6e69616d, 114 0x00000000, 0x00000009, 0x00000015, 0x0000001c, 115 0x00030003, 0x00000002, 0x00000190, 0x00090004, 116 0x415f4c47, 0x735f4252, 0x72617065, 0x5f657461, 117 0x64616873, 0x6f5f7265, 0x63656a62, 0x00007374, 118 0x00090004, 0x415f4c47, 0x735f4252, 0x69646168, 119 0x6c5f676e, 0x75676e61, 0x5f656761, 0x70303234, 120 0x006b6361, 0x00040005, 0x00000004, 0x6e69616d, 121 0x00000000, 0x00050005, 0x00000009, 0x63786574, 122 0x64726f6f, 0x00000000, 0x00030005, 0x0000000f, 123 0x00667562, 0x00040006, 0x0000000f, 0x00000000, 124 0x0050564d, 0x00060006, 0x0000000f, 0x00000001, 125 0x69736f70, 0x6e6f6974, 0x00000000, 0x00050006, 126 0x0000000f, 0x00000002, 0x72747461, 0x00000000, 127 0x00040005, 0x00000011, 0x66756275, 0x00000000, 128 0x00060005, 0x00000015, 0x565f6c67, 0x65747265, 129 0x646e4978, 0x00007865, 0x00060005, 0x0000001a, 130 0x505f6c67, 0x65567265, 0x78657472, 0x00000000, 131 0x00060006, 0x0000001a, 0x00000000, 0x505f6c67, 132 0x7469736f, 0x006e6f69, 0x00030005, 0x0000001c, 133 0x00000000, 0x00040047, 0x00000009, 0x0000001e, 134 0x00000000, 0x00040047, 0x0000000d, 0x00000006, 135 0x00000010, 0x00040047, 0x0000000e, 0x00000006, 136 0x00000010, 0x00040048, 0x0000000f, 0x00000000, 137 0x00000005, 0x00050048, 0x0000000f, 0x00000000, 138 0x00000023, 0x00000000, 0x00050048, 0x0000000f, 139 0x00000000, 0x00000007, 0x00000010, 0x00050048, 140 0x0000000f, 0x00000001, 0x00000023, 0x00000040, 141 0x00050048, 0x0000000f, 0x00000002, 0x00000023, 142 0x00000280, 0x00030047, 0x0000000f, 0x00000002, 143 0x00040047, 0x00000011, 0x00000022, 0x00000000, 144 0x00040047, 0x00000011, 0x00000021, 0x00000000, 145 0x00040047, 0x00000015, 0x0000000b, 0x0000002a, 146 0x00050048, 0x0000001a, 0x00000000, 0x0000000b, 147 0x00000000, 0x00030047, 0x0000001a, 0x00000002, 148 0x00020013, 0x00000002, 0x00030021, 0x00000003, 149 0x00000002, 0x00030016, 0x00000006, 0x00000020, 150 0x00040017, 0x00000007, 0x00000006, 0x00000004, 151 0x00040020, 0x00000008, 0x00000003, 0x00000007, 152 0x0004003b, 0x00000008, 0x00000009, 0x00000003, 153 0x00040018, 0x0000000a, 0x00000007, 0x00000004, 154 0x00040015, 0x0000000b, 0x00000020, 0x00000000, 155 0x0004002b, 0x0000000b, 0x0000000c, 0x00000024, 156 0x0004001c, 0x0000000d, 0x00000007, 0x0000000c, 157 0x0004001c, 0x0000000e, 0x00000007, 0x0000000c, 158 0x0005001e, 0x0000000f, 0x0000000a, 0x0000000d, 159 0x0000000e, 0x00040020, 0x00000010, 0x00000002, 160 0x0000000f, 0x0004003b, 0x00000010, 0x00000011, 161 0x00000002, 0x00040015, 0x00000012, 0x00000020, 162 0x00000001, 0x0004002b, 0x00000012, 0x00000013, 163 0x00000002, 0x00040020, 0x00000014, 0x00000001, 164 0x00000012, 0x0004003b, 0x00000014, 0x00000015, 165 0x00000001, 0x00040020, 0x00000017, 0x00000002, 166 0x00000007, 0x0003001e, 0x0000001a, 0x00000007, 167 0x00040020, 0x0000001b, 0x00000003, 0x0000001a, 168 0x0004003b, 0x0000001b, 0x0000001c, 0x00000003, 169 0x0004002b, 0x00000012, 0x0000001d, 0x00000000, 170 0x00040020, 0x0000001e, 0x00000002, 0x0000000a, 171 0x0004002b, 0x00000012, 0x00000021, 0x00000001, 172 0x0004002b, 0x0000000b, 0x00000027, 0x00000001, 173 0x00040020, 0x00000028, 0x00000003, 0x00000006, 174 0x0004002b, 0x0000000b, 0x0000002d, 0x00000002, 175 0x0004002b, 0x0000000b, 0x00000030, 0x00000003, 176 0x0004002b, 0x00000006, 0x00000034, 0x40000000, 177 0x00050036, 0x00000002, 0x00000004, 0x00000000, 178 0x00000003, 0x000200f8, 0x00000005, 0x0004003d, 179 0x00000012, 0x00000016, 0x00000015, 0x00060041, 180 0x00000017, 0x00000018, 0x00000011, 0x00000013, 181 0x00000016, 0x0004003d, 0x00000007, 0x00000019, 182 0x00000018, 0x0003003e, 0x00000009, 0x00000019, 183 0x00050041, 0x0000001e, 0x0000001f, 0x00000011, 184 0x0000001d, 0x0004003d, 0x0000000a, 0x00000020, 185 0x0000001f, 0x0004003d, 0x00000012, 0x00000022, 186 0x00000015, 0x00060041, 0x00000017, 0x00000023, 187 0x00000011, 0x00000021, 0x00000022, 0x0004003d, 188 0x00000007, 0x00000024, 0x00000023, 0x00050091, 189 0x00000007, 0x00000025, 0x00000020, 0x00000024, 190 0x00050041, 0x00000008, 0x00000026, 0x0000001c, 191 0x0000001d, 0x0003003e, 0x00000026, 0x00000025, 192 0x00060041, 0x00000028, 0x00000029, 0x0000001c, 193 0x0000001d, 0x00000027, 0x0004003d, 0x00000006, 194 0x0000002a, 0x00000029, 0x0004007f, 0x00000006, 195 0x0000002b, 0x0000002a, 0x00060041, 0x00000028, 196 0x0000002c, 0x0000001c, 0x0000001d, 0x00000027, 197 0x0003003e, 0x0000002c, 0x0000002b, 0x00060041, 198 0x00000028, 0x0000002e, 0x0000001c, 0x0000001d, 199 0x0000002d, 0x0004003d, 0x00000006, 0x0000002f, 200 0x0000002e, 0x00060041, 0x00000028, 0x00000031, 201 0x0000001c, 0x0000001d, 0x00000030, 0x0004003d, 202 0x00000006, 0x00000032, 0x00000031, 0x00050081, 203 0x00000006, 0x00000033, 0x0000002f, 0x00000032, 204 0x00050088, 0x00000006, 0x00000035, 0x00000033, 205 0x00000034, 0x00060041, 0x00000028, 0x00000036, 206 0x0000001c, 0x0000001d, 0x0000002d, 0x0003003e, 207 0x00000036, 0x00000035, 0x000100fd, 0x00010038, 208 }; 209