mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Externals: Update glslang.
This updates glslang to commit 4fc7a33910fb8e40b970d160e1b38ab3f67fe0f3 which is the current version listed in the known_good.json file for the version 1.2.131.2 of the Vulkan-ValidationLayers repo.
This commit is contained in:
77
Externals/glslang/gtests/Hlsl.FromFile.cpp
vendored
Normal file → Executable file
77
Externals/glslang/gtests/Hlsl.FromFile.cpp
vendored
Normal file → Executable file
@ -61,20 +61,23 @@ using HlslCompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointP
|
||||
using HlslVulkan1_1CompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
using HlslCompileAndFlattenTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
using HlslLegalizeTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
using HlslDebugTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
using HlslDX9CompatibleTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
using HlslLegalDebugTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
|
||||
|
||||
// Compiling HLSL to pre-legalized SPIR-V under Vulkan semantics. Expected
|
||||
// to successfully generate both AST and SPIR-V.
|
||||
TEST_P(HlslCompileTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
||||
Source::HLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0,
|
||||
Source::HLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::BothASTAndSpv, true, GetParam().entryPoint);
|
||||
}
|
||||
|
||||
TEST_P(HlslVulkan1_1CompileTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
||||
Source::HLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_1,
|
||||
Source::HLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_1, glslang::EShTargetSpv_1_3,
|
||||
Target::BothASTAndSpv, true, GetParam().entryPoint);
|
||||
}
|
||||
|
||||
@ -90,11 +93,41 @@ TEST_P(HlslCompileAndFlattenTest, FromFile)
|
||||
TEST_P(HlslLegalizeTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
||||
Source::HLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0,
|
||||
Source::HLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::Spv, true, GetParam().entryPoint,
|
||||
"/baseLegalResults/", true);
|
||||
}
|
||||
|
||||
// Compiling HLSL to pre-legalized SPIR-V. Expected to successfully generate
|
||||
// SPIR-V with debug instructions, particularly line info.
|
||||
TEST_P(HlslDebugTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
||||
Source::HLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::Spv, true, GetParam().entryPoint,
|
||||
"/baseResults/", false, true);
|
||||
}
|
||||
|
||||
TEST_P(HlslDX9CompatibleTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheckWithOptions(GlobalTestSettings.testRoot, GetParam().fileName, Source::HLSL,
|
||||
Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::BothASTAndSpv, true,
|
||||
GetParam().entryPoint, "/baseResults/",
|
||||
EShMessages::EShMsgHlslDX9Compatible);
|
||||
}
|
||||
|
||||
// Compiling HLSL to legalized SPIR-V with debug instructions. Expected to
|
||||
// successfully generate SPIR-V with debug instructions preserved through
|
||||
// legalization, particularly line info.
|
||||
TEST_P(HlslLegalDebugTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
||||
Source::HLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::Spv, true, GetParam().entryPoint,
|
||||
"/baseResults/", true, true);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
ToSpirv, HlslCompileTest,
|
||||
@ -153,6 +186,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
{"hlsl.depthLess.frag", "PixelShaderFunction"},
|
||||
{"hlsl.discard.frag", "PixelShaderFunction"},
|
||||
{"hlsl.doLoop.frag", "PixelShaderFunction"},
|
||||
{"hlsl.earlydepthstencil.frag", "main"},
|
||||
{"hlsl.emptystructreturn.frag", "main"},
|
||||
{"hlsl.emptystructreturn.vert", "main"},
|
||||
{"hlsl.emptystruct.init.vert", "main"},
|
||||
@ -196,6 +230,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
{"hlsl.hull.void.tesc", "main"},
|
||||
{"hlsl.hull.ctrlpt-1.tesc", "main"},
|
||||
{"hlsl.hull.ctrlpt-2.tesc", "main"},
|
||||
{"hlsl.format.rwtexture.frag", "main"},
|
||||
{"hlsl.groupid.comp", "main"},
|
||||
{"hlsl.identifier.sample.frag", "main"},
|
||||
{"hlsl.if.frag", "PixelShaderFunction"},
|
||||
@ -317,7 +352,9 @@ INSTANTIATE_TEST_CASE_P(
|
||||
{"hlsl.shapeConvRet.frag", "main"},
|
||||
{"hlsl.self_cast.frag", "main"},
|
||||
{"hlsl.snorm.uav.comp", "main"},
|
||||
{"hlsl.specConstant.frag", "main"},
|
||||
{"hlsl.staticMemberFunction.frag", "main"},
|
||||
{"hlsl.staticFuncInit.frag", "main"},
|
||||
{"hlsl.store.rwbyteaddressbuffer.type.comp", "main"},
|
||||
{"hlsl.stringtoken.frag", "main"},
|
||||
{"hlsl.string.frag", "main"},
|
||||
@ -381,7 +418,8 @@ INSTANTIATE_TEST_CASE_P(
|
||||
{"hlsl.typeGraphCopy.vert", "main"},
|
||||
{"hlsl.typedef.frag", "PixelShaderFunction"},
|
||||
{"hlsl.whileLoop.frag", "PixelShaderFunction"},
|
||||
{"hlsl.void.frag", "PixelShaderFunction"}
|
||||
{"hlsl.void.frag", "PixelShaderFunction"},
|
||||
{"hlsl.type.type.conversion.all.frag", "main"}
|
||||
}),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
@ -398,6 +436,8 @@ INSTANTIATE_TEST_CASE_P(
|
||||
{"hlsl.wavequery.frag", "PixelShaderFunction"},
|
||||
{"hlsl.wavereduction.comp", "CSMain"},
|
||||
{"hlsl.wavevote.comp", "CSMain"},
|
||||
{ "hlsl.type.type.conversion.valid.frag", "main" },
|
||||
{"hlsl.int.dot.frag", "main"}
|
||||
}),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
@ -433,5 +473,34 @@ INSTANTIATE_TEST_CASE_P(
|
||||
// clang-format on
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
ToSpirv, HlslDebugTest,
|
||||
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
|
||||
{"hlsl.pp.line2.frag", "MainPs"}
|
||||
}),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
ToSpirv, HlslDX9CompatibleTest,
|
||||
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
|
||||
{"hlsl.sample.dx9.frag", "main"},
|
||||
{"hlsl.sample.dx9.vert", "main"},
|
||||
}),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
||||
// clang-format off
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
ToSpirv, HlslLegalDebugTest,
|
||||
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
|
||||
{"hlsl.pp.line4.frag", "MainPs"}
|
||||
}),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
||||
// clang-format on
|
||||
|
||||
} // anonymous namespace
|
||||
} // namespace glslangtest
|
||||
|
Reference in New Issue
Block a user