Skip to content

Commit 0611d3f

Browse files
authored
Add checks to advanced tex ops exectests (microsoft#4551)
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
1 parent 5e01d70 commit 0611d3f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tools/clang/unittests/HLSL/ExecutionTest.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4086,6 +4086,10 @@ TEST_F(ExecutionTest, ATOProgOffset) {
40864086
((UINT)sm & 0x0f));
40874087
break;
40884088
}
4089+
if (sm >= D3D_SHADER_MODEL_6_7 && !DoesDeviceSupportAdvancedTexOps(pDevice)) {
4090+
LogCommentFmt(L"Device does not support Advanced Texture Ops");
4091+
break;
4092+
}
40894093

40904094
bool bSupportMSASDeriv = DoesDeviceSupportMeshAmpDerivatives(pDevice);
40914095

@@ -4181,6 +4185,12 @@ TEST_F(ExecutionTest, ATOSampleCmpLevelTest) {
41814185
if (!CreateDevice(&pDevice, D3D_SHADER_MODEL_6_7))
41824186
return;
41834187

4188+
if (!DoesDeviceSupportAdvancedTexOps(pDevice)) {
4189+
WEX::Logging::Log::Comment(L"Device does not support Advanced Texture Operations.");
4190+
WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped);
4191+
return;
4192+
}
4193+
41844194
std::shared_ptr<st::ShaderOpSet> ShaderOpSet =
41854195
std::make_shared<st::ShaderOpSet>();
41864196
st::ParseShaderOpSetFromStream(pStream, ShaderOpSet.get());

0 commit comments

Comments
 (0)