Skip to content

Commit 14ec4b4

Browse files
DerivativesTest: Remove invalid thread group size test cases (microsoft#6496)
Invalid thread group size testing is included in the compiler/validator tests (PR microsoft#6332, commit 696a13a). It does not belong in the execution tests because is it not verifying the driver execution results. The shaders with invalid thread group sizes fail validation and cannot be executed. Also fixing compile warning and override defines in the derivatives test HLSL code. Note that the test is incorrectly using the term `dispatch size` instead of `thread group size`. Fixes internal bug #49806539. Reported from RITP pass. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent aa4d374 commit 14ec4b4

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

tools/clang/unittests/HLSLExec/ExecutionTest.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4020,10 +4020,7 @@ TEST_F(ExecutionTest, DerivativesTest) {
40204020
{16, 8, 1}, {8, 4, 2}, {10, 10, 1},
40214021
{4, 16, 2}, {4, 16, 2}};
40224022

4023-
std::vector<Dispatch> badDispatches = {{16, 3, 1}, {2, 16, 1}, {33, 1, 1}};
4024-
40254023
pShaderOp->UseWarpDevice = GetTestParamUseWARP(true);
4026-
LPCSTR CS = pShaderOp->CS;
40274024

40284025
MappedData data;
40294026

@@ -4068,19 +4065,6 @@ TEST_F(ExecutionTest, DerivativesTest) {
40684065
VerifyDerivResults_CS_AS_MS_66(pPixels, offsetCenter);
40694066
}
40704067
}
4071-
4072-
// Final tests with invalid dispatch size just to make sure they run
4073-
for (Dispatch &D : badDispatches) {
4074-
// Test Compute Shader
4075-
pShaderOp->CS = CS;
4076-
std::shared_ptr<st::ShaderOpTest> test =
4077-
RunDispatch(pDevice, m_support, pShaderOp, D);
4078-
4079-
if (DoesDeviceSupportMeshAmpDerivatives(pDevice)) {
4080-
pShaderOp->CS = nullptr;
4081-
test = RunDispatch(pDevice, m_support, pShaderOp, D);
4082-
}
4083-
}
40844068
}
40854069

40864070
// Verify the results for the quad starting with the given index

tools/clang/unittests/HLSLExec/ShaderOpArith.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
void CSMain(uint3 id : SV_GroupThreadID, uint ix : SV_GroupIndex) {
234234
if (DISPATCHY == 1 && DISPATCHZ == 1) {
235235
g_bufMain[ix] = DerivTest(ix);
236-
g_bufDbg[ix] = uint4(ix, ConvertGroupIdx(id), 0);
236+
g_bufDbg[ix] = uint4(ix, ConvertGroupIdx(id.x), 0);
237237
}
238238
else {
239239
g_bufMain[convert2Dto1D(id.x, id.y, DISPATCHX)] = DerivTest(id.xy);
@@ -246,7 +246,7 @@
246246
#undef DISPATCHY
247247
#undef DISPATCHZ
248248
249-
#define DISPATCHX 1
249+
#define DISPATCHX 4
250250
#define DISPATCHY 1
251251
#define DISPATCHZ 1
252252
#endif

0 commit comments

Comments
 (0)