Skip to content

[Draft] SM 6.9 cap: fix PSV/DebugBreak unit tests (validate #8618)#8623

Draft
alsepkow wants to merge 3 commits into
microsoft:release-1.9.2607from
alsepkow:fix-sm610-unittests
Draft

[Draft] SM 6.9 cap: fix PSV/DebugBreak unit tests (validate #8618)#8623
alsepkow wants to merge 3 commits into
microsoft:release-1.9.2607from
alsepkow:fix-sm610-unittests

Conversation

@alsepkow

Copy link
Copy Markdown
Contributor

Draft for pipeline validation only, not for merge. These commits are intended to be folded into #8618.

Follow-up to #8618 (cap highest shader model at 6.9 for the 1.9.2607 release). Capping the recognized validator version to 1.9 caused test failures beyond the lit suite:

  1. lit FileCheck tests (already in Cap highest shader model at 6.9 for the 1.9.2607 release #8618's branch): guarded SM 6.10 / validator-1.10 tests with REQUIRES: dxil-1-10.
  2. C++ unit tests (this branch, new): 14 ClangHLSLTests failures:
    • PixTest::DebugBreakInstrumentation_{Basic,Multiple} hard-code cs_6_10 — now skipped when Dxil/Validator < 1.10.
    • ValidationTest PSV tests hard-coded sizeof(PSVRuntimeInfo4) (56) and the string '56'; with the cap the validator emits PSVRuntimeInfo3 (52). The expected size is now derived from the validator version (v4 only for >= 1.10), preserving 6.9 coverage.

Validated locally against a capped x64 Debug build:

  • The 14 previously-failing unit tests pass.
  • Full ValidationTest + PixTest suites: 302/302 pass.
  • Full clang FileCheck lit suite: 0 failures (remaining failures are GPU execution tests, environmental).

This draft targets release-1.9.2607 so CI runs the full pipeline over the cap + both sets of test fixes.

alsepkow and others added 3 commits July 14, 2026 13:48
Lower the highest recognized shader model from 6.10 to 6.9 so this
release branch only produces up to Shader Model 6.9. Sets
highest_minor = 9 in hctdb_instrhelp.py and regenerates the dependent
sources (DxilConstants.h, DxilShaderModel.h/.cpp, HLSLOptions.td),
dropping all 6.10 target profiles, the SM 6.10 table entries, and
IsSM610Plus. kDxilMinor and the validator version follow at 1.9.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f3140c6f-a4ea-4f73-aac8-df248801fd8f
Capping the highest recognized shader model to 6.9 (PR microsoft#8618) removes the
dxil-1-10 lit feature, so tests that target SM 6.10 or require validator
version 1.10 now fail. Add REQUIRES: dxil-1-10 guards so they skip cleanly
on the capped release, following the pattern from PR microsoft#8069.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 086148ba-a82b-41c4-8fa0-5eb63e5797e2
Capping the highest shader model to 6.9 (PR microsoft#8618) lowers the validator
version to 1.9, so the compiler emits PSVRuntimeInfo3 (52 bytes) instead
of PSVRuntimeInfo4 (56 bytes) and rejects cs_6_10, which broke 14 unit
tests.

- PixTest DebugBreakInstrumentation_{Basic,Multiple}: skip when Dxil/
  Validator < 1.10 (DebugBreak is an experimental SM 6.10 feature).
- ValidationTest PSV tests: derive the expected PSVRuntimeInfo size from
  the validator version (v4 only for >= 1.10, else v3) instead of
  hard-coding sizeof(PSVRuntimeInfo4), and format the expected size into
  the WrongPSVVersion mismatch messages.

Validated locally against a capped x64 build: the 14 tests pass, and the
full ValidationTest + PixTest suites (302) and clang FileCheck lit suite
show no failures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 086148ba-a82b-41c4-8fa0-5eb63e5797e2
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff dc3e6c48d451e15d8a730574ca693e4095c628b8 4bc541903a47ff048cfe4852625230a879305990 -- include/dxc/DXIL/DxilConstants.h include/dxc/DXIL/DxilShaderModel.h lib/DXIL/DxilShaderModel.cpp tools/clang/unittests/HLSL/PixTest.cpp tools/clang/unittests/HLSL/ValidationTest.cpp
View the diff from clang-format here.
diff --git a/tools/clang/unittests/HLSL/ValidationTest.cpp b/tools/clang/unittests/HLSL/ValidationTest.cpp
index 5d3a56c9..96b07318 100644
--- a/tools/clang/unittests/HLSL/ValidationTest.cpp
+++ b/tools/clang/unittests/HLSL/ValidationTest.cpp
@@ -4885,8 +4885,8 @@ TEST_F(ValidationTest, CacheInitWithLowPrec) {
 // PSVRuntimeInfo4 adds NumBytesGroupSharedMemory and is only emitted for
 // validator version >= 1.10; earlier validators emit PSVRuntimeInfo3.
 static uint32_t GetExpectedPSVRuntimeInfoSize(const VersionSupportInfo &ver) {
-  bool HasV4 = ver.m_ValMajor > 1 ||
-               (ver.m_ValMajor == 1 && ver.m_ValMinor >= 10);
+  bool HasV4 =
+      ver.m_ValMajor > 1 || (ver.m_ValMajor == 1 && ver.m_ValMinor >= 10);
   return HasV4 ? static_cast<uint32_t>(sizeof(PSVRuntimeInfo4))
                : static_cast<uint32_t>(sizeof(PSVRuntimeInfo3));
 }
  • Check this box to apply formatting changes to this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant