Skip to content

Commit

Permalink
[Test] Add validator version check for tests
Browse files Browse the repository at this point in the history
This change adds validation version check for the tests.

This is for fix tests fail when running on different version of validator.
  • Loading branch information
python3kgae committed Sep 5, 2024
1 parent 9e039e2 commit f1d4588
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/clang/test/DXC/dumpPSV_AS.hlsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: dxil-1-8
// RUN: %dxc -E main -T as_6_8 %s -Fo %t
// RUN: %dxa %t -dumppsv | FileCheck %s

Expand Down
1 change: 1 addition & 0 deletions tools/clang/test/DXC/dumpPSV_CS.hlsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: dxil-1-8
// RUN: %dxc -E main -T cs_6_8 %s -Fo %t
// RUN: %dxa %t -dumppsv | FileCheck %s

Expand Down
1 change: 1 addition & 0 deletions tools/clang/test/DXC/dumpPSV_DS.hlsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: dxil-1-8
// RUN: %dxc -E main -T ds_6_8 %s -Fo %t
// RUN: %dxa %t -dumppsv | FileCheck %s

Expand Down
1 change: 1 addition & 0 deletions tools/clang/test/DXC/dumpPSV_GS.hlsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: dxil-1-8
// RUN: %dxc -E main -T gs_6_8 %s -Fo %t
// RUN: %dxa %t -dumppsv | FileCheck %s

Expand Down
1 change: 1 addition & 0 deletions tools/clang/test/DXC/dumpPSV_HS.hlsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: dxil-1-8
// RUN: %dxc -E main -T hs_6_8 %s -Fo %t
// RUN: %dxa %t -dumppsv | FileCheck %s

Expand Down
1 change: 1 addition & 0 deletions tools/clang/test/DXC/dumpPSV_MS.hlsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: dxil-1-8
// RUN: %dxc -E main -T ms_6_8 %s -Fo %t
// RUN: %dxa %t -dumppsv | FileCheck %s

Expand Down
1 change: 1 addition & 0 deletions tools/clang/test/DXC/dumpPSV_PS.hlsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: dxil-1-8
// RUN: %dxc -E main -T ps_6_8 %s -Fo %t
// RUN: %dxa %t -dumppsv | FileCheck %s

Expand Down
1 change: 1 addition & 0 deletions tools/clang/test/DXC/dumpPSV_VS.hlsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: dxil-1-8
// RUN: %dxc -E main -T vs_6_8 %s -Fo %t
// RUN: %dxa %t -dumppsv | FileCheck %s

Expand Down
9 changes: 9 additions & 0 deletions tools/clang/unittests/HLSL/PixTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,17 @@ void Miss( inout Payload payload )
TestPixUAVCase(hlsl, L"lib_6_3", L"");
TestPixUAVCase(hlsl, L"lib_6_4", L"");
TestPixUAVCase(hlsl, L"lib_6_5", L"");

if (m_ver.SkipDxilVersion(1, 6))
return;
TestPixUAVCase(hlsl, L"lib_6_6", L"");

if (m_ver.SkipDxilVersion(1, 7))
return;
TestPixUAVCase(hlsl, L"lib_6_7", L"");

if (m_ver.SkipDxilVersion(1, 8))
return;
TestPixUAVCase(hlsl, L"lib_6_8", L"");
}

Expand Down

0 comments on commit f1d4588

Please sign in to comment.