From e9137cd1dc064dae2e7129203cb1c64153309c91 Mon Sep 17 00:00:00 2001 From: Greg Roth Date: Wed, 13 Jul 2022 11:50:15 -0600 Subject: [PATCH] Add checks to advanced tex ops exectests (#4553) Two of the Advanced Texture Ops feature tests were missing the check for the feature in addition to the check for 6.7 support. This adds those checks Merge of #4551 to release-1.7.2207 --- tools/clang/unittests/HLSL/ExecutionTest.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/clang/unittests/HLSL/ExecutionTest.cpp b/tools/clang/unittests/HLSL/ExecutionTest.cpp index b77253612c..5c31e46c4d 100644 --- a/tools/clang/unittests/HLSL/ExecutionTest.cpp +++ b/tools/clang/unittests/HLSL/ExecutionTest.cpp @@ -4086,6 +4086,10 @@ TEST_F(ExecutionTest, ATOProgOffset) { ((UINT)sm & 0x0f)); break; } + if (sm >= D3D_SHADER_MODEL_6_7 && !DoesDeviceSupportAdvancedTexOps(pDevice)) { + LogCommentFmt(L"Device does not support Advanced Texture Ops"); + break; + } bool bSupportMSASDeriv = DoesDeviceSupportMeshAmpDerivatives(pDevice); @@ -4181,6 +4185,12 @@ TEST_F(ExecutionTest, ATOSampleCmpLevelTest) { if (!CreateDevice(&pDevice, D3D_SHADER_MODEL_6_7)) return; + if (!DoesDeviceSupportAdvancedTexOps(pDevice)) { + WEX::Logging::Log::Comment(L"Device does not support Advanced Texture Operations."); + WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped); + return; + } + std::shared_ptr ShaderOpSet = std::make_shared(); st::ParseShaderOpSetFromStream(pStream, ShaderOpSet.get());