Fix debug info file and source strings

The file and source text was not being set correctly in the test output.
This change makes the test fixture consistent with the command line
behavior, "-gVS", which was my original intent when I added these tests.
This commit is contained in:
Jeremy Hayes 2023-10-24 13:07:31 -06:00 committed by arcady-lunarg
parent b0df68c490
commit bf08e1db5c
12 changed files with 2155 additions and 1268 deletions

View file

@ -1,7 +1,7 @@
spv.debuginfo.glsl.geom
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 273
// Id's are bound by 274
Capability Geometry
Capability MultiViewport
@ -9,12 +9,12 @@ spv.debuginfo.glsl.geom
1: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
3: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 14 "main" 64 98 121 130 134 168 208 217 236 249 255 259
EntryPoint Geometry 14 "main" 64 98 121 130 134 168 208 217 236 250 256 260
ExecutionMode 14 Triangles
ExecutionMode 14 Invocations 2
ExecutionMode 14 OutputTriangleStrip
ExecutionMode 14 OutputVertices 3
2: String ""
2: String "spv.debuginfo.glsl.geom"
8: String "uint"
16: String "main"
19: String "// OpModuleProcessed auto-map-locations
@ -24,6 +24,75 @@ spv.debuginfo.glsl.geom
// OpModuleProcessed keep-uncalled
// OpModuleProcessed entry-point main
#line 1
/*
The MIT License (MIT)
Copyright (c) 2022 Sascha Willems
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#version 450
#extension GL_ARB_viewport_array : enable
layout (triangles, invocations = 2) in;
layout (triangle_strip, max_vertices = 3) out;
layout (binding = 0) uniform UBO
{
mat4 projection[2];
mat4 modelview[2];
vec4 lightPos;
} ubo;
layout (location = 0) in vec3 inNormal[];
layout (location = 1) in vec3 inColor[];
layout (location = 0) out vec3 outNormal;
layout (location = 1) out vec3 outColor;
layout (location = 2) out vec3 outViewVec;
layout (location = 3) out vec3 outLightVec;
void main(void)
{
for(int i = 0; i < gl_in.length(); i++)
{
outNormal = mat3(ubo.modelview[gl_InvocationID]) * inNormal[i];
outColor = inColor[i];
vec4 pos = gl_in[i].gl_Position;
vec4 worldPos = (ubo.modelview[gl_InvocationID] * pos);
vec3 lPos = vec3(ubo.modelview[gl_InvocationID] * ubo.lightPos);
outLightVec = lPos - worldPos.xyz;
outViewVec = -worldPos.xyz;
gl_Position = ubo.projection[gl_InvocationID] * worldPos;
// Set the viewport index that the vertex will be emitted to
gl_ViewportIndex = gl_InvocationID;
gl_PrimitiveID = gl_PrimitiveIDIn;
EmitVertex();
}
EndPrimitive();
}
"
29: String "int"
36: String "i"
@ -49,9 +118,10 @@ spv.debuginfo.glsl.geom
191: String "lPos"
210: String "outLightVec"
219: String "outViewVec"
251: String "gl_ViewportIndex"
257: String "gl_PrimitiveID"
261: String "gl_PrimitiveIDIn"
238: String ""
252: String "gl_ViewportIndex"
258: String "gl_PrimitiveID"
262: String "gl_PrimitiveIDIn"
SourceExtension "GL_ARB_viewport_array"
Name 14 "main"
Name 34 "i"
@ -82,9 +152,9 @@ spv.debuginfo.glsl.geom
MemberName 225(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 225(gl_PerVertex) 3 "gl_CullDistance"
Name 236 ""
Name 249 "gl_ViewportIndex"
Name 255 "gl_PrimitiveID"
Name 259 "gl_PrimitiveIDIn"
Name 250 "gl_ViewportIndex"
Name 256 "gl_PrimitiveID"
Name 260 "gl_PrimitiveIDIn"
Decorate 64(outNormal) Location 0
Decorate 74 ArrayStride 64
Decorate 76 ArrayStride 64
@ -114,9 +184,9 @@ spv.debuginfo.glsl.geom
MemberDecorate 225(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 225(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 225(gl_PerVertex) Block
Decorate 249(gl_ViewportIndex) BuiltIn ViewportIndex
Decorate 255(gl_PrimitiveID) BuiltIn PrimitiveId
Decorate 259(gl_PrimitiveIDIn) BuiltIn PrimitiveId
Decorate 250(gl_ViewportIndex) BuiltIn ViewportIndex
Decorate 256(gl_PrimitiveID) BuiltIn PrimitiveId
Decorate 260(gl_PrimitiveIDIn) BuiltIn PrimitiveId
4: TypeVoid
5: TypeFunction 4
7: TypeInt 32 0
@ -248,21 +318,21 @@ spv.debuginfo.glsl.geom
234: TypePointer Output 225(gl_PerVertex)
235: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 232 13 12
236: 234(ptr) Variable Output
237: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 2 232 18 233 12 21 2 236 68
244: TypePointer Output 69(fvec4)
245: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 70 13 12
247: TypePointer Output 28(int)
248: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 30 13 12
249(gl_ViewportIndex): 247(ptr) Variable Output
252: 7(int) Constant 64
250: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 251 30 18 252 12 21 251 249(gl_ViewportIndex) 68
255(gl_PrimitiveID): 247(ptr) Variable Output
258: 7(int) Constant 65
256: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 257 30 18 258 12 21 257 255(gl_PrimitiveID) 68
259(gl_PrimitiveIDIn): 96(ptr) Variable Input
260: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 261 30 18 258 12 21 261 259(gl_PrimitiveIDIn) 68
265: 7(int) Constant 66
272: 7(int) Constant 68
237: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 238 232 18 233 12 21 238 236 68
245: TypePointer Output 69(fvec4)
246: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 70 13 12
248: TypePointer Output 28(int)
249: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 30 13 12
250(gl_ViewportIndex): 248(ptr) Variable Output
253: 7(int) Constant 64
251: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 252 30 18 253 12 21 252 250(gl_ViewportIndex) 68
256(gl_PrimitiveID): 248(ptr) Variable Output
259: 7(int) Constant 65
257: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 258 30 18 259 12 21 258 256(gl_PrimitiveID) 68
260(gl_PrimitiveIDIn): 96(ptr) Variable Input
261: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 262 30 18 259 12 21 262 260(gl_PrimitiveIDIn) 68
266: 7(int) Constant 66
273: 7(int) Constant 68
14(main): 4 Function None 5
15: Label
34(i): 31(ptr) Variable Function
@ -348,33 +418,33 @@ spv.debuginfo.glsl.geom
223: 60(fvec3) VectorShuffle 221 221 0 1 2
224: 60(fvec3) FNegate 223
Store 217(outViewVec) 224
239: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 233 233 12 12
238: 28(int) Load 98(gl_InvocationID)
240: 104(ptr) AccessChain 92(ubo) 41 238
241: 71 Load 240
242: 69(fvec4) Load 176(worldPos)
243: 69(fvec4) MatrixTimesVector 241 242
246: 244(ptr) AccessChain 236 41
Store 246 243
254: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 252 252 12 12
253: 28(int) Load 98(gl_InvocationID)
Store 249(gl_ViewportIndex) 253
263: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 258 258 12 12
262: 28(int) Load 259(gl_PrimitiveIDIn)
Store 255(gl_PrimitiveID) 262
264: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 265 265 12 12
240: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 233 233 12 12
239: 28(int) Load 98(gl_InvocationID)
241: 104(ptr) AccessChain 92(ubo) 41 239
242: 71 Load 241
243: 69(fvec4) Load 176(worldPos)
244: 69(fvec4) MatrixTimesVector 242 243
247: 245(ptr) AccessChain 236 41
Store 247 244
255: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 253 253 12 12
254: 28(int) Load 98(gl_InvocationID)
Store 250(gl_ViewportIndex) 254
264: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 259 259 12 12
263: 28(int) Load 260(gl_PrimitiveIDIn)
Store 256(gl_PrimitiveID) 263
265: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 266 266 12 12
EmitVertex
Branch 45
45: Label
267: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17
268: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 37 37 12 12
266: 28(int) Load 34(i)
269: 28(int) IAdd 266 95
Store 34(i) 269
268: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17
269: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 37 37 12 12
267: 28(int) Load 34(i)
270: 28(int) IAdd 267 95
Store 34(i) 270
Branch 42
44: Label
270: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17
271: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 272 272 12 12
271: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17
272: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 273 273 12 12
EndPrimitive
Return
FunctionEnd