From afe6e781bd3ade96fb3f9cc91053d95bf9174dfb Mon Sep 17 00:00:00 2001 From: Sajjad Mirza <90873047+sajjadmirzanv@users.noreply.github.com> Date: Mon, 11 Sep 2023 17:11:22 -0700 Subject: [PATCH] Emit correct nonsemantic debug info for explicitly sized types Previously, the type names in the nonsemantic shader debug info would be "int", "uint", or "float" for all numeric types. This change makes the correct names such as "int8_t" or "float16_t" get emitted. --- SPIRV/SpvBuilder.cpp | 27 ++- .../spv.debuginfo.const_params.glsl.comp.out | 4 +- Test/baseResults/spv.debuginfo.glsl.comp.out | 10 +- Test/baseResults/spv.debuginfo.glsl.frag.out | 4 +- Test/baseResults/spv.debuginfo.glsl.geom.out | 4 +- Test/baseResults/spv.debuginfo.glsl.tesc.out | 4 +- Test/baseResults/spv.debuginfo.glsl.tese.out | 4 +- Test/baseResults/spv.debuginfo.glsl.vert.out | 4 +- Test/baseResults/spv.debuginfo.hlsl.comp.out | 40 ++-- Test/baseResults/spv.debuginfo.hlsl.frag.out | 56 ++--- Test/baseResults/spv.debuginfo.hlsl.geom.out | 26 +-- Test/baseResults/spv.debuginfo.hlsl.tesc.out | 32 +-- Test/baseResults/spv.debuginfo.hlsl.tese.out | 24 +-- Test/baseResults/spv.debuginfo.hlsl.vert.out | 24 +-- .../spv.debuginfo.scalar_types.glsl.frag.out | 196 ++++++++++++++++++ Test/spv.debuginfo.scalar_types.glsl.frag | 55 +++++ gtests/Spv.FromFile.cpp | 3 +- 17 files changed, 390 insertions(+), 127 deletions(-) create mode 100644 Test/baseResults/spv.debuginfo.scalar_types.glsl.frag.out create mode 100644 Test/spv.debuginfo.scalar_types.glsl.frag diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 57e03d5d..8aa6fbc3 100644 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -859,11 +859,19 @@ Id Builder::makeBoolDebugType(int const size) Id Builder::makeIntegerDebugType(int const width, bool const hasSign) { + const char* typeName = nullptr; + switch (width) { + case 8: typeName = hasSign ? "int8_t" : "uint8_t"; break; + case 16: typeName = hasSign ? "int16_t" : "uint16_t"; break; + case 64: typeName = hasSign ? "int64_t" : "uint64_t"; break; + default: typeName = hasSign ? "int" : "uint"; + } + auto nameId = getStringId(typeName); // try to find it Instruction* type; for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].size(); ++t) { type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic][t]; - if (type->getIdOperand(0) == (hasSign ? getStringId("int") : getStringId("uint")) && + if (type->getIdOperand(0) == nameId && type->getIdOperand(1) == static_cast(width) && type->getIdOperand(2) == (hasSign ? NonSemanticShaderDebugInfo100Signed : NonSemanticShaderDebugInfo100Unsigned)) return type->getResultId(); @@ -873,11 +881,7 @@ Id Builder::makeIntegerDebugType(int const width, bool const hasSign) type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeBasic); - if(hasSign == true) { - type->addIdOperand(getStringId("int")); // name id - } else { - type->addIdOperand(getStringId("uint")); // name id - } + type->addIdOperand(nameId); // name id type->addIdOperand(makeUintConstant(width)); // size id if(hasSign == true) { type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Signed)); // encoding id @@ -895,11 +899,18 @@ Id Builder::makeIntegerDebugType(int const width, bool const hasSign) Id Builder::makeFloatDebugType(int const width) { + const char* typeName = nullptr; + switch (width) { + case 16: typeName = "float16_t"; break; + case 64: typeName = "double"; break; + default: typeName = "float"; break; + } + auto nameId = getStringId(typeName); // try to find it Instruction* type; for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].size(); ++t) { type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic][t]; - if (type->getIdOperand(0) == getStringId("float") && + if (type->getIdOperand(0) == nameId && type->getIdOperand(1) == static_cast(width) && type->getIdOperand(2) == NonSemanticShaderDebugInfo100Float) return type->getResultId(); @@ -909,7 +920,7 @@ Id Builder::makeFloatDebugType(int const width) type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeBasic); - type->addIdOperand(getStringId("float")); // name id + type->addIdOperand(nameId); // name id type->addIdOperand(makeUintConstant(width)); // size id type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Float)); // encoding id type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100None)); // flags id diff --git a/Test/baseResults/spv.debuginfo.const_params.glsl.comp.out b/Test/baseResults/spv.debuginfo.const_params.glsl.comp.out index ad431a47..846e0e36 100644 --- a/Test/baseResults/spv.debuginfo.const_params.glsl.comp.out +++ b/Test/baseResults/spv.debuginfo.const_params.glsl.comp.out @@ -11,7 +11,7 @@ spv.debuginfo.const_params.glsl.comp EntryPoint GLCompute 14 "main" ExecutionMode 14 LocalSize 1 1 1 1: String "" - 9: String "uint" + 8: String "uint" 15: String "main" 18: String "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings @@ -39,7 +39,7 @@ spv.debuginfo.const_params.glsl.comp 10: 7(int) Constant 32 11: 7(int) Constant 6 12: 7(int) Constant 0 - 8: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 10 11 12 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 13: 7(int) Constant 3 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 diff --git a/Test/baseResults/spv.debuginfo.glsl.comp.out b/Test/baseResults/spv.debuginfo.glsl.comp.out index 234878f5..9026bf46 100644 --- a/Test/baseResults/spv.debuginfo.glsl.comp.out +++ b/Test/baseResults/spv.debuginfo.glsl.comp.out @@ -11,7 +11,7 @@ spv.debuginfo.glsl.comp EntryPoint GLCompute 14 "main" 124 ExecutionMode 14 LocalSize 10 10 1 1: String "" - 9: String "uint" + 8: String "uint" 15: String "main" 18: String "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings @@ -164,7 +164,7 @@ spv.debuginfo.glsl.comp 10: 7(int) Constant 32 11: 7(int) Constant 6 12: 7(int) Constant 0 - 8: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 10 11 12 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 13: 7(int) Constant 3 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 @@ -220,7 +220,7 @@ spv.debuginfo.glsl.comp 101: TypePointer Uniform 24(float) 115: 7(int) Constant 74 116: TypeVector 7(int) 3 - 117: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 8 13 + 117: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 13 118: TypePointer Function 116(ivec3) 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 121 117 17 115 12 16 21 123: TypePointer Input 116(ivec3) @@ -228,7 +228,7 @@ spv.debuginfo.glsl.comp 125: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 126 117 17 115 12 19 126 124(gl_GlobalInvocationID) 78 129: 7(int) Constant 76 130: TypePointer Function 7(int) - 132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 133 8 17 129 12 16 21 + 132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 133 9 17 129 12 16 21 137: 69(int) Constant 10 138: TypePointer Uniform 69(int) 147: 7(int) Constant 77 @@ -330,7 +330,7 @@ spv.debuginfo.glsl.comp 670: 7(int) Constant 144 671(PushConsts): TypeStruct 7(int) 674: 7(int) Constant 63 - 672: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 673 8 17 674 89 12 12 13 + 672: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 673 9 17 674 89 12 12 13 675: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 676 20 17 670 12 19 676 12 13 672 677: TypePointer PushConstant 671(PushConsts) 678(pushConsts): 677(ptr) Variable PushConstant diff --git a/Test/baseResults/spv.debuginfo.glsl.frag.out b/Test/baseResults/spv.debuginfo.glsl.frag.out index 72777c5f..464e3217 100644 --- a/Test/baseResults/spv.debuginfo.glsl.frag.out +++ b/Test/baseResults/spv.debuginfo.glsl.frag.out @@ -12,7 +12,7 @@ spv.debuginfo.glsl.frag EntryPoint Fragment 14 "main" 478 533 ExecutionMode 14 OriginUpperLeft 1: String "" - 9: String "uint" + 8: String "uint" 15: String "main" 18: String "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings @@ -187,7 +187,7 @@ spv.debuginfo.glsl.frag 10: 7(int) Constant 32 11: 7(int) Constant 6 12: 7(int) Constant 0 - 8: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 10 11 12 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 13: 7(int) Constant 3 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 diff --git a/Test/baseResults/spv.debuginfo.glsl.geom.out b/Test/baseResults/spv.debuginfo.glsl.geom.out index 58edd368..84b98074 100644 --- a/Test/baseResults/spv.debuginfo.glsl.geom.out +++ b/Test/baseResults/spv.debuginfo.glsl.geom.out @@ -15,7 +15,7 @@ spv.debuginfo.glsl.geom ExecutionMode 14 OutputTriangleStrip ExecutionMode 14 OutputVertices 3 1: String "" - 9: String "uint" + 8: String "uint" 15: String "main" 18: String "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings @@ -123,7 +123,7 @@ spv.debuginfo.glsl.geom 10: 7(int) Constant 32 11: 7(int) Constant 6 12: 7(int) Constant 0 - 8: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 10 11 12 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 13: 7(int) Constant 3 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 diff --git a/Test/baseResults/spv.debuginfo.glsl.tesc.out b/Test/baseResults/spv.debuginfo.glsl.tesc.out index f3e7d20e..b19528cb 100644 --- a/Test/baseResults/spv.debuginfo.glsl.tesc.out +++ b/Test/baseResults/spv.debuginfo.glsl.tesc.out @@ -11,7 +11,7 @@ spv.debuginfo.glsl.tesc EntryPoint TessellationControl 14 "main" 249 253 279 370 383 498 512 519 533 ExecutionMode 14 OutputVertices 4 1: String "" - 9: String "uint" + 8: String "uint" 15: String "main" 18: String "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings @@ -153,7 +153,7 @@ spv.debuginfo.glsl.tesc 10: 7(int) Constant 32 11: 7(int) Constant 6 12: 7(int) Constant 0 - 8: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 10 11 12 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 13: 7(int) Constant 3 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 diff --git a/Test/baseResults/spv.debuginfo.glsl.tese.out b/Test/baseResults/spv.debuginfo.glsl.tese.out index 0625c278..fdb1ee98 100644 --- a/Test/baseResults/spv.debuginfo.glsl.tese.out +++ b/Test/baseResults/spv.debuginfo.glsl.tese.out @@ -13,7 +13,7 @@ spv.debuginfo.glsl.tese ExecutionMode 14 SpacingEqual ExecutionMode 14 VertexOrderCw 1: String "" - 9: String "uint" + 8: String "uint" 15: String "main" 18: String "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings @@ -141,7 +141,7 @@ spv.debuginfo.glsl.tese 10: 7(int) Constant 32 11: 7(int) Constant 6 12: 7(int) Constant 0 - 8: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 10 11 12 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 13: 7(int) Constant 3 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 diff --git a/Test/baseResults/spv.debuginfo.glsl.vert.out b/Test/baseResults/spv.debuginfo.glsl.vert.out index e0c9d600..c4852550 100644 --- a/Test/baseResults/spv.debuginfo.glsl.vert.out +++ b/Test/baseResults/spv.debuginfo.glsl.vert.out @@ -10,7 +10,7 @@ spv.debuginfo.glsl.vert MemoryModel Logical GLSL450 EntryPoint Vertex 14 "main" 34 39 45 51 59 75 289 307 312 337 353 370 409 418 1: String "" - 9: String "uint" + 8: String "uint" 15: String "main" 18: String "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings @@ -127,7 +127,7 @@ spv.debuginfo.glsl.vert 10: 7(int) Constant 32 11: 7(int) Constant 6 12: 7(int) Constant 0 - 8: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 10 11 12 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 13: 7(int) Constant 3 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 diff --git a/Test/baseResults/spv.debuginfo.hlsl.comp.out b/Test/baseResults/spv.debuginfo.hlsl.comp.out index b427c616..30cd581a 100644 --- a/Test/baseResults/spv.debuginfo.hlsl.comp.out +++ b/Test/baseResults/spv.debuginfo.hlsl.comp.out @@ -11,8 +11,8 @@ spv.debuginfo.hlsl.comp EntryPoint GLCompute 6 "main" 971 ExecutionMode 6 LocalSize 10 10 1 1: String "" - 10: String "float" - 13: String "uint" + 9: String "float" + 12: String "uint" 28: String "springForce" 31: String "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings @@ -177,15 +177,15 @@ spv.debuginfo.hlsl.comp 14: 11(int) Constant 32 15: 11(int) Constant 6 16: 11(int) Constant 0 - 12: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 13 14 15 16 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 17: 11(int) Constant 3 - 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 10 14 17 16 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 18: TypeVector 8(float) 3 - 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 17 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 20: TypePointer Function 18(fvec3) 21: TypePointer Function 8(float) 22: TypeFunction 18(fvec3) 20(ptr) 20(ptr) 21(ptr) - 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 19 19 19 9 + 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 19 19 19 10 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 31 33: 11(int) Constant 1 34: 11(int) Constant 4 @@ -196,9 +196,9 @@ spv.debuginfo.hlsl.comp 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) 45: 11(int) Constant 2 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 44 19 30 16 16 29 34 45 - 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 48 9 30 16 16 29 34 17 + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 48 10 30 16 16 29 34 17 50: TypeVector 11(int) 3 - 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 12 17 + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 13 17 52: TypePointer Function 50(ivec3) 53: TypeFunction 4 52(ptr) 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 4 51 @@ -208,7 +208,7 @@ spv.debuginfo.hlsl.comp 70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 71 19 30 68 16 29 34 77: 11(int) Constant 77 80: TypeVector 8(float) 4 - 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 34 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 34 82: TypeInt 32 1 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 83 14 34 16 85: TypeVector 82(int) 2 @@ -216,14 +216,14 @@ spv.debuginfo.hlsl.comp 87(UBO): TypeStruct 8(float) 8(float) 8(float) 8(float) 8(float) 8(float) 8(float) 8(float) 80(fvec4) 80(fvec4) 85(ivec2) 90: 11(int) Constant 48 91: 11(int) Constant 20 - 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17 - 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17 - 93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17 - 94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17 - 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17 - 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17 - 97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17 - 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17 + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 101: 11(int) Constant 50 102: 11(int) Constant 16 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 100 81 30 101 102 16 16 17 @@ -245,7 +245,7 @@ spv.debuginfo.hlsl.comp 122: TypePointer Uniform 8(float) 136: 11(int) Constant 83 137: TypePointer Function 11(int) - 139: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 140 12 30 136 16 58 34 + 139: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 140 13 30 136 16 58 34 144: 82(int) Constant 10 145: TypePointer Uniform 82(int) 154: 11(int) Constant 84 @@ -262,7 +262,7 @@ spv.debuginfo.hlsl.comp 182: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 177 81 30 178 179 16 16 17 185: 11(int) Constant 31 186: 11(int) Constant 14 - 183: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 184 9 30 185 186 16 16 17 + 183: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 184 10 30 185 186 16 16 17 187: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 188 33 30 174 16 32 188 16 17 176 180 181 182 183 189: TypeRuntimeArray 175(Particle) 190: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 187 16 @@ -354,7 +354,7 @@ spv.debuginfo.hlsl.comp 667(PushConstants): TypeStruct 11(int) 670: 11(int) Constant 67 671: 11(int) Constant 23 - 668: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 669 12 30 670 671 16 16 17 + 668: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 669 13 30 670 671 16 16 17 672: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 673 33 30 666 16 32 673 16 17 668 674($Global): TypeStruct 667(PushConstants) 677: 11(int) Constant 71 diff --git a/Test/baseResults/spv.debuginfo.hlsl.frag.out b/Test/baseResults/spv.debuginfo.hlsl.frag.out index 5dad5493..600976c8 100644 --- a/Test/baseResults/spv.debuginfo.hlsl.frag.out +++ b/Test/baseResults/spv.debuginfo.hlsl.frag.out @@ -12,8 +12,8 @@ spv.debuginfo.hlsl.frag EntryPoint Fragment 6 "main" 879 882 ExecutionMode 6 OriginUpperLeft 1: String "" - 10: String "float" - 13: String "uint" + 9: String "float" + 12: String "uint" 33: String "textureProj" 36: String "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings @@ -216,20 +216,20 @@ spv.debuginfo.hlsl.frag 14: 11(int) Constant 32 15: 11(int) Constant 6 16: 11(int) Constant 0 - 12: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 13 14 15 16 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 17: 11(int) Constant 3 - 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 10 14 17 16 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 18: TypeVector 8(float) 4 19: 11(int) Constant 4 - 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 19 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 19 21: TypePointer Function 18(fvec4) 22: TypePointer Function 8(float) 23: TypeVector 8(float) 2 24: 11(int) Constant 2 - 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 24 + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 24 26: TypePointer Function 23(fvec2) 27: TypeFunction 8(float) 21(ptr) 22(ptr) 26(ptr) - 28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 9 20 9 25 + 28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 10 20 10 25 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 36 38: 11(int) Constant 1 39: 11(int) Constant 5 @@ -237,15 +237,15 @@ spv.debuginfo.hlsl.frag 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 33 28 35 16 16 37 33 17 16 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 44 20 35 16 16 34 19 38 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) - 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 48 9 35 16 16 34 19 24 + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 48 10 35 16 16 34 19 24 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 51 25 35 16 16 34 19 17 53: TypeFunction 8(float) 21(ptr) 22(ptr) - 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 9 20 9 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 10 20 10 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 58 54 35 16 16 37 58 17 16 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 64 20 35 16 16 59 19 38 - 66: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 48 9 35 16 16 59 19 24 + 66: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 48 10 35 16 16 59 19 24 68: TypeVector 8(float) 3 - 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 17 + 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 70: TypePointer Function 68(fvec3) 71: TypeFunction 68(fvec3) 70(ptr) 70(ptr) 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 69 69 69 @@ -257,7 +257,7 @@ spv.debuginfo.hlsl.frag 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 91 88 35 16 16 37 91 17 16 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 97 25 35 16 16 92 19 38 102: 11(int) Constant 62 - 104: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 76 9 35 102 16 34 19 + 104: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 76 10 35 102 16 34 19 106: 8(float) Constant 1065353216 108: 11(int) Constant 63 110: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 111 20 35 108 16 34 19 @@ -270,7 +270,7 @@ spv.debuginfo.hlsl.frag 141: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 143: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 149: 11(int) Constant 68 - 151: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 152 9 35 149 16 34 19 + 151: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 152 10 35 149 16 34 19 154: TypeImage 8(float) 2D array sampled format:Unknown 158: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) 155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 156 16 35 149 16 37 157 158 17 @@ -295,7 +295,7 @@ spv.debuginfo.hlsl.frag 211: 11(int) Constant 74 218: 11(int) Constant 80 219: TypeVector 11(int) 3 - 220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 12 17 + 220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 13 17 221: TypePointer Function 219(ivec3) 223: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 224 220 35 218 16 59 19 228: TypeInt 32 1 @@ -309,14 +309,14 @@ spv.debuginfo.hlsl.frag 249: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 250 230 35 218 16 59 19 256: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 257 230 35 218 16 59 19 263: 11(int) Constant 81 - 265: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 266 9 35 263 16 59 19 + 265: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 266 10 35 263 16 59 19 268: 8(float) Constant 1069547520 270: 11(int) Constant 82 - 272: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 273 9 35 270 16 59 19 + 272: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 273 10 35 270 16 59 19 282: 11(int) Constant 83 - 284: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 285 9 35 282 16 59 19 + 284: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 285 10 35 282 16 59 19 294: 11(int) Constant 85 - 296: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 297 9 35 294 16 59 19 + 296: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 297 10 35 294 16 59 19 300: 11(int) Constant 86 302: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 303 230 35 300 16 59 19 305: 228(int) Constant 0 @@ -372,7 +372,7 @@ spv.debuginfo.hlsl.frag 468: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 465 35 420 16 37 1 467 163 470: TypePointer Uniform 430 475: 11(int) Constant 108 - 477: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 297 9 35 475 16 77 19 + 477: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 297 10 35 475 16 77 19 486: 11(int) Constant 113 496: 11(int) Constant 115 503: 11(int) Constant 121 @@ -429,36 +429,36 @@ spv.debuginfo.hlsl.frag 672: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 673 69 35 670 16 92 19 676: TypePointer Uniform 18(fvec4) 683: 11(int) Constant 159 - 685: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 152 9 35 683 16 92 19 + 685: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 152 10 35 683 16 92 19 690: 11(int) Constant 160 694: 11(int) Constant 163 696: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 697 69 35 694 16 92 19 705: 11(int) Constant 164 709: 11(int) Constant 166 - 711: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 712 9 35 709 16 92 19 + 711: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 712 10 35 709 16 92 19 714: 8(float) Constant 1064781546 716: 11(int) Constant 167 - 718: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 719 9 35 716 16 92 19 + 718: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 719 10 35 716 16 92 19 721: 8(float) Constant 1063781322 723: 11(int) Constant 168 - 725: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 726 9 35 723 16 92 19 + 725: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 726 10 35 723 16 92 19 728: 8(float) Constant 1120403456 730: 11(int) Constant 171 732: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 733 69 35 730 16 92 19 746: 11(int) Constant 174 - 748: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 749 9 35 746 16 92 19 + 748: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 749 10 35 746 16 92 19 755: 11(int) Constant 175 - 757: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 758 9 35 755 16 92 19 + 757: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 758 10 35 755 16 92 19 765: 11(int) Constant 176 - 767: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 768 9 35 765 16 92 19 + 767: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 768 10 35 765 16 92 19 774: 11(int) Constant 179 - 776: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 777 9 35 774 16 92 19 + 776: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 777 10 35 774 16 92 19 784: 11(int) Constant 180 786: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 787 69 35 784 16 92 19 792: 11(int) Constant 183 794: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 795 69 35 792 16 92 19 802: 11(int) Constant 184 - 804: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 805 9 35 802 16 92 19 + 804: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 805 10 35 802 16 92 19 812: 11(int) Constant 185 814: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 815 69 35 812 16 92 19 818: 8(float) Constant 1098907648 diff --git a/Test/baseResults/spv.debuginfo.hlsl.geom.out b/Test/baseResults/spv.debuginfo.hlsl.geom.out index 3bb8b318..c4d39a1f 100644 --- a/Test/baseResults/spv.debuginfo.hlsl.geom.out +++ b/Test/baseResults/spv.debuginfo.hlsl.geom.out @@ -15,8 +15,8 @@ spv.debuginfo.hlsl.geom ExecutionMode 6 OutputTriangleStrip ExecutionMode 6 OutputVertices 3 1: String "" - 10: String "float" - 13: String "uint" + 9: String "float" + 12: String "uint" 25: String "Pos" 27: String "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings @@ -137,14 +137,14 @@ spv.debuginfo.hlsl.geom 14: 11(int) Constant 32 15: 11(int) Constant 6 16: 11(int) Constant 0 - 12: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 13 14 15 16 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 17: 11(int) Constant 3 - 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 10 14 17 16 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 18: TypeVector 8(float) 4 19: 11(int) Constant 4 - 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 19 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 19 21: TypeVector 8(float) 3 - 22: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 17 + 22: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 23(VSOutput): TypeStruct 18(fvec4) 21(fvec3) 21(fvec3) 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 27 28: 11(int) Constant 37 @@ -166,8 +166,8 @@ spv.debuginfo.hlsl.geom 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 25 20 26 45 29 16 16 17 48: 11(int) Constant 46 49: 11(int) Constant 19 - 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 12 26 48 49 16 16 17 - 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 12 26 48 49 16 16 17 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 13 26 48 49 16 16 17 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 13 26 48 49 16 16 17 53: 11(int) Constant 50 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17 @@ -177,14 +177,14 @@ spv.debuginfo.hlsl.geom 59: TypePointer Function 43(GSOutput) 60: TypePointer Function 11(int) 61: TypeFunction 4 42(ptr) 59(ptr) 60(ptr) 60(ptr) - 62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 4 41 57 12 12 + 62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 4 41 57 13 13 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 68 62 26 16 16 38 68 17 16 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 74 41 26 16 16 69 19 37 76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) 79: 11(int) Constant 2 77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 78 57 26 16 16 69 19 79 - 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 82 12 26 16 16 69 19 17 - 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 47 12 26 16 16 69 19 19 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 82 13 26 16 16 69 19 17 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 47 13 26 16 16 69 19 19 89: 11(int) Constant 57 90: TypeInt 32 1 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 91 14 19 16 @@ -256,9 +256,9 @@ spv.debuginfo.hlsl.geom 256: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 257 20 26 253 16 38 257 255(outStream.Pos) 162 260: TypePointer Output 11(int) 261(outStream.ViewportIndex): 260(ptr) Variable Output - 262: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 263 12 26 253 16 38 263 261(outStream.ViewportIndex) 162 + 262: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 263 13 26 253 16 38 263 261(outStream.ViewportIndex) 162 266(outStream.PrimitiveID): 260(ptr) Variable Output - 267: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 268 12 26 253 16 38 268 266(outStream.PrimitiveID) 162 + 267: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 268 13 26 253 16 38 268 266(outStream.PrimitiveID) 162 271: TypePointer Output 21(fvec3) 272(outStream.Normal): 271(ptr) Variable Output 273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 274 22 26 253 16 38 274 272(outStream.Normal) 162 diff --git a/Test/baseResults/spv.debuginfo.hlsl.tesc.out b/Test/baseResults/spv.debuginfo.hlsl.tesc.out index aa419a43..998eef5f 100644 --- a/Test/baseResults/spv.debuginfo.hlsl.tesc.out +++ b/Test/baseResults/spv.debuginfo.hlsl.tesc.out @@ -16,8 +16,8 @@ WARNING: 0:158: '' : attribute does not apply to entry point ExecutionMode 6 SpacingEqual ExecutionMode 6 VertexOrderCw 1: String "" - 10: String "float" - 13: String "uint" + 9: String "float" + 12: String "uint" 27: String "screenSpaceTessFactor" 30: String "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings @@ -180,15 +180,15 @@ WARNING: 0:158: '' : attribute does not apply to entry point 14: 11(int) Constant 32 15: 11(int) Constant 6 16: 11(int) Constant 0 - 12: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 13 14 15 16 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 17: 11(int) Constant 3 - 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 10 14 17 16 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 18: TypeVector 8(float) 4 19: 11(int) Constant 4 - 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 19 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 19 21: TypePointer Function 18(fvec4) 22: TypeFunction 8(float) 21(ptr) 21(ptr) - 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 9 20 20 + 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 10 20 20 29: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 30 32: 11(int) Constant 1 33: 11(int) Constant 5 @@ -199,7 +199,7 @@ WARNING: 0:158: '' : attribute does not apply to entry point 43: 11(int) Constant 2 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 42 20 29 16 16 28 19 43 45: TypeVector 8(float) 2 - 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 43 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 43 47: TypePointer Function 45(fvec2) 48: TypeBool 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 49 14 43 16 @@ -209,7 +209,7 @@ WARNING: 0:158: '' : attribute does not apply to entry point 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 62 20 29 16 16 57 19 32 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 65 46 29 16 16 57 19 43 67: TypeVector 8(float) 3 - 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 17 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 69(VSOutput): TypeStruct 18(fvec4) 67(fvec3) 45(fvec2) 71: 11(int) Constant 44 72: 11(int) Constant 13 @@ -225,9 +225,9 @@ WARNING: 0:158: '' : attribute does not apply to entry point 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 81 19 85: TypePointer Function 83 86: TypeArray 8(float) 19 - 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 9 19 + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 10 19 88: TypeArray 8(float) 43 - 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 9 43 + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 10 43 90(ConstantsHSOutput): TypeStruct 86 88 93: 11(int) Constant 58 94: 11(int) Constant 25 @@ -249,16 +249,16 @@ WARNING: 0:158: '' : attribute does not apply to entry point 118: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 78 46 29 119 80 16 16 17 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 121 32 29 16 16 31 121 16 17 114 116 118 122: TypeFunction 113(HSOutput) 85(ptr) 112(ptr) - 123: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 120 84 12 + 123: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 120 84 13 128: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 127 123 29 16 16 31 127 17 16 132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 110 84 29 16 16 128 19 32 - 134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 135 12 29 16 16 128 19 43 + 134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 135 13 29 16 16 128 19 43 140: 11(int) Constant 67 142: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 143 20 29 140 16 28 19 145: 8(float) Constant 1056964608 151: 11(int) Constant 69 152: TypePointer Function 8(float) - 154: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 155 9 29 151 16 28 19 + 154: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 155 10 29 151 16 28 19 160: 8(float) Constant 1073741824 163: 11(int) Constant 72 165: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 166 20 29 163 16 28 19 @@ -278,11 +278,11 @@ WARNING: 0:158: '' : attribute does not apply to entry point 186: 11(int) Constant 22 184: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 185 173 29 80 186 16 16 17 189: 11(int) Constant 27 - 187: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 188 9 29 76 189 16 16 17 - 190: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 188 9 29 76 189 16 16 17 + 187: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 188 10 29 76 189 16 16 17 + 190: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 188 10 29 76 189 16 16 17 193: 11(int) Constant 34 191: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 192 46 29 193 178 16 16 17 - 194: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 188 9 29 76 189 16 16 17 + 194: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 188 10 29 76 189 16 16 17 195: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 196 32 29 163 16 31 196 16 17 175 179 180 184 187 190 191 194 197(ubo): TypeStruct 174(UBO) 200: 11(int) Constant 37 diff --git a/Test/baseResults/spv.debuginfo.hlsl.tese.out b/Test/baseResults/spv.debuginfo.hlsl.tese.out index d5b571c8..d0901eb6 100644 --- a/Test/baseResults/spv.debuginfo.hlsl.tese.out +++ b/Test/baseResults/spv.debuginfo.hlsl.tese.out @@ -11,8 +11,8 @@ spv.debuginfo.hlsl.tese EntryPoint TessellationEvaluation 6 "main" 352 367 376 385 392 398 438 442 446 449 452 455 458 ExecutionMode 6 Quads 1: String "" - 10: String "float" - 13: String "uint" + 9: String "float" + 12: String "uint" 26: String "TessLevelOuter" 28: String "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings @@ -164,15 +164,15 @@ spv.debuginfo.hlsl.tese 14: 11(int) Constant 32 15: 11(int) Constant 6 16: 11(int) Constant 0 - 12: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 13 14 15 16 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 17: 11(int) Constant 3 - 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 10 14 17 16 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 18: 11(int) Constant 4 19: TypeArray 8(float) 18 - 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 9 18 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 10 18 21: 11(int) Constant 2 22: TypeArray 8(float) 21 - 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 9 21 + 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 10 21 24(ConstantsHSOutput): TypeStruct 19 22 27: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 28 29: 11(int) Constant 51 @@ -186,12 +186,12 @@ spv.debuginfo.hlsl.tese 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 35 36 27 16 16 37 35 16 17 25 31 39: TypePointer Function 24(ConstantsHSOutput) 40: TypeVector 8(float) 2 - 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 21 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 21 42: TypePointer Function 40(fvec2) 43: TypeVector 8(float) 4 - 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 18 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 18 45: TypeVector 8(float) 3 - 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 17 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 47(HSOutput): TypeStruct 43(fvec4) 45(fvec3) 40(fvec2) 50: 11(int) Constant 44 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 49 44 27 50 14 16 16 17 @@ -290,11 +290,11 @@ spv.debuginfo.hlsl.tese 275: 11(int) Constant 22 273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 274 262 27 58 275 16 16 17 278: 11(int) Constant 27 - 276: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 277 9 27 54 278 16 16 17 - 279: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 277 9 27 54 278 16 16 17 + 276: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 277 10 27 54 278 16 16 17 + 279: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 277 10 27 54 278 16 16 17 282: 11(int) Constant 34 280: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 281 41 27 282 267 16 16 17 - 283: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 277 9 27 54 278 16 16 17 + 283: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 277 10 27 54 278 16 16 17 284: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 285 36 27 227 16 37 285 16 17 264 268 269 273 276 279 280 283 286(ubo): TypeStruct 263(UBO) 287: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 288 284 27 70 70 16 16 17 diff --git a/Test/baseResults/spv.debuginfo.hlsl.vert.out b/Test/baseResults/spv.debuginfo.hlsl.vert.out index 2fa1774b..94431edd 100644 --- a/Test/baseResults/spv.debuginfo.hlsl.vert.out +++ b/Test/baseResults/spv.debuginfo.hlsl.vert.out @@ -10,8 +10,8 @@ spv.debuginfo.hlsl.vert MemoryModel Logical GLSL450 EntryPoint Vertex 6 "main" 444 447 451 454 457 460 464 468 476 480 483 486 489 492 1: String "" - 10: String "float" - 13: String "uint" + 9: String "float" + 12: String "uint" 24: String "int" 29: String "instanceRot" 31: String "// OpModuleProcessed auto-map-locations @@ -138,14 +138,14 @@ spv.debuginfo.hlsl.vert 14: 11(int) Constant 32 15: 11(int) Constant 6 16: 11(int) Constant 0 - 12: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 13 14 15 16 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 17: 11(int) Constant 3 - 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 10 14 17 16 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 18: TypeVector 8(float) 3 - 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 17 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 20: TypeVector 8(float) 2 21: 11(int) Constant 2 - 22: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 21 + 22: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 21 23: TypeInt 32 1 26: 11(int) Constant 4 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 24 14 26 16 @@ -163,7 +163,7 @@ spv.debuginfo.hlsl.vert 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 29 19 30 32 33 16 16 17 44: 11(int) Constant 36 45: 11(int) Constant 41 - 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 43 9 30 44 45 16 16 17 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 43 10 30 44 45 16 16 17 48: 11(int) Constant 37 49: 11(int) Constant 42 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 25 30 48 49 16 16 17 @@ -173,7 +173,7 @@ spv.debuginfo.hlsl.vert 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 51 52 30 16 16 53 51 16 17 28 34 35 39 40 41 42 46 55: TypePointer Function 27(VSInput) 56: TypeVector 8(float) 4 - 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 26 + 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 26 58(VSOutput): TypeStruct 56(fvec4) 18(fvec3) 18(fvec3) 18(fvec3) 18(fvec3) 18(fvec3) 61: 11(int) Constant 53 62: 11(int) Constant 13 @@ -207,7 +207,7 @@ spv.debuginfo.hlsl.vert 112: TypePointer Function 23(int) 121: 11(int) Constant 68 122: TypePointer Function 8(float) - 124: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 125 9 30 121 16 77 26 + 124: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 125 10 30 121 16 77 26 127: 23(int) Constant 5 130: TypeMatrix 56(fvec4) 4 132: TypeBool @@ -222,8 +222,8 @@ spv.debuginfo.hlsl.vert 143: 11(int) Constant 17 140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 141 57 30 142 143 16 16 17 146: 11(int) Constant 46 - 144: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 145 9 30 146 143 16 16 17 - 147: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 145 9 30 146 143 16 16 17 + 144: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 145 10 30 146 143 16 16 17 + 147: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 145 10 30 146 143 16 16 17 148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 149 52 30 121 16 53 149 16 17 135 139 140 144 147 150(ubo): TypeStruct 134(UBO) 153: 11(int) Constant 49 @@ -236,7 +236,7 @@ spv.debuginfo.hlsl.vert 159: 23(int) Constant 0 160: TypePointer Uniform 8(float) 166: 11(int) Constant 69 - 168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 169 9 30 166 16 77 26 + 168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 169 10 30 166 16 77 26 178: 11(int) Constant 71 179: TypeMatrix 18(fvec3) 3 180: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 19 17 133 diff --git a/Test/baseResults/spv.debuginfo.scalar_types.glsl.frag.out b/Test/baseResults/spv.debuginfo.scalar_types.glsl.frag.out new file mode 100644 index 00000000..30ad60c8 --- /dev/null +++ b/Test/baseResults/spv.debuginfo.scalar_types.glsl.frag.out @@ -0,0 +1,196 @@ +spv.debuginfo.scalar_types.glsl.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 146 + + Capability Shader + Capability Float16 + Capability Float64 + Capability Int64 + Capability Int16 + Capability Int8 + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 14 "main" + ExecutionMode 14 OriginUpperLeft + 1: String "" + 8: String "uint" + 15: String "main" + 18: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 29: String "bool" + 34: String "VAR_bool" + 41: String "int" + 46: String "VAR_int" + 53: String "VAR_uint" + 57: String "float" + 62: String "VAR_float" + 67: String "double" + 73: String "VAR_double" + 78: String "int8_t" + 83: String "VAR_int8_t" + 88: String "uint8_t" + 93: String "VAR_uint8_t" + 98: String "int16_t" + 104: String "VAR_int16_t" + 109: String "uint16_t" + 114: String "VAR_uint16_t" + 119: String "int64_t" + 124: String "VAR_int64_t" + 129: String "uint64_t" + 134: String "VAR_uint64_t" + 139: String "float16_t" + 144: String "VAR_float16_t" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + Name 14 "main" + Name 32 "VAR_bool" + Name 44 "VAR_int" + Name 51 "VAR_uint" + Name 60 "VAR_float" + Name 71 "VAR_double" + Name 81 "VAR_int8_t" + Name 91 "VAR_uint8_t" + Name 102 "VAR_int16_t" + Name 112 "VAR_uint16_t" + Name 122 "VAR_int64_t" + Name 132 "VAR_uint64_t" + Name 142 "VAR_float16_t" + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 + 20: 7(int) Constant 1 + 21: 7(int) Constant 4 + 22: 7(int) Constant 2 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22 + 16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12 + 27: 7(int) Constant 43 + 28: TypeBool + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 29 10 22 12 + 31: TypePointer Private 28(bool) + 32(VAR_bool): 31(ptr) Variable Private + 35: 7(int) Constant 8 + 33: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 34 30 17 27 12 19 34 32(VAR_bool) 35 + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 29 10 22 12 + 37: 28(bool) ConstantFalse + 39: 7(int) Constant 44 + 40: TypeInt 32 1 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 41 10 21 12 + 43: TypePointer Private 40(int) + 44(VAR_int): 43(ptr) Variable Private + 45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 46 42 17 39 12 19 46 44(VAR_int) 35 + 47: 40(int) Constant 0 + 49: 7(int) Constant 45 + 50: TypePointer Private 7(int) + 51(VAR_uint): 50(ptr) Variable Private + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 53 9 17 49 12 19 53 51(VAR_uint) 35 + 55: 7(int) Constant 46 + 56: TypeFloat 32 + 58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 57 10 13 12 + 59: TypePointer Private 56(float) + 60(VAR_float): 59(ptr) Variable Private + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 62 58 17 55 12 19 62 60(VAR_float) 35 + 63: 56(float) Constant 0 + 65: 7(int) Constant 47 + 66: TypeFloat 64 + 69: 7(int) Constant 64 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 67 69 13 12 + 70: TypePointer Private 66(float64_t) + 71(VAR_double): 70(ptr) Variable Private + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 73 68 17 65 12 19 73 71(VAR_double) 35 + 74:66(float64_t) Constant 0 0 + 76: 7(int) Constant 48 + 77: TypeInt 8 1 + 79: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 78 35 21 12 + 80: TypePointer Private 77(int8_t) + 81(VAR_int8_t): 80(ptr) Variable Private + 82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 83 79 17 76 12 19 83 81(VAR_int8_t) 35 + 84: 77(int8_t) Constant 0 + 86: 7(int) Constant 49 + 87: TypeInt 8 0 + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 88 35 11 12 + 90: TypePointer Private 87(int8_t) + 91(VAR_uint8_t): 90(ptr) Variable Private + 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 93 89 17 86 12 19 93 91(VAR_uint8_t) 35 + 94: 87(int8_t) Constant 0 + 96: 7(int) Constant 50 + 97: TypeInt 16 1 + 100: 7(int) Constant 16 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 98 100 21 12 + 101: TypePointer Private 97(int16_t) +102(VAR_int16_t): 101(ptr) Variable Private + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 104 99 17 96 12 19 104 102(VAR_int16_t) 35 + 105: 97(int16_t) Constant 0 + 107: 7(int) Constant 51 + 108: TypeInt 16 0 + 110: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 109 100 11 12 + 111: TypePointer Private 108(int16_t) +112(VAR_uint16_t): 111(ptr) Variable Private + 113: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 114 110 17 107 12 19 114 112(VAR_uint16_t) 35 + 115:108(int16_t) Constant 0 + 117: 7(int) Constant 52 + 118: TypeInt 64 1 + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 119 69 21 12 + 121: TypePointer Private 118(int64_t) +122(VAR_int64_t): 121(ptr) Variable Private + 123: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 124 120 17 117 12 19 124 122(VAR_int64_t) 35 + 125:118(int64_t) Constant 0 0 + 127: 7(int) Constant 53 + 128: TypeInt 64 0 + 130: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 129 69 11 12 + 131: TypePointer Private 128(int64_t) +132(VAR_uint64_t): 131(ptr) Variable Private + 133: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 134 130 17 127 12 19 134 132(VAR_uint64_t) 35 + 135:128(int64_t) Constant 0 0 + 137: 7(int) Constant 54 + 138: TypeFloat 16 + 140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 139 100 13 12 + 141: TypePointer Private 138(float16_t) +142(VAR_float16_t): 141(ptr) Variable Private + 143: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 144 140 17 137 12 19 144 142(VAR_float16_t) 35 + 145:138(float16_t) Constant 0 + Line 1 42 11 + 14(main): 4 Function None 5 + 23: Label + 24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main) + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12 + Store 32(VAR_bool) 37 + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 39 39 12 12 + Store 44(VAR_int) 47 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 49 49 12 12 + Store 51(VAR_uint) 12 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 55 55 12 12 + Store 60(VAR_float) 63 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 65 65 12 12 + Store 71(VAR_double) 74 + 75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 76 76 12 12 + Store 81(VAR_int8_t) 84 + 85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 86 86 12 12 + Store 91(VAR_uint8_t) 94 + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 96 96 12 12 + Store 102(VAR_int16_t) 105 + 106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 107 107 12 12 + Store 112(VAR_uint16_t) 115 + 116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 117 117 12 12 + Store 122(VAR_int64_t) 125 + 126: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 127 127 12 12 + Store 132(VAR_uint64_t) 135 + 136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 137 137 12 12 + Store 142(VAR_float16_t) 145 + Return + FunctionEnd diff --git a/Test/spv.debuginfo.scalar_types.glsl.frag b/Test/spv.debuginfo.scalar_types.glsl.frag new file mode 100644 index 00000000..36595ea7 --- /dev/null +++ b/Test/spv.debuginfo.scalar_types.glsl.frag @@ -0,0 +1,55 @@ +/* +The MIT License (MIT) + +Copyright (c) 2023 NVIDIA CORPORATION. + +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 460 + +#extension GL_EXT_shader_explicit_arithmetic_types : require + +bool VAR_bool; +int VAR_int; +uint VAR_uint; +float VAR_float; +double VAR_double; +int8_t VAR_int8_t; +uint8_t VAR_uint8_t; +int16_t VAR_int16_t; +uint16_t VAR_uint16_t; +int64_t VAR_int64_t; +uint64_t VAR_uint64_t; +float16_t VAR_float16_t; + +void main() { + VAR_bool = bool(0); + VAR_int = int(0); + VAR_uint = uint(0); + VAR_float = float(0); + VAR_double = double(0); + VAR_int8_t = int8_t(0); + VAR_uint8_t = uint8_t(0); + VAR_int16_t = int16_t(0); + VAR_uint16_t = uint16_t(0); + VAR_int64_t = int64_t(0); + VAR_uint64_t = uint64_t(0); + VAR_float16_t = float16_t(0); +} \ No newline at end of file diff --git a/gtests/Spv.FromFile.cpp b/gtests/Spv.FromFile.cpp index ee8f8f2a..81b84d1f 100644 --- a/gtests/Spv.FromFile.cpp +++ b/gtests/Spv.FromFile.cpp @@ -902,7 +902,8 @@ INSTANTIATE_TEST_SUITE_P( "spv.debuginfo.glsl.geom", "spv.debuginfo.glsl.tesc", "spv.debuginfo.glsl.tese", - "spv.debuginfo.const_params.glsl.comp" + "spv.debuginfo.const_params.glsl.comp", + "spv.debuginfo.scalar_types.glsl.frag", })), FileNameAsCustomTestSuffix );