Skip to content

Commit e48d979

Browse files
authored
Revert to highest shader model 6.6 for the release (#3852)
1 parent daabbb3 commit e48d979

6 files changed

Lines changed: 69 additions & 101 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 = 7;
32+
const unsigned kDxilMinor = 6;
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 = 7;
34+
static const unsigned kHighestMinor = 6;
3535
// VALRULE-TEXT:END
3636
static const unsigned kOfflineMinor = 0xF;
3737

@@ -68,7 +68,6 @@ class ShaderModel {
6868
bool IsSM64Plus() const { return IsSMAtLeast(6, 4); }
6969
bool IsSM65Plus() const { return IsSMAtLeast(6, 5); }
7070
bool IsSM66Plus() const { return IsSMAtLeast(6, 6); }
71-
bool IsSM67Plus() const { return IsSMAtLeast(6, 7); }
7271
// VALRULE-TEXT:END
7372
const char *GetName() const { return m_pszName; }
7473
const char *GetKindName() const;
@@ -98,7 +97,7 @@ class ShaderModel {
9897
bool m_bUAVs, bool m_bTypedUavs, unsigned m_UAVRegsLim);
9998
/* <py::lines('VALRULE-TEXT')>hctdb_instrhelp.get_num_shader_models()</py>*/
10099
// VALRULE-TEXT:BEGIN
101-
static const unsigned kNumShaderModels = 83;
100+
static const unsigned kNumShaderModels = 74;
102101
// VALRULE-TEXT:END
103102
static const ShaderModel ms_ShaderModels[kNumShaderModels];
104103

include/dxc/Support/HLSLOptions.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def Oconfig : CommaJoined<["-"], "Oconfig=">, Group<spirv_Group>, Flags<[CoreOpt
350350
def target_profile : JoinedOrSeparate<["-", "/"], "T">, Flags<[CoreOption]>, Group<hlslcomp_Group>, MetaVarName<"<profile>">,
351351
/* <py::lines('VALRULE-TEXT')>hctdb_instrhelp.get_target_profiles()</py>*/
352352
// VALRULE-TEXT:BEGIN
353-
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, \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, \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, \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, \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, \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, \n\t\t lib_6_1, lib_6_2, lib_6_3, lib_6_4, lib_6_5, lib_6_6, lib_6_7, \n\t\t ms_6_5, ms_6_6, ms_6_7, \n\t\t as_6_5, as_6_6, as_6_7, \n\t\t ">;
353+
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 ">;
354354
// VALRULE-TEXT:END
355355
def entrypoint : JoinedOrSeparate<["-", "/"], "E">, Flags<[CoreOption, RewriteOption]>, Group<hlslcomp_Group>,
356356
HelpText<"Entry point name">;

lib/DXIL/DxilShaderModel.cpp

Lines changed: 63 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ bool ShaderModel::IsValidForDxil() const {
6363
case 4:
6464
case 5:
6565
case 6:
66-
case 7:
6766
// VALRULE-TEXT:END
6867
return true;
6968
case kOfflineMinor:
@@ -95,78 +94,69 @@ const ShaderModel *ShaderModel::Get(Kind Kind, unsigned Major, unsigned Minor) {
9594
{1540,8}, //ps_6_4
9695
{1541,9}, //ps_6_5
9796
{1542,10}, //ps_6_6
98-
{1543,11}, //ps_6_7
99-
{66560,12}, //vs_4_0
100-
{66561,13}, //vs_4_1
101-
{66816,14}, //vs_5_0
102-
{66817,15}, //vs_5_1
103-
{67072,16}, //vs_6_0
104-
{67073,17}, //vs_6_1
105-
{67074,18}, //vs_6_2
106-
{67075,19}, //vs_6_3
107-
{67076,20}, //vs_6_4
108-
{67077,21}, //vs_6_5
109-
{67078,22}, //vs_6_6
110-
{67079,23}, //vs_6_7
111-
{132096,24}, //gs_4_0
112-
{132097,25}, //gs_4_1
113-
{132352,26}, //gs_5_0
114-
{132353,27}, //gs_5_1
115-
{132608,28}, //gs_6_0
116-
{132609,29}, //gs_6_1
117-
{132610,30}, //gs_6_2
118-
{132611,31}, //gs_6_3
119-
{132612,32}, //gs_6_4
120-
{132613,33}, //gs_6_5
121-
{132614,34}, //gs_6_6
122-
{132615,35}, //gs_6_7
123-
{197888,36}, //hs_5_0
124-
{197889,37}, //hs_5_1
125-
{198144,38}, //hs_6_0
126-
{198145,39}, //hs_6_1
127-
{198146,40}, //hs_6_2
128-
{198147,41}, //hs_6_3
129-
{198148,42}, //hs_6_4
130-
{198149,43}, //hs_6_5
131-
{198150,44}, //hs_6_6
132-
{198151,45}, //hs_6_7
133-
{263424,46}, //ds_5_0
134-
{263425,47}, //ds_5_1
135-
{263680,48}, //ds_6_0
136-
{263681,49}, //ds_6_1
137-
{263682,50}, //ds_6_2
138-
{263683,51}, //ds_6_3
139-
{263684,52}, //ds_6_4
140-
{263685,53}, //ds_6_5
141-
{263686,54}, //ds_6_6
142-
{263687,55}, //ds_6_7
143-
{328704,56}, //cs_4_0
144-
{328705,57}, //cs_4_1
145-
{328960,58}, //cs_5_0
146-
{328961,59}, //cs_5_1
147-
{329216,60}, //cs_6_0
148-
{329217,61}, //cs_6_1
149-
{329218,62}, //cs_6_2
150-
{329219,63}, //cs_6_3
151-
{329220,64}, //cs_6_4
152-
{329221,65}, //cs_6_5
153-
{329222,66}, //cs_6_6
154-
{329223,67}, //cs_6_7
155-
{394753,68}, //lib_6_1
156-
{394754,69}, //lib_6_2
157-
{394755,70}, //lib_6_3
158-
{394756,71}, //lib_6_4
159-
{394757,72}, //lib_6_5
160-
{394758,73}, //lib_6_6
161-
{394759,74}, //lib_6_7
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
162154
// lib_6_x is for offline linking only, and relaxes restrictions
163-
{394767,75},//lib_6_x
164-
{853509,76}, //ms_6_5
165-
{853510,77}, //ms_6_6
166-
{853511,78}, //ms_6_7
167-
{919045,79}, //as_6_5
168-
{919046,80}, //as_6_6
169-
{919047,81}, //as_6_7
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
170160
};
171161
unsigned hash = (unsigned)Kind << 16 | Major << 8 | Minor;
172162
auto it = hashToIdxMap.find(hash);
@@ -247,12 +237,6 @@ const ShaderModel *ShaderModel::GetByName(const char *pszName) {
247237
break;
248238
}
249239
else return GetInvalid();
250-
case '7':
251-
if (Major == 6) {
252-
Minor = 7;
253-
break;
254-
}
255-
else return GetInvalid();
256240
// VALRULE-TEXT:END
257241
case 'x':
258242
if (kind == Kind::Library && Major == 6) {
@@ -295,11 +279,8 @@ void ShaderModel::GetDxilVersion(unsigned &DxilMajor, unsigned &DxilMinor) const
295279
case 6:
296280
DxilMinor = 6;
297281
break;
298-
case 7:
299-
DxilMinor = 7;
300-
break;
301282
case kOfflineMinor: // Always update this to highest dxil version
302-
DxilMinor = 7;
283+
DxilMinor = 6;
303284
break;
304285
// VALRULE-TEXT:END
305286
default:
@@ -335,9 +316,6 @@ void ShaderModel::GetMinValidatorVersion(unsigned &ValMajor, unsigned &ValMinor)
335316
case 6:
336317
ValMinor = 6;
337318
break;
338-
case 7:
339-
ValMinor = 7;
340-
break;
341319
// VALRULE-TEXT:END
342320
case kOfflineMinor:
343321
ValMajor = 0;
@@ -387,7 +365,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
387365
SM(Kind::Pixel, 6, 4, "ps_6_4", 32, 8, true, true, UINT_MAX),
388366
SM(Kind::Pixel, 6, 5, "ps_6_5", 32, 8, true, true, UINT_MAX),
389367
SM(Kind::Pixel, 6, 6, "ps_6_6", 32, 8, true, true, UINT_MAX),
390-
SM(Kind::Pixel, 6, 7, "ps_6_7", 32, 8, true, true, UINT_MAX),
391368
SM(Kind::Vertex, 4, 0, "vs_4_0", 16, 16, false, false, 0),
392369
SM(Kind::Vertex, 4, 1, "vs_4_1", 32, 32, false, false, 0),
393370
SM(Kind::Vertex, 5, 0, "vs_5_0", 32, 32, true, true, 64),
@@ -399,7 +376,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
399376
SM(Kind::Vertex, 6, 4, "vs_6_4", 32, 32, true, true, UINT_MAX),
400377
SM(Kind::Vertex, 6, 5, "vs_6_5", 32, 32, true, true, UINT_MAX),
401378
SM(Kind::Vertex, 6, 6, "vs_6_6", 32, 32, true, true, UINT_MAX),
402-
SM(Kind::Vertex, 6, 7, "vs_6_7", 32, 32, true, true, UINT_MAX),
403379
SM(Kind::Geometry, 4, 0, "gs_4_0", 16, 32, false, false, 0),
404380
SM(Kind::Geometry, 4, 1, "gs_4_1", 32, 32, false, false, 0),
405381
SM(Kind::Geometry, 5, 0, "gs_5_0", 32, 32, true, true, 64),
@@ -411,7 +387,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
411387
SM(Kind::Geometry, 6, 4, "gs_6_4", 32, 32, true, true, UINT_MAX),
412388
SM(Kind::Geometry, 6, 5, "gs_6_5", 32, 32, true, true, UINT_MAX),
413389
SM(Kind::Geometry, 6, 6, "gs_6_6", 32, 32, true, true, UINT_MAX),
414-
SM(Kind::Geometry, 6, 7, "gs_6_7", 32, 32, true, true, UINT_MAX),
415390
SM(Kind::Hull, 5, 0, "hs_5_0", 32, 32, true, true, 64),
416391
SM(Kind::Hull, 5, 1, "hs_5_1", 32, 32, true, true, 64),
417392
SM(Kind::Hull, 6, 0, "hs_6_0", 32, 32, true, true, UINT_MAX),
@@ -421,7 +396,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
421396
SM(Kind::Hull, 6, 4, "hs_6_4", 32, 32, true, true, UINT_MAX),
422397
SM(Kind::Hull, 6, 5, "hs_6_5", 32, 32, true, true, UINT_MAX),
423398
SM(Kind::Hull, 6, 6, "hs_6_6", 32, 32, true, true, UINT_MAX),
424-
SM(Kind::Hull, 6, 7, "hs_6_7", 32, 32, true, true, UINT_MAX),
425399
SM(Kind::Domain, 5, 0, "ds_5_0", 32, 32, true, true, 64),
426400
SM(Kind::Domain, 5, 1, "ds_5_1", 32, 32, true, true, 64),
427401
SM(Kind::Domain, 6, 0, "ds_6_0", 32, 32, true, true, UINT_MAX),
@@ -431,7 +405,6 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
431405
SM(Kind::Domain, 6, 4, "ds_6_4", 32, 32, true, true, UINT_MAX),
432406
SM(Kind::Domain, 6, 5, "ds_6_5", 32, 32, true, true, UINT_MAX),
433407
SM(Kind::Domain, 6, 6, "ds_6_6", 32, 32, true, true, UINT_MAX),
434-
SM(Kind::Domain, 6, 7, "ds_6_7", 32, 32, true, true, UINT_MAX),
435408
SM(Kind::Compute, 4, 0, "cs_4_0", 0, 0, false, false, 0),
436409
SM(Kind::Compute, 4, 1, "cs_4_1", 0, 0, false, false, 0),
437410
SM(Kind::Compute, 5, 0, "cs_5_0", 0, 0, true, true, 64),
@@ -443,22 +416,18 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
443416
SM(Kind::Compute, 6, 4, "cs_6_4", 0, 0, true, true, UINT_MAX),
444417
SM(Kind::Compute, 6, 5, "cs_6_5", 0, 0, true, true, UINT_MAX),
445418
SM(Kind::Compute, 6, 6, "cs_6_6", 0, 0, true, true, UINT_MAX),
446-
SM(Kind::Compute, 6, 7, "cs_6_7", 0, 0, true, true, UINT_MAX),
447419
SM(Kind::Library, 6, 1, "lib_6_1", 32, 32, true, true, UINT_MAX),
448420
SM(Kind::Library, 6, 2, "lib_6_2", 32, 32, true, true, UINT_MAX),
449421
SM(Kind::Library, 6, 3, "lib_6_3", 32, 32, true, true, UINT_MAX),
450422
SM(Kind::Library, 6, 4, "lib_6_4", 32, 32, true, true, UINT_MAX),
451423
SM(Kind::Library, 6, 5, "lib_6_5", 32, 32, true, true, UINT_MAX),
452424
SM(Kind::Library, 6, 6, "lib_6_6", 32, 32, true, true, UINT_MAX),
453-
SM(Kind::Library, 6, 7, "lib_6_7", 32, 32, true, true, UINT_MAX),
454425
// lib_6_x is for offline linking only, and relaxes restrictions
455426
SM(Kind::Library, 6, kOfflineMinor, "lib_6_x", 32, 32, true, true, UINT_MAX),
456427
SM(Kind::Mesh, 6, 5, "ms_6_5", 0, 0, true, true, UINT_MAX),
457428
SM(Kind::Mesh, 6, 6, "ms_6_6", 0, 0, true, true, UINT_MAX),
458-
SM(Kind::Mesh, 6, 7, "ms_6_7", 0, 0, true, true, UINT_MAX),
459429
SM(Kind::Amplification, 6, 5, "as_6_5", 0, 0, true, true, UINT_MAX),
460430
SM(Kind::Amplification, 6, 6, "as_6_6", 0, 0, true, true, UINT_MAX),
461-
SM(Kind::Amplification, 6, 7, "as_6_7", 0, 0, true, true, UINT_MAX),
462431
// Values before Invalid must remain sorted by Kind, then Major, then Minor.
463432
SM(Kind::Invalid, 0, 0, "invalid", 0, 0, false, false, 0),
464433
// VALRULE-TEXT:END

lib/HLSL/DxilValidation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5749,7 +5749,7 @@ void GetValidationVersion(_Out_ unsigned *pMajor, _Out_ unsigned *pMinor) {
57495749
// - Mesh and Amplification shaders
57505750
// - DXR 1.1 & RayQuery support
57515751
*pMajor = 1;
5752-
*pMinor = 7;
5752+
*pMinor = 6;
57535753
// VALRULE-TEXT:END
57545754
}
57555755

utils/hct/hctdb_instrhelp.py

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

11461146
highest_major = 6
1147-
highest_minor = 7
1147+
highest_minor = 6
11481148
highest_shader_models = {4:1, 5:1, 6:highest_minor}
11491149

11501150
def getShaderModels():

0 commit comments

Comments
 (0)