Skip to content

Commit 065f781

Browse files
authored
Change highest supported shader model to 6.5 for the release (#3188)
Shader model 6.6 is not yet fully supported.
1 parent 406aa1e commit 065f781

6 files changed

Lines changed: 61 additions & 93 deletions

File tree

include/dxc/DXIL/DxilConstants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace DXIL {
2929
const unsigned kDxilMajor = 1;
3030
/* <py::lines('VALRULE-TEXT')>hctdb_instrhelp.get_dxil_version_minor()</py>*/
3131
// VALRULE-TEXT:BEGIN
32-
const unsigned kDxilMinor = 6;
32+
const unsigned kDxilMinor = 5;
3333
// VALRULE-TEXT:END
3434

3535
inline unsigned MakeDxilVersion(unsigned DxilMajor, unsigned DxilMinor) {

include/dxc/DXIL/DxilShaderModel.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ShaderModel {
3131
/* <py::lines('VALRULE-TEXT')>hctdb_instrhelp.get_highest_shader_model()</py>*/
3232
// VALRULE-TEXT:BEGIN
3333
static const unsigned kHighestMajor = 6;
34-
static const unsigned kHighestMinor = 6;
34+
static const unsigned kHighestMinor = 5;
3535
// VALRULE-TEXT:END
3636
static const unsigned kOfflineMinor = 0xF;
3737

@@ -67,7 +67,6 @@ class ShaderModel {
6767
bool IsSM63Plus() const { return IsSMAtLeast(6, 3); }
6868
bool IsSM64Plus() const { return IsSMAtLeast(6, 4); }
6969
bool IsSM65Plus() const { return IsSMAtLeast(6, 5); }
70-
bool IsSM66Plus() const { return IsSMAtLeast(6, 6); }
7170
// VALRULE-TEXT:END
7271
const char *GetName() const { return m_pszName; }
7372
const char *GetKindName() const;
@@ -97,7 +96,7 @@ class ShaderModel {
9796
bool m_bUAVs, bool m_bTypedUavs, unsigned m_UAVRegsLim);
9897
/* <py::lines('VALRULE-TEXT')>hctdb_instrhelp.get_num_shader_models()</py>*/
9998
// VALRULE-TEXT:BEGIN
100-
static const unsigned kNumShaderModels = 74;
99+
static const unsigned kNumShaderModels = 65;
101100
// VALRULE-TEXT:END
102101
static const ShaderModel ms_ShaderModels[kNumShaderModels];
103102

include/dxc/Support/HLSLOptions.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def Oconfig : CommaJoined<["-"], "Oconfig=">, Group<spirv_Group>, Flags<[CoreOpt
330330
def target_profile : JoinedOrSeparate<["-", "/"], "T">, Flags<[CoreOption]>, Group<hlslcomp_Group>, MetaVarName<"<profile>">,
331331
/* <py::lines('VALRULE-TEXT')>hctdb_instrhelp.get_target_profiles()</py>*/
332332
// VALRULE-TEXT:BEGIN
333-
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, \n\t\t vs_6_0, vs_6_1, vs_6_2, vs_6_3, vs_6_4, vs_6_5, vs_6_6, \n\t\t gs_6_0, gs_6_1, gs_6_2, gs_6_3, gs_6_4, gs_6_5, gs_6_6, \n\t\t hs_6_0, hs_6_1, hs_6_2, hs_6_3, hs_6_4, hs_6_5, hs_6_6, \n\t\t ds_6_0, ds_6_1, ds_6_2, ds_6_3, ds_6_4, ds_6_5, ds_6_6, \n\t\t cs_6_0, cs_6_1, cs_6_2, cs_6_3, cs_6_4, cs_6_5, cs_6_6, \n\t\t lib_6_1, lib_6_2, lib_6_3, lib_6_4, lib_6_5, lib_6_6, \n\t\t ms_6_5, ms_6_6, \n\t\t as_6_5, as_6_6, \n\t\t ">;
333+
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, \n\t\t vs_6_0, vs_6_1, vs_6_2, vs_6_3, vs_6_4, vs_6_5, \n\t\t gs_6_0, gs_6_1, gs_6_2, gs_6_3, gs_6_4, gs_6_5, \n\t\t hs_6_0, hs_6_1, hs_6_2, hs_6_3, hs_6_4, hs_6_5, \n\t\t ds_6_0, ds_6_1, ds_6_2, ds_6_3, ds_6_4, ds_6_5, \n\t\t cs_6_0, cs_6_1, cs_6_2, cs_6_3, cs_6_4, cs_6_5, \n\t\t lib_6_1, lib_6_2, lib_6_3, lib_6_4, lib_6_5, \n\t\t ms_6_5, \n\t\t as_6_5, \n\t\t ">;
334334
// VALRULE-TEXT:END
335335
def entrypoint : JoinedOrSeparate<["-", "/"], "E">, Flags<[CoreOption, RewriteOption]>, Group<hlslcomp_Group>,
336336
HelpText<"Entry point name">;

lib/DXIL/DxilShaderModel.cpp

Lines changed: 55 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ bool ShaderModel::IsValidForDxil() const {
6262
case 3:
6363
case 4:
6464
case 5:
65-
case 6:
6665
// VALRULE-TEXT:END
6766
return true;
6867
case kOfflineMinor:
@@ -93,70 +92,61 @@ const ShaderModel *ShaderModel::Get(Kind Kind, unsigned Major, unsigned Minor) {
9392
{1539,7}, //ps_6_3
9493
{1540,8}, //ps_6_4
9594
{1541,9}, //ps_6_5
96-
{1542,10}, //ps_6_6
97-
{66560,11}, //vs_4_0
98-
{66561,12}, //vs_4_1
99-
{66816,13}, //vs_5_0
100-
{66817,14}, //vs_5_1
101-
{67072,15}, //vs_6_0
102-
{67073,16}, //vs_6_1
103-
{67074,17}, //vs_6_2
104-
{67075,18}, //vs_6_3
105-
{67076,19}, //vs_6_4
106-
{67077,20}, //vs_6_5
107-
{67078,21}, //vs_6_6
108-
{132096,22}, //gs_4_0
109-
{132097,23}, //gs_4_1
110-
{132352,24}, //gs_5_0
111-
{132353,25}, //gs_5_1
112-
{132608,26}, //gs_6_0
113-
{132609,27}, //gs_6_1
114-
{132610,28}, //gs_6_2
115-
{132611,29}, //gs_6_3
116-
{132612,30}, //gs_6_4
117-
{132613,31}, //gs_6_5
118-
{132614,32}, //gs_6_6
119-
{197888,33}, //hs_5_0
120-
{197889,34}, //hs_5_1
121-
{198144,35}, //hs_6_0
122-
{198145,36}, //hs_6_1
123-
{198146,37}, //hs_6_2
124-
{198147,38}, //hs_6_3
125-
{198148,39}, //hs_6_4
126-
{198149,40}, //hs_6_5
127-
{198150,41}, //hs_6_6
128-
{263424,42}, //ds_5_0
129-
{263425,43}, //ds_5_1
130-
{263680,44}, //ds_6_0
131-
{263681,45}, //ds_6_1
132-
{263682,46}, //ds_6_2
133-
{263683,47}, //ds_6_3
134-
{263684,48}, //ds_6_4
135-
{263685,49}, //ds_6_5
136-
{263686,50}, //ds_6_6
137-
{328704,51}, //cs_4_0
138-
{328705,52}, //cs_4_1
139-
{328960,53}, //cs_5_0
140-
{328961,54}, //cs_5_1
141-
{329216,55}, //cs_6_0
142-
{329217,56}, //cs_6_1
143-
{329218,57}, //cs_6_2
144-
{329219,58}, //cs_6_3
145-
{329220,59}, //cs_6_4
146-
{329221,60}, //cs_6_5
147-
{329222,61}, //cs_6_6
148-
{394753,62}, //lib_6_1
149-
{394754,63}, //lib_6_2
150-
{394755,64}, //lib_6_3
151-
{394756,65}, //lib_6_4
152-
{394757,66}, //lib_6_5
153-
{394758,67}, //lib_6_6
95+
{66560,10}, //vs_4_0
96+
{66561,11}, //vs_4_1
97+
{66816,12}, //vs_5_0
98+
{66817,13}, //vs_5_1
99+
{67072,14}, //vs_6_0
100+
{67073,15}, //vs_6_1
101+
{67074,16}, //vs_6_2
102+
{67075,17}, //vs_6_3
103+
{67076,18}, //vs_6_4
104+
{67077,19}, //vs_6_5
105+
{132096,20}, //gs_4_0
106+
{132097,21}, //gs_4_1
107+
{132352,22}, //gs_5_0
108+
{132353,23}, //gs_5_1
109+
{132608,24}, //gs_6_0
110+
{132609,25}, //gs_6_1
111+
{132610,26}, //gs_6_2
112+
{132611,27}, //gs_6_3
113+
{132612,28}, //gs_6_4
114+
{132613,29}, //gs_6_5
115+
{197888,30}, //hs_5_0
116+
{197889,31}, //hs_5_1
117+
{198144,32}, //hs_6_0
118+
{198145,33}, //hs_6_1
119+
{198146,34}, //hs_6_2
120+
{198147,35}, //hs_6_3
121+
{198148,36}, //hs_6_4
122+
{198149,37}, //hs_6_5
123+
{263424,38}, //ds_5_0
124+
{263425,39}, //ds_5_1
125+
{263680,40}, //ds_6_0
126+
{263681,41}, //ds_6_1
127+
{263682,42}, //ds_6_2
128+
{263683,43}, //ds_6_3
129+
{263684,44}, //ds_6_4
130+
{263685,45}, //ds_6_5
131+
{328704,46}, //cs_4_0
132+
{328705,47}, //cs_4_1
133+
{328960,48}, //cs_5_0
134+
{328961,49}, //cs_5_1
135+
{329216,50}, //cs_6_0
136+
{329217,51}, //cs_6_1
137+
{329218,52}, //cs_6_2
138+
{329219,53}, //cs_6_3
139+
{329220,54}, //cs_6_4
140+
{329221,55}, //cs_6_5
141+
{394753,56}, //lib_6_1
142+
{394754,57}, //lib_6_2
143+
{394755,58}, //lib_6_3
144+
{394756,59}, //lib_6_4
145+
{394757,60}, //lib_6_5
154146
// lib_6_x is for offline linking only, and relaxes restrictions
155-
{394767,68},//lib_6_x
156-
{853509,69}, //ms_6_5
157-
{853510,70}, //ms_6_6
158-
{919045,71}, //as_6_5
159-
{919046,72}, //as_6_6
147+
{394767,61},//lib_6_x
148+
{853509,62}, //ms_6_5
149+
{919045,63}, //as_6_5
160150
};
161151
unsigned hash = (unsigned)Kind << 16 | Major << 8 | Minor;
162152
auto it = hashToIdxMap.find(hash);
@@ -231,12 +221,6 @@ const ShaderModel *ShaderModel::GetByName(const char *pszName) {
231221
break;
232222
}
233223
else return GetInvalid();
234-
case '6':
235-
if (Major == 6) {
236-
Minor = 6;
237-
break;
238-
}
239-
else return GetInvalid();
240224
// VALRULE-TEXT:END
241225
case 'x':
242226
if (kind == Kind::Library && Major == 6) {
@@ -276,11 +260,8 @@ void ShaderModel::GetDxilVersion(unsigned &DxilMajor, unsigned &DxilMinor) const
276260
case 5:
277261
DxilMinor = 5;
278262
break;
279-
case 6:
280-
DxilMinor = 6;
281-
break;
282263
case kOfflineMinor: // Always update this to highest dxil version
283-
DxilMinor = 6;
264+
DxilMinor = 5;
284265
break;
285266
// VALRULE-TEXT:END
286267
default:
@@ -313,9 +294,6 @@ void ShaderModel::GetMinValidatorVersion(unsigned &ValMajor, unsigned &ValMinor)
313294
case 5:
314295
ValMinor = 5;
315296
break;
316-
case 6:
317-
ValMinor = 6;
318-
break;
319297
// VALRULE-TEXT:END
320298
case kOfflineMinor:
321299
ValMajor = 0;
@@ -364,7 +342,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
364342
SM(Kind::Pixel, 6, 3, "ps_6_3", 32, 8, true, true, UINT_MAX),
365343
SM(Kind::Pixel, 6, 4, "ps_6_4", 32, 8, true, true, UINT_MAX),
366344
SM(Kind::Pixel, 6, 5, "ps_6_5", 32, 8, true, true, UINT_MAX),
367-
SM(Kind::Pixel, 6, 6, "ps_6_6", 32, 8, true, true, UINT_MAX),
368345
SM(Kind::Vertex, 4, 0, "vs_4_0", 16, 16, false, false, 0),
369346
SM(Kind::Vertex, 4, 1, "vs_4_1", 32, 32, false, false, 0),
370347
SM(Kind::Vertex, 5, 0, "vs_5_0", 32, 32, true, true, 64),
@@ -375,7 +352,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
375352
SM(Kind::Vertex, 6, 3, "vs_6_3", 32, 32, true, true, UINT_MAX),
376353
SM(Kind::Vertex, 6, 4, "vs_6_4", 32, 32, true, true, UINT_MAX),
377354
SM(Kind::Vertex, 6, 5, "vs_6_5", 32, 32, true, true, UINT_MAX),
378-
SM(Kind::Vertex, 6, 6, "vs_6_6", 32, 32, true, true, UINT_MAX),
379355
SM(Kind::Geometry, 4, 0, "gs_4_0", 16, 32, false, false, 0),
380356
SM(Kind::Geometry, 4, 1, "gs_4_1", 32, 32, false, false, 0),
381357
SM(Kind::Geometry, 5, 0, "gs_5_0", 32, 32, true, true, 64),
@@ -386,7 +362,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
386362
SM(Kind::Geometry, 6, 3, "gs_6_3", 32, 32, true, true, UINT_MAX),
387363
SM(Kind::Geometry, 6, 4, "gs_6_4", 32, 32, true, true, UINT_MAX),
388364
SM(Kind::Geometry, 6, 5, "gs_6_5", 32, 32, true, true, UINT_MAX),
389-
SM(Kind::Geometry, 6, 6, "gs_6_6", 32, 32, true, true, UINT_MAX),
390365
SM(Kind::Hull, 5, 0, "hs_5_0", 32, 32, true, true, 64),
391366
SM(Kind::Hull, 5, 1, "hs_5_1", 32, 32, true, true, 64),
392367
SM(Kind::Hull, 6, 0, "hs_6_0", 32, 32, true, true, UINT_MAX),
@@ -395,7 +370,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
395370
SM(Kind::Hull, 6, 3, "hs_6_3", 32, 32, true, true, UINT_MAX),
396371
SM(Kind::Hull, 6, 4, "hs_6_4", 32, 32, true, true, UINT_MAX),
397372
SM(Kind::Hull, 6, 5, "hs_6_5", 32, 32, true, true, UINT_MAX),
398-
SM(Kind::Hull, 6, 6, "hs_6_6", 32, 32, true, true, UINT_MAX),
399373
SM(Kind::Domain, 5, 0, "ds_5_0", 32, 32, true, true, 64),
400374
SM(Kind::Domain, 5, 1, "ds_5_1", 32, 32, true, true, 64),
401375
SM(Kind::Domain, 6, 0, "ds_6_0", 32, 32, true, true, UINT_MAX),
@@ -404,7 +378,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
404378
SM(Kind::Domain, 6, 3, "ds_6_3", 32, 32, true, true, UINT_MAX),
405379
SM(Kind::Domain, 6, 4, "ds_6_4", 32, 32, true, true, UINT_MAX),
406380
SM(Kind::Domain, 6, 5, "ds_6_5", 32, 32, true, true, UINT_MAX),
407-
SM(Kind::Domain, 6, 6, "ds_6_6", 32, 32, true, true, UINT_MAX),
408381
SM(Kind::Compute, 4, 0, "cs_4_0", 0, 0, false, false, 0),
409382
SM(Kind::Compute, 4, 1, "cs_4_1", 0, 0, false, false, 0),
410383
SM(Kind::Compute, 5, 0, "cs_5_0", 0, 0, true, true, 64),
@@ -415,19 +388,15 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
415388
SM(Kind::Compute, 6, 3, "cs_6_3", 0, 0, true, true, UINT_MAX),
416389
SM(Kind::Compute, 6, 4, "cs_6_4", 0, 0, true, true, UINT_MAX),
417390
SM(Kind::Compute, 6, 5, "cs_6_5", 0, 0, true, true, UINT_MAX),
418-
SM(Kind::Compute, 6, 6, "cs_6_6", 0, 0, true, true, UINT_MAX),
419391
SM(Kind::Library, 6, 1, "lib_6_1", 32, 32, true, true, UINT_MAX),
420392
SM(Kind::Library, 6, 2, "lib_6_2", 32, 32, true, true, UINT_MAX),
421393
SM(Kind::Library, 6, 3, "lib_6_3", 32, 32, true, true, UINT_MAX),
422394
SM(Kind::Library, 6, 4, "lib_6_4", 32, 32, true, true, UINT_MAX),
423395
SM(Kind::Library, 6, 5, "lib_6_5", 32, 32, true, true, UINT_MAX),
424-
SM(Kind::Library, 6, 6, "lib_6_6", 32, 32, true, true, UINT_MAX),
425396
// lib_6_x is for offline linking only, and relaxes restrictions
426397
SM(Kind::Library, 6, kOfflineMinor, "lib_6_x", 32, 32, true, true, UINT_MAX),
427398
SM(Kind::Mesh, 6, 5, "ms_6_5", 0, 0, true, true, UINT_MAX),
428-
SM(Kind::Mesh, 6, 6, "ms_6_6", 0, 0, true, true, UINT_MAX),
429399
SM(Kind::Amplification, 6, 5, "as_6_5", 0, 0, true, true, UINT_MAX),
430-
SM(Kind::Amplification, 6, 6, "as_6_6", 0, 0, true, true, UINT_MAX),
431400
// Values before Invalid must remain sorted by Kind, then Major, then Minor.
432401
SM(Kind::Invalid, 0, 0, "invalid", 0, 0, false, false, 0),
433402
// VALRULE-TEXT:END

lib/HLSL/DxilValidation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5573,7 +5573,7 @@ void GetValidationVersion(_Out_ unsigned *pMajor, _Out_ unsigned *pMinor) {
55735573
// - Mesh and Amplification shaders
55745574
// - DXR 1.1 & RayQuery support
55755575
*pMajor = 1;
5576-
*pMinor = 6;
5576+
*pMinor = 5;
55775577
// VALRULE-TEXT:END
55785578
}
55795579

utils/hct/hctdb_instrhelp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ def get_interpretation_table():
11051105
return run_with_stdout(lambda: gen.print_interpretation_table())
11061106

11071107
highest_major = 6
1108-
highest_minor = 6
1108+
highest_minor = 5
11091109
highest_shader_models = {4:1, 5:1, 6:highest_minor}
11101110

11111111
def getShaderModels():

0 commit comments

Comments
 (0)