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:
parent
b0df68c490
commit
bf08e1db5c
12 changed files with 2155 additions and 1268 deletions
|
|
@ -1,18 +1,18 @@
|
|||
spv.debuginfo.glsl.tese
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 356
|
||||
// Id's are bound by 357
|
||||
|
||||
Capability Tessellation
|
||||
Extension "SPV_KHR_non_semantic_info"
|
||||
1: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
|
||||
3: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint TessellationEvaluation 14 "main" 47 66 93 116 143 183 300 315 323 336 343
|
||||
EntryPoint TessellationEvaluation 14 "main" 47 66 93 116 143 183 300 316 324 337 344
|
||||
ExecutionMode 14 Quads
|
||||
ExecutionMode 14 SpacingEqual
|
||||
ExecutionMode 14 VertexOrderCw
|
||||
2: String ""
|
||||
2: String "spv.debuginfo.glsl.tese"
|
||||
8: String "uint"
|
||||
16: String "main"
|
||||
19: String "// OpModuleProcessed auto-map-locations
|
||||
|
|
@ -22,6 +22,84 @@ spv.debuginfo.glsl.tese
|
|||
// 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
|
||||
|
||||
layout (set = 0, binding = 0) uniform UBO
|
||||
{
|
||||
mat4 projection;
|
||||
mat4 modelview;
|
||||
vec4 lightPos;
|
||||
vec4 frustumPlanes[6];
|
||||
float displacementFactor;
|
||||
float tessellationFactor;
|
||||
vec2 viewportDim;
|
||||
float tessellatedEdgeSize;
|
||||
} ubo;
|
||||
|
||||
layout (set = 0, binding = 1) uniform sampler2D displacementMap;
|
||||
|
||||
layout(quads, equal_spacing, cw) in;
|
||||
|
||||
layout (location = 0) in vec3 inNormal[];
|
||||
layout (location = 1) in vec2 inUV[];
|
||||
|
||||
layout (location = 0) out vec3 outNormal;
|
||||
layout (location = 1) out vec2 outUV;
|
||||
layout (location = 2) out vec3 outViewVec;
|
||||
layout (location = 3) out vec3 outLightVec;
|
||||
layout (location = 4) out vec3 outEyePos;
|
||||
layout (location = 5) out vec3 outWorldPos;
|
||||
|
||||
void main()
|
||||
{
|
||||
// Interpolate UV coordinates
|
||||
vec2 uv1 = mix(inUV[0], inUV[1], gl_TessCoord.x);
|
||||
vec2 uv2 = mix(inUV[3], inUV[2], gl_TessCoord.x);
|
||||
outUV = mix(uv1, uv2, gl_TessCoord.y);
|
||||
|
||||
vec3 n1 = mix(inNormal[0], inNormal[1], gl_TessCoord.x);
|
||||
vec3 n2 = mix(inNormal[3], inNormal[2], gl_TessCoord.x);
|
||||
outNormal = mix(n1, n2, gl_TessCoord.y);
|
||||
|
||||
// Interpolate positions
|
||||
vec4 pos1 = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);
|
||||
vec4 pos2 = mix(gl_in[3].gl_Position, gl_in[2].gl_Position, gl_TessCoord.x);
|
||||
vec4 pos = mix(pos1, pos2, gl_TessCoord.y);
|
||||
// Displace
|
||||
pos.y -= textureLod(displacementMap, outUV, 0.0).r * ubo.displacementFactor;
|
||||
// Perspective projection
|
||||
gl_Position = ubo.projection * ubo.modelview * pos;
|
||||
|
||||
// Calculate vectors for lighting based on tessellated position
|
||||
outViewVec = -pos.xyz;
|
||||
outLightVec = normalize(ubo.lightPos.xyz + outViewVec);
|
||||
outWorldPos = pos.xyz;
|
||||
outEyePos = vec3(ubo.modelview * pos);
|
||||
}
|
||||
"
|
||||
29: String "float"
|
||||
38: String "uv1"
|
||||
|
|
@ -55,10 +133,11 @@ spv.debuginfo.glsl.tese
|
|||
266: String "viewportDim"
|
||||
270: String "UBO"
|
||||
275: String "ubo"
|
||||
317: String "outViewVec"
|
||||
325: String "outLightVec"
|
||||
338: String "outWorldPos"
|
||||
345: String "outEyePos"
|
||||
302: String ""
|
||||
318: String "outViewVec"
|
||||
326: String "outLightVec"
|
||||
339: String "outWorldPos"
|
||||
346: String "outEyePos"
|
||||
Name 14 "main"
|
||||
Name 36 "uv1"
|
||||
Name 47 "inUV"
|
||||
|
|
@ -95,10 +174,10 @@ spv.debuginfo.glsl.tese
|
|||
MemberName 288(gl_PerVertex) 2 "gl_ClipDistance"
|
||||
MemberName 288(gl_PerVertex) 3 "gl_CullDistance"
|
||||
Name 300 ""
|
||||
Name 315 "outViewVec"
|
||||
Name 323 "outLightVec"
|
||||
Name 336 "outWorldPos"
|
||||
Name 343 "outEyePos"
|
||||
Name 316 "outViewVec"
|
||||
Name 324 "outLightVec"
|
||||
Name 337 "outWorldPos"
|
||||
Name 344 "outEyePos"
|
||||
Decorate 47(inUV) Location 1
|
||||
Decorate 66(gl_TessCoord) BuiltIn TessCoord
|
||||
Decorate 93(outUV) Location 1
|
||||
|
|
@ -132,10 +211,10 @@ spv.debuginfo.glsl.tese
|
|||
MemberDecorate 288(gl_PerVertex) 2 BuiltIn ClipDistance
|
||||
MemberDecorate 288(gl_PerVertex) 3 BuiltIn CullDistance
|
||||
Decorate 288(gl_PerVertex) Block
|
||||
Decorate 315(outViewVec) Location 2
|
||||
Decorate 323(outLightVec) Location 3
|
||||
Decorate 336(outWorldPos) Location 5
|
||||
Decorate 343(outEyePos) Location 4
|
||||
Decorate 316(outViewVec) Location 2
|
||||
Decorate 324(outLightVec) Location 3
|
||||
Decorate 337(outWorldPos) Location 5
|
||||
Decorate 344(outEyePos) Location 4
|
||||
4: TypeVoid
|
||||
5: TypeFunction 4
|
||||
7: TypeInt 32 0
|
||||
|
|
@ -292,25 +371,25 @@ spv.debuginfo.glsl.tese
|
|||
298: TypePointer Output 288(gl_PerVertex)
|
||||
299: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 296 13 12
|
||||
300: 298(ptr) Variable Output
|
||||
301: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 2 296 18 297 12 21 2 300 50
|
||||
302: TypePointer Uniform 243
|
||||
303: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 244 24 12
|
||||
312: TypePointer Output 154(fvec4)
|
||||
313: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 155 13 12
|
||||
315(outViewVec): 141(ptr) Variable Output
|
||||
318: 7(int) Constant 74
|
||||
316: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 317 63 18 318 12 21 317 315(outViewVec) 50
|
||||
323(outLightVec): 141(ptr) Variable Output
|
||||
326: 7(int) Constant 75
|
||||
324: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 325 63 18 326 12 21 325 323(outLightVec) 50
|
||||
327: TypePointer Uniform 154(fvec4)
|
||||
328: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 155 24 12
|
||||
336(outWorldPos): 141(ptr) Variable Output
|
||||
339: 7(int) Constant 76
|
||||
337: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 338 63 18 339 12 21 338 336(outWorldPos) 50
|
||||
343(outEyePos): 141(ptr) Variable Output
|
||||
346: 7(int) Constant 77
|
||||
344: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 345 63 18 346 12 21 345 343(outEyePos) 50
|
||||
301: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 302 296 18 297 12 21 302 300 50
|
||||
303: TypePointer Uniform 243
|
||||
304: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 244 24 12
|
||||
313: TypePointer Output 154(fvec4)
|
||||
314: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 155 13 12
|
||||
316(outViewVec): 141(ptr) Variable Output
|
||||
319: 7(int) Constant 74
|
||||
317: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 318 63 18 319 12 21 318 316(outViewVec) 50
|
||||
324(outLightVec): 141(ptr) Variable Output
|
||||
327: 7(int) Constant 75
|
||||
325: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 326 63 18 327 12 21 326 324(outLightVec) 50
|
||||
328: TypePointer Uniform 154(fvec4)
|
||||
329: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 155 24 12
|
||||
337(outWorldPos): 141(ptr) Variable Output
|
||||
340: 7(int) Constant 76
|
||||
338: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 339 63 18 340 12 21 339 337(outWorldPos) 50
|
||||
344(outEyePos): 141(ptr) Variable Output
|
||||
347: 7(int) Constant 77
|
||||
345: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 346 63 18 347 12 21 346 344(outEyePos) 50
|
||||
14(main): 4 Function None 5
|
||||
15: Label
|
||||
36(uv1): 33(ptr) Variable Function
|
||||
|
|
@ -427,42 +506,42 @@ spv.debuginfo.glsl.tese
|
|||
286: 28(float) FSub 285 281
|
||||
287: 282(ptr) AccessChain 210(pos) 22
|
||||
Store 287 286
|
||||
305: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 297 297 12 12
|
||||
304: 302(ptr) AccessChain 273(ubo) 54
|
||||
306: 243 Load 304
|
||||
307: 302(ptr) AccessChain 273(ubo) 59
|
||||
308: 243 Load 307
|
||||
309: 243 MatrixTimesMatrix 306 308
|
||||
310: 154(fvec4) Load 210(pos)
|
||||
311: 154(fvec4) MatrixTimesVector 309 310
|
||||
314: 312(ptr) AccessChain 300 54
|
||||
Store 314 311
|
||||
320: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 318 318 12 12
|
||||
319: 154(fvec4) Load 210(pos)
|
||||
321: 62(fvec3) VectorShuffle 319 319 0 1 2
|
||||
322: 62(fvec3) FNegate 321
|
||||
Store 315(outViewVec) 322
|
||||
330: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 326 326 12 12
|
||||
329: 327(ptr) AccessChain 273(ubo) 84
|
||||
331: 154(fvec4) Load 329
|
||||
332: 62(fvec3) VectorShuffle 331 331 0 1 2
|
||||
333: 62(fvec3) Load 315(outViewVec)
|
||||
334: 62(fvec3) FAdd 332 333
|
||||
335: 62(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 334
|
||||
Store 323(outLightVec) 335
|
||||
341: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 339 339 12 12
|
||||
340: 154(fvec4) Load 210(pos)
|
||||
342: 62(fvec3) VectorShuffle 340 340 0 1 2
|
||||
Store 336(outWorldPos) 342
|
||||
348: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 346 346 12 12
|
||||
347: 302(ptr) AccessChain 273(ubo) 59
|
||||
349: 243 Load 347
|
||||
350: 154(fvec4) Load 210(pos)
|
||||
351: 154(fvec4) MatrixTimesVector 349 350
|
||||
352: 28(float) CompositeExtract 351 0
|
||||
353: 28(float) CompositeExtract 351 1
|
||||
354: 28(float) CompositeExtract 351 2
|
||||
355: 62(fvec3) CompositeConstruct 352 353 354
|
||||
Store 343(outEyePos) 355
|
||||
306: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 297 297 12 12
|
||||
305: 303(ptr) AccessChain 273(ubo) 54
|
||||
307: 243 Load 305
|
||||
308: 303(ptr) AccessChain 273(ubo) 59
|
||||
309: 243 Load 308
|
||||
310: 243 MatrixTimesMatrix 307 309
|
||||
311: 154(fvec4) Load 210(pos)
|
||||
312: 154(fvec4) MatrixTimesVector 310 311
|
||||
315: 313(ptr) AccessChain 300 54
|
||||
Store 315 312
|
||||
321: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 319 319 12 12
|
||||
320: 154(fvec4) Load 210(pos)
|
||||
322: 62(fvec3) VectorShuffle 320 320 0 1 2
|
||||
323: 62(fvec3) FNegate 322
|
||||
Store 316(outViewVec) 323
|
||||
331: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 327 327 12 12
|
||||
330: 328(ptr) AccessChain 273(ubo) 84
|
||||
332: 154(fvec4) Load 330
|
||||
333: 62(fvec3) VectorShuffle 332 332 0 1 2
|
||||
334: 62(fvec3) Load 316(outViewVec)
|
||||
335: 62(fvec3) FAdd 333 334
|
||||
336: 62(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 335
|
||||
Store 324(outLightVec) 336
|
||||
342: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 340 340 12 12
|
||||
341: 154(fvec4) Load 210(pos)
|
||||
343: 62(fvec3) VectorShuffle 341 341 0 1 2
|
||||
Store 337(outWorldPos) 343
|
||||
349: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 347 347 12 12
|
||||
348: 303(ptr) AccessChain 273(ubo) 59
|
||||
350: 243 Load 348
|
||||
351: 154(fvec4) Load 210(pos)
|
||||
352: 154(fvec4) MatrixTimesVector 350 351
|
||||
353: 28(float) CompositeExtract 352 0
|
||||
354: 28(float) CompositeExtract 352 1
|
||||
355: 28(float) CompositeExtract 352 2
|
||||
356: 62(fvec3) CompositeConstruct 353 354 355
|
||||
Store 344(outEyePos) 356
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue