Skip to content

Commit

Permalink
Add checks to advanced tex ops exectests (#4553)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pow2clk authored Jul 13, 2022
1 parent 6f3d241 commit e9137cd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/clang/unittests/HLSL/ExecutionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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<st::ShaderOpSet> ShaderOpSet =
std::make_shared<st::ShaderOpSet>();
st::ParseShaderOpSetFromStream(pStream, ShaderOpSet.get());
Expand Down

0 comments on commit e9137cd

Please sign in to comment.