Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/dxc/DXIL/DxilConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace DXIL {
const unsigned kDxilMajor = 1;
/* <py::lines('VALRULE-TEXT')>hctdb_instrhelp.get_dxil_version_minor()</py>*/
// VALRULE-TEXT:BEGIN
const unsigned kDxilMinor = 10;
const unsigned kDxilMinor = 9;
// VALRULE-TEXT:END

inline unsigned MakeDxilVersion(unsigned DxilMajor, unsigned DxilMinor) {
Expand Down
5 changes: 2 additions & 3 deletions include/dxc/DXIL/DxilShaderModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -139,7 +138,7 @@ class ShaderModel {
bool m_bTypedUavs, unsigned m_UAVRegsLim);
/* <py::lines('VALRULE-TEXT')>hctdb_instrhelp.get_num_shader_models()</py>*/
// VALRULE-TEXT:BEGIN
static const unsigned kNumShaderModels = 116;
static const unsigned kNumShaderModels = 107;
// VALRULE-TEXT:END
static const ShaderModel ms_ShaderModels[kNumShaderModels];

Expand Down
2 changes: 1 addition & 1 deletion include/dxc/Support/HLSLOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def fvk_bind_counter_heap : MultiArg<["-"], "fvk-bind-counter-heap", 2>, MetaVar
def target_profile : JoinedOrSeparate<["-", "/"], "T">, Flags<[CoreOption]>, Group<hlslcomp_Group>, MetaVarName<"<profile>">,
/* <py::lines('VALRULE-TEXT')>hctdb_instrhelp.get_target_profiles()</py>*/
// VALRULE-TEXT:BEGIN
HelpText<"Set target profile. \n\t<profile>: 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<profile>: 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<hlslcomp_Group>,
HelpText<"Entry point name">;
Expand Down
237 changes: 106 additions & 131 deletions lib/DXIL/DxilShaderModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ bool ShaderModel::IsValidForDxil() const {
case 7:
case 8:
case 9:
case 10:
// VALRULE-TEXT:END
return true;
case kOfflineMinor:
Expand All @@ -80,122 +79,113 @@ const ShaderModel *ShaderModel::Get(Kind Kind, unsigned Major, unsigned Minor) {
/* <py::lines('VALRULE-TEXT')>hctdb_instrhelp.get_shader_model_get()</py>*/
// VALRULE-TEXT:BEGIN
const static std::pair<unsigned, unsigned> 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<unsigned, unsigned> &elem, unsigned val) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utils/hct/hctdb_instrhelp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,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
Expand Down