Skip to content

Commit 51635fd

Browse files
authored
Use internal validator for execution test that requires SM 6.8 (#7309)
This PR modifies WaveSizeRange test which depends on shader model 6.8. The compiler needs -select-validator internal. This will allow the tests to be run in different testing environments when an external validator that isn't sufficient is available.
1 parent 9ec8bcc commit 51635fd

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

tools/clang/unittests/HLSLExec/ExecutionTest.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11641,20 +11641,23 @@ void ExecuteWaveSizeRangeInstance(UINT minWaveSize, UINT maxWaveSize,
1164111641
})";
1164211642

1164311643
// format compiler args
11644-
char compilerOptions[64];
11644+
char compilerOptions[70];
1164511645
if (usePreferred) {
1164611646
// putting spaces in between the %d's below will cause compilation issues.
11647-
VERIFY_IS_TRUE(sprintf_s(compilerOptions, sizeof(compilerOptions),
11648-
"-D WAVE_SIZE_ATTR=[wavesize(%d,%d,%d)]",
11649-
minShaderWaveSize, maxShaderWaveSize,
11650-
prefShaderWaveSize) != -1);
11647+
VERIFY_IS_TRUE(
11648+
sprintf_s(
11649+
compilerOptions, sizeof(compilerOptions),
11650+
"-D WAVE_SIZE_ATTR=[wavesize(%d,%d,%d)] -select-validator internal",
11651+
minShaderWaveSize, maxShaderWaveSize, prefShaderWaveSize) != -1);
1165111652
LogCommentFmt(L"Verifying wave size range test results for (min, max, "
1165211653
L"preferred): (%d, %d, %d)",
1165311654
minShaderWaveSize, maxShaderWaveSize, prefShaderWaveSize);
1165411655
} else {
11655-
VERIFY_IS_TRUE(sprintf_s(compilerOptions, sizeof(compilerOptions),
11656-
"-D WAVE_SIZE_ATTR=[wavesize(%d,%d)]",
11657-
minShaderWaveSize, maxShaderWaveSize) != -1);
11656+
VERIFY_IS_TRUE(
11657+
sprintf_s(
11658+
compilerOptions, sizeof(compilerOptions),
11659+
"-D WAVE_SIZE_ATTR=[wavesize(%d,%d)] -select-validator internal",
11660+
minShaderWaveSize, maxShaderWaveSize) != -1);
1165811661
LogCommentFmt(
1165911662
L"Verifying wave size range test results for (min, max): (%d, %d)",
1166011663
minShaderWaveSize, maxShaderWaveSize);

0 commit comments

Comments
 (0)