From e3e108c29fd4b0845f0315c11b39e84111d76af0 Mon Sep 17 00:00:00 2001 From: Alex Sepkowski Date: Tue, 14 Jul 2026 13:19:21 -0700 Subject: [PATCH 1/4] Revert highest shader model to 6.9 for the 1.9.2607 release 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 --- include/dxc/DXIL/DxilConstants.h | 2 +- include/dxc/DXIL/DxilShaderModel.h | 5 +- include/dxc/Support/HLSLOptions.td | 2 +- lib/DXIL/DxilShaderModel.cpp | 237 +++++++++++++---------------- utils/hct/hctdb_instrhelp.py | 2 +- 5 files changed, 111 insertions(+), 137 deletions(-) diff --git a/include/dxc/DXIL/DxilConstants.h b/include/dxc/DXIL/DxilConstants.h index 79758e2603..baffdf8555 100644 --- a/include/dxc/DXIL/DxilConstants.h +++ b/include/dxc/DXIL/DxilConstants.h @@ -29,7 +29,7 @@ namespace DXIL { const unsigned kDxilMajor = 1; /* hctdb_instrhelp.get_dxil_version_minor()*/ // VALRULE-TEXT:BEGIN -const unsigned kDxilMinor = 10; +const unsigned kDxilMinor = 9; const unsigned kDxilReleasedMinor = 9; // VALRULE-TEXT:END diff --git a/include/dxc/DXIL/DxilShaderModel.h b/include/dxc/DXIL/DxilShaderModel.h index ff9ef39b99..380fb1aa32 100644 --- a/include/dxc/DXIL/DxilShaderModel.h +++ b/include/dxc/DXIL/DxilShaderModel.h @@ -33,7 +33,7 @@ class ShaderModel { // clang-format on // VALRULE-TEXT:BEGIN static const unsigned kHighestMajor = 6; - static const unsigned kHighestMinor = 10; + static const unsigned kHighestMinor = 9; // VALRULE-TEXT:END // Major/Minor version of highest released shader model @@ -87,7 +87,6 @@ class ShaderModel { bool IsSM67Plus() const { return IsSMAtLeast(6, 7); } bool IsSM68Plus() const { return IsSMAtLeast(6, 8); } bool IsSM69Plus() const { return IsSMAtLeast(6, 9); } - bool IsSM610Plus() const { return IsSMAtLeast(6, 10); } // VALRULE-TEXT:END const char *GetName() const { return m_pszName; } const char *GetKindName() const; @@ -139,7 +138,7 @@ class ShaderModel { bool m_bTypedUavs, unsigned m_UAVRegsLim); /* hctdb_instrhelp.get_num_shader_models()*/ // VALRULE-TEXT:BEGIN - static const unsigned kNumShaderModels = 116; + static const unsigned kNumShaderModels = 107; // VALRULE-TEXT:END static const ShaderModel ms_ShaderModels[kNumShaderModels]; diff --git a/include/dxc/Support/HLSLOptions.td b/include/dxc/Support/HLSLOptions.td index f35e4809df..019aa12e39 100644 --- a/include/dxc/Support/HLSLOptions.td +++ b/include/dxc/Support/HLSLOptions.td @@ -462,7 +462,7 @@ def fvk_bind_counter_heap : MultiArg<["-"], "fvk-bind-counter-heap", 2>, MetaVar def target_profile : JoinedOrSeparate<["-", "/"], "T">, Flags<[CoreOption]>, Group, MetaVarName<"">, /* hctdb_instrhelp.get_target_profiles()*/ // VALRULE-TEXT:BEGIN - HelpText<"Set target profile. \n\t: ps_6_0, ps_6_1, ps_6_2, ps_6_3, ps_6_4, ps_6_5, ps_6_6, ps_6_7, ps_6_8, ps_6_9, ps_6_10, \n\t\t vs_6_0, vs_6_1, vs_6_2, vs_6_3, vs_6_4, vs_6_5, vs_6_6, vs_6_7, vs_6_8, vs_6_9, vs_6_10, \n\t\t gs_6_0, gs_6_1, gs_6_2, gs_6_3, gs_6_4, gs_6_5, gs_6_6, gs_6_7, gs_6_8, gs_6_9, gs_6_10, \n\t\t hs_6_0, hs_6_1, hs_6_2, hs_6_3, hs_6_4, hs_6_5, hs_6_6, hs_6_7, hs_6_8, hs_6_9, hs_6_10, \n\t\t ds_6_0, ds_6_1, ds_6_2, ds_6_3, ds_6_4, ds_6_5, ds_6_6, ds_6_7, ds_6_8, ds_6_9, ds_6_10, \n\t\t cs_6_0, cs_6_1, cs_6_2, cs_6_3, cs_6_4, cs_6_5, cs_6_6, cs_6_7, cs_6_8, cs_6_9, cs_6_10, \n\t\t lib_6_1, lib_6_2, lib_6_3, lib_6_4, lib_6_5, lib_6_6, lib_6_7, lib_6_8, lib_6_9, lib_6_10, \n\t\t ms_6_5, ms_6_6, ms_6_7, ms_6_8, ms_6_9, ms_6_10, \n\t\t as_6_5, as_6_6, as_6_7, as_6_8, as_6_9, as_6_10, \n\t\t ">; + HelpText<"Set target profile. \n\t: ps_6_0, ps_6_1, ps_6_2, ps_6_3, ps_6_4, ps_6_5, ps_6_6, ps_6_7, ps_6_8, ps_6_9, \n\t\t vs_6_0, vs_6_1, vs_6_2, vs_6_3, vs_6_4, vs_6_5, vs_6_6, vs_6_7, vs_6_8, vs_6_9, \n\t\t gs_6_0, gs_6_1, gs_6_2, gs_6_3, gs_6_4, gs_6_5, gs_6_6, gs_6_7, gs_6_8, gs_6_9, \n\t\t hs_6_0, hs_6_1, hs_6_2, hs_6_3, hs_6_4, hs_6_5, hs_6_6, hs_6_7, hs_6_8, hs_6_9, \n\t\t ds_6_0, ds_6_1, ds_6_2, ds_6_3, ds_6_4, ds_6_5, ds_6_6, ds_6_7, ds_6_8, ds_6_9, \n\t\t cs_6_0, cs_6_1, cs_6_2, cs_6_3, cs_6_4, cs_6_5, cs_6_6, cs_6_7, cs_6_8, cs_6_9, \n\t\t lib_6_1, lib_6_2, lib_6_3, lib_6_4, lib_6_5, lib_6_6, lib_6_7, lib_6_8, lib_6_9, \n\t\t ms_6_5, ms_6_6, ms_6_7, ms_6_8, ms_6_9, \n\t\t as_6_5, as_6_6, as_6_7, as_6_8, as_6_9, \n\t\t ">; // VALRULE-TEXT:END def entrypoint : JoinedOrSeparate<["-", "/"], "E">, Flags<[CoreOption, RewriteOption]>, Group, HelpText<"Entry point name">; diff --git a/lib/DXIL/DxilShaderModel.cpp b/lib/DXIL/DxilShaderModel.cpp index e70a3b44c9..06cc6e633c 100644 --- a/lib/DXIL/DxilShaderModel.cpp +++ b/lib/DXIL/DxilShaderModel.cpp @@ -65,7 +65,6 @@ bool ShaderModel::IsValidForDxil() const { case 7: case 8: case 9: - case 10: // VALRULE-TEXT:END return true; case kOfflineMinor: @@ -80,122 +79,113 @@ const ShaderModel *ShaderModel::Get(Kind Kind, unsigned Major, unsigned Minor) { /* hctdb_instrhelp.get_shader_model_get()*/ // VALRULE-TEXT:BEGIN const static std::pair hashToIdxMap[] = { - {1024, 0}, // ps_4_0 - {1025, 1}, // ps_4_1 - {1280, 2}, // ps_5_0 - {1281, 3}, // ps_5_1 - {1536, 4}, // ps_6_0 - {1537, 5}, // ps_6_1 - {1538, 6}, // ps_6_2 - {1539, 7}, // ps_6_3 - {1540, 8}, // ps_6_4 - {1541, 9}, // ps_6_5 - {1542, 10}, // ps_6_6 - {1543, 11}, // ps_6_7 - {1544, 12}, // ps_6_8 - {1545, 13}, // ps_6_9 - {1546, 14}, // ps_6_10 - {66560, 15}, // vs_4_0 - {66561, 16}, // vs_4_1 - {66816, 17}, // vs_5_0 - {66817, 18}, // vs_5_1 - {67072, 19}, // vs_6_0 - {67073, 20}, // vs_6_1 - {67074, 21}, // vs_6_2 - {67075, 22}, // vs_6_3 - {67076, 23}, // vs_6_4 - {67077, 24}, // vs_6_5 - {67078, 25}, // vs_6_6 - {67079, 26}, // vs_6_7 - {67080, 27}, // vs_6_8 - {67081, 28}, // vs_6_9 - {67082, 29}, // vs_6_10 - {132096, 30}, // gs_4_0 - {132097, 31}, // gs_4_1 - {132352, 32}, // gs_5_0 - {132353, 33}, // gs_5_1 - {132608, 34}, // gs_6_0 - {132609, 35}, // gs_6_1 - {132610, 36}, // gs_6_2 - {132611, 37}, // gs_6_3 - {132612, 38}, // gs_6_4 - {132613, 39}, // gs_6_5 - {132614, 40}, // gs_6_6 - {132615, 41}, // gs_6_7 - {132616, 42}, // gs_6_8 - {132617, 43}, // gs_6_9 - {132618, 44}, // gs_6_10 - {197632, 45}, // hs_4_0 - {197633, 46}, // hs_4_1 - {197888, 47}, // hs_5_0 - {197889, 48}, // hs_5_1 - {198144, 49}, // hs_6_0 - {198145, 50}, // hs_6_1 - {198146, 51}, // hs_6_2 - {198147, 52}, // hs_6_3 - {198148, 53}, // hs_6_4 - {198149, 54}, // hs_6_5 - {198150, 55}, // hs_6_6 - {198151, 56}, // hs_6_7 - {198152, 57}, // hs_6_8 - {198153, 58}, // hs_6_9 - {198154, 59}, // hs_6_10 - {263168, 60}, // ds_4_0 - {263169, 61}, // ds_4_1 - {263424, 62}, // ds_5_0 - {263425, 63}, // ds_5_1 - {263680, 64}, // ds_6_0 - {263681, 65}, // ds_6_1 - {263682, 66}, // ds_6_2 - {263683, 67}, // ds_6_3 - {263684, 68}, // ds_6_4 - {263685, 69}, // ds_6_5 - {263686, 70}, // ds_6_6 - {263687, 71}, // ds_6_7 - {263688, 72}, // ds_6_8 - {263689, 73}, // ds_6_9 - {263690, 74}, // ds_6_10 - {328704, 75}, // cs_4_0 - {328705, 76}, // cs_4_1 - {328960, 77}, // cs_5_0 - {328961, 78}, // cs_5_1 - {329216, 79}, // cs_6_0 - {329217, 80}, // cs_6_1 - {329218, 81}, // cs_6_2 - {329219, 82}, // cs_6_3 - {329220, 83}, // cs_6_4 - {329221, 84}, // cs_6_5 - {329222, 85}, // cs_6_6 - {329223, 86}, // cs_6_7 - {329224, 87}, // cs_6_8 - {329225, 88}, // cs_6_9 - {329226, 89}, // cs_6_10 - {394241, 90}, // lib_4_1 - {394497, 91}, // lib_5_1 - {394753, 92}, // lib_6_1 - {394754, 93}, // lib_6_2 - {394755, 94}, // lib_6_3 - {394756, 95}, // lib_6_4 - {394757, 96}, // lib_6_5 - {394758, 97}, // lib_6_6 - {394759, 98}, // lib_6_7 - {394760, 99}, // lib_6_8 - {394761, 100}, // lib_6_9 - {394762, 101}, // lib_6_10 + {1024, 0}, // ps_4_0 + {1025, 1}, // ps_4_1 + {1280, 2}, // ps_5_0 + {1281, 3}, // ps_5_1 + {1536, 4}, // ps_6_0 + {1537, 5}, // ps_6_1 + {1538, 6}, // ps_6_2 + {1539, 7}, // ps_6_3 + {1540, 8}, // ps_6_4 + {1541, 9}, // ps_6_5 + {1542, 10}, // ps_6_6 + {1543, 11}, // ps_6_7 + {1544, 12}, // ps_6_8 + {1545, 13}, // ps_6_9 + {66560, 14}, // vs_4_0 + {66561, 15}, // vs_4_1 + {66816, 16}, // vs_5_0 + {66817, 17}, // vs_5_1 + {67072, 18}, // vs_6_0 + {67073, 19}, // vs_6_1 + {67074, 20}, // vs_6_2 + {67075, 21}, // vs_6_3 + {67076, 22}, // vs_6_4 + {67077, 23}, // vs_6_5 + {67078, 24}, // vs_6_6 + {67079, 25}, // vs_6_7 + {67080, 26}, // vs_6_8 + {67081, 27}, // vs_6_9 + {132096, 28}, // gs_4_0 + {132097, 29}, // gs_4_1 + {132352, 30}, // gs_5_0 + {132353, 31}, // gs_5_1 + {132608, 32}, // gs_6_0 + {132609, 33}, // gs_6_1 + {132610, 34}, // gs_6_2 + {132611, 35}, // gs_6_3 + {132612, 36}, // gs_6_4 + {132613, 37}, // gs_6_5 + {132614, 38}, // gs_6_6 + {132615, 39}, // gs_6_7 + {132616, 40}, // gs_6_8 + {132617, 41}, // gs_6_9 + {197632, 42}, // hs_4_0 + {197633, 43}, // hs_4_1 + {197888, 44}, // hs_5_0 + {197889, 45}, // hs_5_1 + {198144, 46}, // hs_6_0 + {198145, 47}, // hs_6_1 + {198146, 48}, // hs_6_2 + {198147, 49}, // hs_6_3 + {198148, 50}, // hs_6_4 + {198149, 51}, // hs_6_5 + {198150, 52}, // hs_6_6 + {198151, 53}, // hs_6_7 + {198152, 54}, // hs_6_8 + {198153, 55}, // hs_6_9 + {263168, 56}, // ds_4_0 + {263169, 57}, // ds_4_1 + {263424, 58}, // ds_5_0 + {263425, 59}, // ds_5_1 + {263680, 60}, // ds_6_0 + {263681, 61}, // ds_6_1 + {263682, 62}, // ds_6_2 + {263683, 63}, // ds_6_3 + {263684, 64}, // ds_6_4 + {263685, 65}, // ds_6_5 + {263686, 66}, // ds_6_6 + {263687, 67}, // ds_6_7 + {263688, 68}, // ds_6_8 + {263689, 69}, // ds_6_9 + {328704, 70}, // cs_4_0 + {328705, 71}, // cs_4_1 + {328960, 72}, // cs_5_0 + {328961, 73}, // cs_5_1 + {329216, 74}, // cs_6_0 + {329217, 75}, // cs_6_1 + {329218, 76}, // cs_6_2 + {329219, 77}, // cs_6_3 + {329220, 78}, // cs_6_4 + {329221, 79}, // cs_6_5 + {329222, 80}, // cs_6_6 + {329223, 81}, // cs_6_7 + {329224, 82}, // cs_6_8 + {329225, 83}, // cs_6_9 + {394241, 84}, // lib_4_1 + {394497, 85}, // lib_5_1 + {394753, 86}, // lib_6_1 + {394754, 87}, // lib_6_2 + {394755, 88}, // lib_6_3 + {394756, 89}, // lib_6_4 + {394757, 90}, // lib_6_5 + {394758, 91}, // lib_6_6 + {394759, 92}, // lib_6_7 + {394760, 93}, // lib_6_8 + {394761, 94}, // lib_6_9 // lib_6_x is for offline linking only, and relaxes restrictions - {394767, 102}, // lib_6_x - {853509, 103}, // ms_6_5 - {853510, 104}, // ms_6_6 - {853511, 105}, // ms_6_7 - {853512, 106}, // ms_6_8 - {853513, 107}, // ms_6_9 - {853514, 108}, // ms_6_10 - {919045, 109}, // as_6_5 - {919046, 110}, // as_6_6 - {919047, 111}, // as_6_7 - {919048, 112}, // as_6_8 - {919049, 113}, // as_6_9 - {919050, 114}, // as_6_10 + {394767, 95}, // lib_6_x + {853509, 96}, // ms_6_5 + {853510, 97}, // ms_6_6 + {853511, 98}, // ms_6_7 + {853512, 99}, // ms_6_8 + {853513, 100}, // ms_6_9 + {919045, 101}, // as_6_5 + {919046, 102}, // as_6_6 + {919047, 103}, // as_6_7 + {919048, 104}, // as_6_8 + {919049, 105}, // as_6_9 }; unsigned hash = (unsigned)Kind << 16 | Major << 8 | Minor; auto pred = [](const std::pair &elem, unsigned val) { @@ -338,9 +328,6 @@ void ShaderModel::GetDxilVersion(unsigned &DxilMajor, case 9: DxilMinor = 9; break; - case 10: - DxilMinor = 10; - break; case kOfflineMinor: // Always update this to highest dxil version DxilMinor = DXIL::kDxilMinor; break; @@ -391,9 +378,6 @@ void ShaderModel::GetMinValidatorVersion(unsigned &ValMajor, case 9: ValMinor = 9; break; - case 10: - ValMinor = 10; - break; // VALRULE-TEXT:END case kOfflineMinor: ValMajor = 0; @@ -535,7 +519,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = { SM(Kind::Pixel, 6, 7, "ps_6_7", 32, 8, true, true, UINT_MAX), SM(Kind::Pixel, 6, 8, "ps_6_8", 32, 8, true, true, UINT_MAX), SM(Kind::Pixel, 6, 9, "ps_6_9", 32, 8, true, true, UINT_MAX), - SM(Kind::Pixel, 6, 10, "ps_6_10", 32, 8, true, true, UINT_MAX), SM(Kind::Vertex, 4, 0, "vs_4_0", 16, 16, false, false, 0), SM(Kind::Vertex, 4, 1, "vs_4_1", 32, 32, false, false, 0), SM(Kind::Vertex, 5, 0, "vs_5_0", 32, 32, true, true, 64), @@ -550,7 +533,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = { SM(Kind::Vertex, 6, 7, "vs_6_7", 32, 32, true, true, UINT_MAX), SM(Kind::Vertex, 6, 8, "vs_6_8", 32, 32, true, true, UINT_MAX), SM(Kind::Vertex, 6, 9, "vs_6_9", 32, 32, true, true, UINT_MAX), - SM(Kind::Vertex, 6, 10, "vs_6_10", 32, 32, true, true, UINT_MAX), SM(Kind::Geometry, 4, 0, "gs_4_0", 16, 32, false, false, 0), SM(Kind::Geometry, 4, 1, "gs_4_1", 32, 32, false, false, 0), SM(Kind::Geometry, 5, 0, "gs_5_0", 32, 32, true, true, 64), @@ -565,7 +547,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = { SM(Kind::Geometry, 6, 7, "gs_6_7", 32, 32, true, true, UINT_MAX), SM(Kind::Geometry, 6, 8, "gs_6_8", 32, 32, true, true, UINT_MAX), SM(Kind::Geometry, 6, 9, "gs_6_9", 32, 32, true, true, UINT_MAX), - SM(Kind::Geometry, 6, 10, "gs_6_10", 32, 32, true, true, UINT_MAX), SM(Kind::Hull, 4, 0, "hs_4_0", 32, 32, false, false, 0), SM(Kind::Hull, 4, 1, "hs_4_1", 32, 32, false, false, 0), SM(Kind::Hull, 5, 0, "hs_5_0", 32, 32, true, true, 64), @@ -580,7 +561,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = { SM(Kind::Hull, 6, 7, "hs_6_7", 32, 32, true, true, UINT_MAX), SM(Kind::Hull, 6, 8, "hs_6_8", 32, 32, true, true, UINT_MAX), SM(Kind::Hull, 6, 9, "hs_6_9", 32, 32, true, true, UINT_MAX), - SM(Kind::Hull, 6, 10, "hs_6_10", 32, 32, true, true, UINT_MAX), SM(Kind::Domain, 4, 0, "ds_4_0", 32, 32, false, false, 0), SM(Kind::Domain, 4, 1, "ds_4_1", 32, 32, false, false, 0), SM(Kind::Domain, 5, 0, "ds_5_0", 32, 32, true, true, 64), @@ -595,7 +575,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = { SM(Kind::Domain, 6, 7, "ds_6_7", 32, 32, true, true, UINT_MAX), SM(Kind::Domain, 6, 8, "ds_6_8", 32, 32, true, true, UINT_MAX), SM(Kind::Domain, 6, 9, "ds_6_9", 32, 32, true, true, UINT_MAX), - SM(Kind::Domain, 6, 10, "ds_6_10", 32, 32, true, true, UINT_MAX), SM(Kind::Compute, 4, 0, "cs_4_0", 0, 0, false, false, 0), SM(Kind::Compute, 4, 1, "cs_4_1", 0, 0, false, false, 0), SM(Kind::Compute, 5, 0, "cs_5_0", 0, 0, true, true, 64), @@ -610,7 +589,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = { SM(Kind::Compute, 6, 7, "cs_6_7", 0, 0, true, true, UINT_MAX), SM(Kind::Compute, 6, 8, "cs_6_8", 0, 0, true, true, UINT_MAX), SM(Kind::Compute, 6, 9, "cs_6_9", 0, 0, true, true, UINT_MAX), - SM(Kind::Compute, 6, 10, "cs_6_10", 0, 0, true, true, UINT_MAX), SM(Kind::Library, 4, 1, "lib_4_1", 0, 0, false, false, 0), SM(Kind::Library, 5, 1, "lib_5_1", 0, 0, true, true, 64), SM(Kind::Library, 6, 1, "lib_6_1", 0, 0, true, true, UINT_MAX), @@ -622,7 +600,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = { SM(Kind::Library, 6, 7, "lib_6_7", 0, 0, true, true, UINT_MAX), SM(Kind::Library, 6, 8, "lib_6_8", 0, 0, true, true, UINT_MAX), SM(Kind::Library, 6, 9, "lib_6_9", 0, 0, true, true, UINT_MAX), - SM(Kind::Library, 6, 10, "lib_6_10", 0, 0, true, true, UINT_MAX), // lib_6_x is for offline linking only, and relaxes restrictions SM(Kind::Library, 6, kOfflineMinor, "lib_6_x", 32, 32, true, true, UINT_MAX), @@ -631,13 +608,11 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = { SM(Kind::Mesh, 6, 7, "ms_6_7", 0, 0, true, true, UINT_MAX), SM(Kind::Mesh, 6, 8, "ms_6_8", 0, 0, true, true, UINT_MAX), SM(Kind::Mesh, 6, 9, "ms_6_9", 0, 0, true, true, UINT_MAX), - SM(Kind::Mesh, 6, 10, "ms_6_10", 0, 0, true, true, UINT_MAX), SM(Kind::Amplification, 6, 5, "as_6_5", 0, 0, true, true, UINT_MAX), SM(Kind::Amplification, 6, 6, "as_6_6", 0, 0, true, true, UINT_MAX), SM(Kind::Amplification, 6, 7, "as_6_7", 0, 0, true, true, UINT_MAX), SM(Kind::Amplification, 6, 8, "as_6_8", 0, 0, true, true, UINT_MAX), SM(Kind::Amplification, 6, 9, "as_6_9", 0, 0, true, true, UINT_MAX), - SM(Kind::Amplification, 6, 10, "as_6_10", 0, 0, true, true, UINT_MAX), // Values before Invalid must remain sorted by Kind, then Major, then Minor. SM(Kind::Invalid, 0, 0, "invalid", 0, 0, false, false, 0), // VALRULE-TEXT:END diff --git a/utils/hct/hctdb_instrhelp.py b/utils/hct/hctdb_instrhelp.py index d7a263a8e1..22b60cde06 100644 --- a/utils/hct/hctdb_instrhelp.py +++ b/utils/hct/hctdb_instrhelp.py @@ -1709,7 +1709,7 @@ def get_extended_table_opcode_enum_decls(): # since there can be pre-release versions that are higher # than the last released version highest_major = 6 -highest_minor = 10 +highest_minor = 9 highest_shader_models = {4: 1, 5: 1, 6: highest_minor} # fetch the last released version from latest-released.json From 0da8b6d5b83a5df7da0c820e54efd3f927ffa6d7 Mon Sep 17 00:00:00 2001 From: Alex Sepkowski Date: Tue, 14 Jul 2026 17:20:02 -0700 Subject: [PATCH 2/4] Guard SM 6.10 tests with REQUIRES: dxil-1-10 for the 1.9.2607 release Capping the highest recognized shader model to 6.9 (PR #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 #8069. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 086148ba-a82b-41c4-8fa0-5eb63e5797e2 --- tools/clang/test/CodeGenSPIRV/intrinsics.debugbreak.hlsl | 1 + .../test/CodeGenSPIRV/intrinsics.isdebugerpresent.error.hlsl | 1 + .../clang/test/HLSLFileCheck/pix/DebugBreakInstrumentation.hlsl | 1 + .../HLSLFileCheck/pix/DebugBreakInstrumentationMultiple.hlsl | 1 + .../clang/test/LitDXILValidation/GroupShared/tgsm-chained-gep.ll | 1 + .../LinAlgMatrix/linalgmatrix-type-allowed-in-dxil.ll | 1 + tools/clang/test/SemaHLSL/attributes/nodiscard.hlsl | 1 + tools/clang/test/SemaHLSL/hlsl/linalg/builtins/stage-errors.hlsl | 1 + 8 files changed, 8 insertions(+) diff --git a/tools/clang/test/CodeGenSPIRV/intrinsics.debugbreak.hlsl b/tools/clang/test/CodeGenSPIRV/intrinsics.debugbreak.hlsl index b9b60aebb0..13a378088b 100644 --- a/tools/clang/test/CodeGenSPIRV/intrinsics.debugbreak.hlsl +++ b/tools/clang/test/CodeGenSPIRV/intrinsics.debugbreak.hlsl @@ -1,3 +1,4 @@ +// REQUIRES: dxil-1-10 // RUN: %dxc -T cs_6_10 -spirv %s | FileCheck %s // CHECK: OpExtension "SPV_KHR_non_semantic_info" diff --git a/tools/clang/test/CodeGenSPIRV/intrinsics.isdebugerpresent.error.hlsl b/tools/clang/test/CodeGenSPIRV/intrinsics.isdebugerpresent.error.hlsl index e82df70065..afc3bf6936 100644 --- a/tools/clang/test/CodeGenSPIRV/intrinsics.isdebugerpresent.error.hlsl +++ b/tools/clang/test/CodeGenSPIRV/intrinsics.isdebugerpresent.error.hlsl @@ -1,3 +1,4 @@ +// REQUIRES: dxil-1-10 // RUN: not %dxc -T cs_6_10 -spirv %s 2>&1 | FileCheck %s // CHECK: :9:9: error: no equivalent for IsDebuggerPresent intrinsic function in Vulkan diff --git a/tools/clang/test/HLSLFileCheck/pix/DebugBreakInstrumentation.hlsl b/tools/clang/test/HLSLFileCheck/pix/DebugBreakInstrumentation.hlsl index 833d296ab9..e3fa6d18d6 100644 --- a/tools/clang/test/HLSLFileCheck/pix/DebugBreakInstrumentation.hlsl +++ b/tools/clang/test/HLSLFileCheck/pix/DebugBreakInstrumentation.hlsl @@ -1,3 +1,4 @@ +// REQUIRES: dxil-1-10 // RUN: %dxc -Emain -Tcs_6_10 %s | %opt -S -dxil-annotate-with-virtual-regs -hlsl-dxil-debugbreak-instrumentation | %FileCheck %s // Verify the PIX UAV handle is created for DebugBreak instrumentation: diff --git a/tools/clang/test/HLSLFileCheck/pix/DebugBreakInstrumentationMultiple.hlsl b/tools/clang/test/HLSLFileCheck/pix/DebugBreakInstrumentationMultiple.hlsl index 8e834e42fe..1a7f0a9e54 100644 --- a/tools/clang/test/HLSLFileCheck/pix/DebugBreakInstrumentationMultiple.hlsl +++ b/tools/clang/test/HLSLFileCheck/pix/DebugBreakInstrumentationMultiple.hlsl @@ -1,3 +1,4 @@ +// REQUIRES: dxil-1-10 // RUN: %dxc -Emain -Tcs_6_10 %s | %opt -S -dxil-annotate-with-virtual-regs -hlsl-dxil-debugbreak-instrumentation | %FileCheck %s // Verify the PIX UAV handle is created: diff --git a/tools/clang/test/LitDXILValidation/GroupShared/tgsm-chained-gep.ll b/tools/clang/test/LitDXILValidation/GroupShared/tgsm-chained-gep.ll index 3174eee52b..e6cae33f01 100644 --- a/tools/clang/test/LitDXILValidation/GroupShared/tgsm-chained-gep.ll +++ b/tools/clang/test/LitDXILValidation/GroupShared/tgsm-chained-gep.ll @@ -1,3 +1,4 @@ +; REQUIRES: dxil-1-10 ; RUN: %dxv %s 2>&1 | FileCheck %s ; Regression test for TGSM pointer validation when SM 6.9 preserves native diff --git a/tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-type-allowed-in-dxil.ll b/tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-type-allowed-in-dxil.ll index 7f7ec70488..11128630b8 100644 --- a/tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-type-allowed-in-dxil.ll +++ b/tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-type-allowed-in-dxil.ll @@ -1,3 +1,4 @@ +; REQUIRES: dxil-1-10 ; RUN: %dxv %s 2>&1 | FileCheck %s ; CHECK-NOT: uses a reserved prefix. diff --git a/tools/clang/test/SemaHLSL/attributes/nodiscard.hlsl b/tools/clang/test/SemaHLSL/attributes/nodiscard.hlsl index c925b5ba42..a40c39fde6 100644 --- a/tools/clang/test/SemaHLSL/attributes/nodiscard.hlsl +++ b/tools/clang/test/SemaHLSL/attributes/nodiscard.hlsl @@ -1,3 +1,4 @@ +// REQUIRES: dxil-1-10 // RUN: %dxc -I %hlsl_headers -T cs_6_10 -verify %s #include diff --git a/tools/clang/test/SemaHLSL/hlsl/linalg/builtins/stage-errors.hlsl b/tools/clang/test/SemaHLSL/hlsl/linalg/builtins/stage-errors.hlsl index b48cb88fff..74b2f93b56 100644 --- a/tools/clang/test/SemaHLSL/hlsl/linalg/builtins/stage-errors.hlsl +++ b/tools/clang/test/SemaHLSL/hlsl/linalg/builtins/stage-errors.hlsl @@ -1,3 +1,4 @@ +// REQUIRES: dxil-1-10 // RUN: %dxc -T lib_6_10 -DMATRIX_COPY_CONVERT %s -verify // RUN: %dxc -T lib_6_10 -DMATRIX_FILL %s -verify // RUN: %dxc -T lib_6_10 -DMATRIX_GET_COORDINATE %s -verify From 4bc541903a47ff048cfe4852625230a879305990 Mon Sep 17 00:00:00 2001 From: Alex Sepkowski Date: Tue, 14 Jul 2026 19:05:39 -0700 Subject: [PATCH 3/4] Make PSV/DebugBreak unit tests handle the SM 6.9 cap Capping the highest shader model to 6.9 (PR #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 --- tools/clang/unittests/HLSL/PixTest.cpp | 4 ++ tools/clang/unittests/HLSL/ValidationTest.cpp | 62 ++++++++++++------- 2 files changed, 42 insertions(+), 24 deletions(-) diff --git a/tools/clang/unittests/HLSL/PixTest.cpp b/tools/clang/unittests/HLSL/PixTest.cpp index 93aad0281f..18c8a1c58b 100644 --- a/tools/clang/unittests/HLSL/PixTest.cpp +++ b/tools/clang/unittests/HLSL/PixTest.cpp @@ -3389,6 +3389,8 @@ void RaygenInternalName() } TEST_F(PixTest, DebugBreakInstrumentation_Basic) { + if (m_ver.SkipDxilVersion(1, 10)) + return; const char *source = R"x( [numthreads(1, 1, 1)] @@ -3426,6 +3428,8 @@ void main() { } TEST_F(PixTest, DebugBreakInstrumentation_Multiple) { + if (m_ver.SkipDxilVersion(1, 10)) + return; const char *source = R"x( RWByteAddressBuffer buf : register(u0); diff --git a/tools/clang/unittests/HLSL/ValidationTest.cpp b/tools/clang/unittests/HLSL/ValidationTest.cpp index 67c22e7b60..5d3a56c9ac 100644 --- a/tools/clang/unittests/HLSL/ValidationTest.cpp +++ b/tools/clang/unittests/HLSL/ValidationTest.cpp @@ -4882,6 +4882,15 @@ TEST_F(ValidationTest, CacheInitWithLowPrec) { TestCheck(L"..\\DXILValidation\\val-dx-type-lowprec.ll"); } +// 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); + return HasV4 ? static_cast(sizeof(PSVRuntimeInfo4)) + : static_cast(sizeof(PSVRuntimeInfo3)); +} + TEST_F(ValidationTest, PSVStringTableReorder) { if (!m_ver.m_InternalValidator) if (m_ver.SkipDxilVersion(1, 8)) @@ -4916,7 +4925,7 @@ TEST_F(ValidationTest, PSVStringTableReorder) { const uint32_t *PSVPtr = (const uint32_t *)GetDxilPartData(pPSVPart); uint32_t PSVRuntimeInfo_size = *(PSVPtr++); - VERIFY_ARE_EQUAL(sizeof(PSVRuntimeInfo4), PSVRuntimeInfo_size); + VERIFY_ARE_EQUAL(GetExpectedPSVRuntimeInfoSize(m_ver), PSVRuntimeInfo_size); PSVRuntimeInfo4 *PSVInfo = const_cast((const PSVRuntimeInfo4 *)PSVPtr); VERIFY_ARE_EQUAL(2u, PSVInfo->SigInputElements); @@ -5108,7 +5117,7 @@ TEST_F(ValidationTest, PSVSemanticIndexTableReorder) { const uint32_t *PSVPtr = (const uint32_t *)GetDxilPartData(pPSVPart); uint32_t PSVRuntimeInfo_size = *(PSVPtr++); - VERIFY_ARE_EQUAL(sizeof(PSVRuntimeInfo4), PSVRuntimeInfo_size); + VERIFY_ARE_EQUAL(GetExpectedPSVRuntimeInfoSize(m_ver), PSVRuntimeInfo_size); PSVRuntimeInfo4 *PSVInfo = const_cast((const PSVRuntimeInfo4 *)PSVPtr); VERIFY_ARE_EQUAL(PSVInfo->SigInputElements, 3u); @@ -5443,17 +5452,18 @@ struct SimplePSV { llvm::MutableArrayRef PCInputToOutputTable; llvm::MutableArrayRef ViewIDOutputMask[DXIL::kNumOutputStreams]; llvm::MutableArrayRef ViewIDPCOutputMask; - SimplePSV(const DxilPartHeader *pPSVPart); + SimplePSV(const DxilPartHeader *pPSVPart, uint32_t ExpectedRuntimeInfoSize); }; -SimplePSV::SimplePSV(const DxilPartHeader *pPSVPart) { +SimplePSV::SimplePSV(const DxilPartHeader *pPSVPart, + uint32_t ExpectedRuntimeInfoSize) { uint32_t PartSize = pPSVPart->PartSize; uint32_t *PSVPtr = const_cast((const uint32_t *)GetDxilPartData(pPSVPart)); const uint32_t *PSVPtrEnd = PSVPtr + PartSize / 4; uint32_t PSVRuntimeInfoSize = *(PSVPtr++); - VERIFY_ARE_EQUAL(sizeof(PSVRuntimeInfo4), PSVRuntimeInfoSize); + VERIFY_ARE_EQUAL(ExpectedRuntimeInfoSize, PSVRuntimeInfoSize); PSVRuntimeInfo4 *PSVInfo4 = const_cast((const PSVRuntimeInfo4 *)PSVPtr); PSVInfo = PSVInfo4; @@ -5581,7 +5591,7 @@ TEST_F(ValidationTest, PSVContentValidationVS) { VERIFY_ARE_NOT_EQUAL(hlsl::end(pHeader), pPartIter); const DxilPartHeader *pPSVPart = (const DxilPartHeader *)(*pPartIter); - SimplePSV PSV(pPSVPart); + SimplePSV PSV(pPSVPart, GetExpectedPSVRuntimeInfoSize(m_ver)); // Update PSV. PSV.SigInput[0].InterpolationMode = 20; @@ -5737,7 +5747,7 @@ TEST_F(ValidationTest, PSVContentValidationHS) { VERIFY_ARE_NOT_EQUAL(hlsl::end(pHeader), pPartIter); const DxilPartHeader *pPSVPart = (const DxilPartHeader *)(*pPartIter); - SimplePSV PSV(pPSVPart); + SimplePSV PSV(pPSVPart, GetExpectedPSVRuntimeInfoSize(m_ver)); // Update PSV. PSV.SigPatchConstOrPrim[0].InterpolationMode = 20; @@ -5887,7 +5897,7 @@ TEST_F(ValidationTest, PSVContentValidationDS) { VERIFY_ARE_NOT_EQUAL(hlsl::end(pHeader), pPartIter); const DxilPartHeader *pPSVPart = (const DxilPartHeader *)(*pPartIter); - SimplePSV PSV(pPSVPart); + SimplePSV PSV(pPSVPart, GetExpectedPSVRuntimeInfoSize(m_ver)); // Update PSV. PSV.SigPatchConstOrPrim[0].InterpolationMode = 20; @@ -6044,7 +6054,7 @@ TEST_F(ValidationTest, PSVContentValidationGS) { VERIFY_ARE_NOT_EQUAL(hlsl::end(pHeader), pPartIter); const DxilPartHeader *pPSVPart = (const DxilPartHeader *)(*pPartIter); - SimplePSV PSV(pPSVPart); + SimplePSV PSV(pPSVPart, GetExpectedPSVRuntimeInfoSize(m_ver)); // Update PSV. PSV.PSVInfo->MaxVertexCount = 2; @@ -6132,7 +6142,7 @@ TEST_F(ValidationTest, PSVContentValidationPS) { VERIFY_ARE_NOT_EQUAL(hlsl::end(pHeader), pPartIter); const DxilPartHeader *pPSVPart = (const DxilPartHeader *)(*pPartIter); - SimplePSV PSV(pPSVPart); + SimplePSV PSV(pPSVPart, GetExpectedPSVRuntimeInfoSize(m_ver)); // Update PSV. PSV.PSVInfo->PS.DepthOutput = 1; @@ -6217,7 +6227,7 @@ TEST_F(ValidationTest, PSVContentValidationCS) { VERIFY_ARE_NOT_EQUAL(hlsl::end(pHeader), pPartIter); const DxilPartHeader *pPSVPart = (const DxilPartHeader *)(*pPartIter); - SimplePSV PSV(pPSVPart); + SimplePSV PSV(pPSVPart, GetExpectedPSVRuntimeInfoSize(m_ver)); // Update PSV. PSV.PSVInfo->NumThreadsX = 1; @@ -6299,7 +6309,7 @@ TEST_F(ValidationTest, PSVContentValidationMS) { VERIFY_ARE_NOT_EQUAL(hlsl::end(pHeader), pPartIter); const DxilPartHeader *pPSVPart = (const DxilPartHeader *)(*pPartIter); - SimplePSV PSV(pPSVPart); + SimplePSV PSV(pPSVPart, GetExpectedPSVRuntimeInfoSize(m_ver)); // Update PSV. memset(PSV.ViewIDOutputMask[0].data(), 0, PSV.ViewIDOutputMask[0].size() * sizeof(uint32_t)); @@ -6366,7 +6376,7 @@ TEST_F(ValidationTest, PSVContentValidationAS) { VERIFY_ARE_NOT_EQUAL(hlsl::end(pHeader), pPartIter); const DxilPartHeader *pPSVPart = (const DxilPartHeader *)(*pPartIter); - SimplePSV PSV(pPSVPart); + SimplePSV PSV(pPSVPart, GetExpectedPSVRuntimeInfoSize(m_ver)); // Update PSV. PSV.PSVInfo->AS.PayloadSizeInBytes = 0; @@ -6560,7 +6570,7 @@ TEST_F(ValidationTest, WrongPSVSizeOnZeros) { const uint32_t *PSVPtr = (const uint32_t *)GetDxilPartData(pPSVPart); uint32_t PSVRuntimeInfo_size = *(PSVPtr++); - VERIFY_ARE_EQUAL(sizeof(PSVRuntimeInfo4), PSVRuntimeInfo_size); + VERIFY_ARE_EQUAL(GetExpectedPSVRuntimeInfoSize(m_ver), PSVRuntimeInfo_size); PSVRuntimeInfo4 *PSVInfo = const_cast((const PSVRuntimeInfo4 *)PSVPtr); VERIFY_ARE_EQUAL(2u, PSVInfo->SigInputElements); @@ -6791,11 +6801,14 @@ TEST_F(ValidationTest, WrongPSVVersion) { VERIFY_IS_NOT_NULL(p60WithPSV68Result); VERIFY_SUCCEEDED(p60WithPSV68Result->GetStatus(&status)); VERIFY_FAILED(status); - CheckOperationResultMsgs( - p60WithPSV68Result, - {"DXIL container mismatch for 'PSVRuntimeInfoSize' between 'PSV0' " - "part:('56') and DXIL module:('24')"}, - /*maySucceedAnyway*/ false, /*bRegex*/ false); + std::string ExpectedPSVSizeStr = + std::to_string(GetExpectedPSVRuntimeInfoSize(m_ver)); + std::string Msg60WithPSV68 = + "DXIL container mismatch for 'PSVRuntimeInfoSize' between 'PSV0' " + "part:('" + + ExpectedPSVSizeStr + "') and DXIL module:('24')"; + CheckOperationResultMsgs(p60WithPSV68Result, {Msg60WithPSV68.c_str()}, + /*maySucceedAnyway*/ false, /*bRegex*/ false); // Create a new Blob. CComPtr pProgram68WithPSV60; @@ -6809,9 +6822,10 @@ TEST_F(ValidationTest, WrongPSVVersion) { VERIFY_IS_NOT_NULL(p68WithPSV60Result); VERIFY_SUCCEEDED(p68WithPSV60Result->GetStatus(&status)); VERIFY_FAILED(status); - CheckOperationResultMsgs( - p68WithPSV60Result, - {"DXIL container mismatch for 'PSVRuntimeInfoSize' between 'PSV0' " - "part:('24') and DXIL module:('56')"}, - /*maySucceedAnyway*/ false, /*bRegex*/ false); + std::string Msg68WithPSV60 = + "DXIL container mismatch for 'PSVRuntimeInfoSize' between 'PSV0' " + "part:('24') and DXIL module:('" + + ExpectedPSVSizeStr + "')"; + CheckOperationResultMsgs(p68WithPSV60Result, {Msg68WithPSV60.c_str()}, + /*maySucceedAnyway*/ false, /*bRegex*/ false); } From e966e25763de862c93ea21fc08f12242dcd7ec69 Mon Sep 17 00:00:00 2001 From: Alex Sepkowski Date: Wed, 15 Jul 2026 13:25:45 -0700 Subject: [PATCH 4/4] Apply clang-format to PSV runtime-info size helper Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 942a5e5f-0252-472b-9529-7218fdab7664 --- tools/clang/unittests/HLSL/ValidationTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/clang/unittests/HLSL/ValidationTest.cpp b/tools/clang/unittests/HLSL/ValidationTest.cpp index 5d3a56c9ac..96b07318bf 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(sizeof(PSVRuntimeInfo4)) : static_cast(sizeof(PSVRuntimeInfo3)); }