bump up version to SM6.3 and DXIL1.3
This commit is contained in:
Young Kim 2018-02-12 13:27:48 -08:00 коммит произвёл GitHub
Родитель 774e85eb20
Коммит 2af98c8a43
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 30 добавлений и 8 удалений

Просмотреть файл

@ -27,7 +27,7 @@ import hctdb_instrhelp
namespace DXIL { namespace DXIL {
// DXIL version. // DXIL version.
const unsigned kDxilMajor = 1; const unsigned kDxilMajor = 1;
const unsigned kDxilMinor = 2; const unsigned kDxilMinor = 3;
inline unsigned MakeDxilVersion(unsigned DxilMajor, unsigned DxilMinor) { inline unsigned MakeDxilVersion(unsigned DxilMajor, unsigned DxilMinor) {
return 0 | (DxilMajor << 8) | (DxilMinor); return 0 | (DxilMajor << 8) | (DxilMinor);

Просмотреть файл

@ -29,7 +29,7 @@ public:
// Major/Minor version of highest shader model // Major/Minor version of highest shader model
static const unsigned kHighestMajor = 6; static const unsigned kHighestMajor = 6;
static const unsigned kHighestMinor = 1; static const unsigned kHighestMinor = 3;
bool IsPS() const { return m_Kind == Kind::Pixel; } bool IsPS() const { return m_Kind == Kind::Pixel; }
bool IsVS() const { return m_Kind == Kind::Vertex; } bool IsVS() const { return m_Kind == Kind::Vertex; }
@ -86,7 +86,7 @@ private:
unsigned m_NumInputRegs, unsigned m_NumOutputRegs, unsigned m_NumInputRegs, unsigned m_NumOutputRegs,
bool m_bUAVs, bool m_bTypedUavs, unsigned m_UAVRegsLim); bool m_bUAVs, bool m_bTypedUavs, unsigned m_UAVRegsLim);
static const unsigned kNumShaderModels = 41; static const unsigned kNumShaderModels = 48;
static const ShaderModel ms_ShaderModels[kNumShaderModels]; static const ShaderModel ms_ShaderModels[kNumShaderModels];
static const ShaderModel *GetInvalid(); static const ShaderModel *GetInvalid();

Просмотреть файл

@ -55,6 +55,7 @@ bool ShaderModel::IsValidForDxil() const {
case 0: case 0:
case 1: case 1:
case 2: case 2:
case 3:
return true; return true;
} }
} }
@ -125,6 +126,12 @@ const ShaderModel *ShaderModel::GetByName(const char *pszName) {
break; break;
} }
else return GetInvalid(); else return GetInvalid();
case '3':
if (Major == 6) {
Minor = 3;
break;
}
else return GetInvalid();
default: return GetInvalid(); default: return GetInvalid();
} }
if (pszName[Idx++] != 0) if (pszName[Idx++] != 0)
@ -146,6 +153,9 @@ void ShaderModel::GetDxilVersion(unsigned &DxilMajor, unsigned &DxilMinor) const
case 2: case 2:
DxilMinor = 2; DxilMinor = 2;
break; break;
case 3:
DxilMinor = 3;
break;
default: default:
DXASSERT(0, "IsValidForDxil() should have caught this."); DXASSERT(0, "IsValidForDxil() should have caught this.");
break; break;
@ -165,6 +175,9 @@ void ShaderModel::GetMinValidatorVersion(unsigned &ValMajor, unsigned &ValMinor)
case 2: case 2:
ValMinor = 2; ValMinor = 2;
break; break;
case 3:
ValMinor = 3;
break;
default: default:
DXASSERT(0, "IsValidForDxil() should have caught this."); DXASSERT(0, "IsValidForDxil() should have caught this.");
break; break;
@ -198,12 +211,14 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
SM(Kind::Compute, 6, 0, "cs_6_0", 0, 0, true, true, UINT_MAX), SM(Kind::Compute, 6, 0, "cs_6_0", 0, 0, true, true, UINT_MAX),
SM(Kind::Compute, 6, 1, "cs_6_1", 0, 0, true, true, UINT_MAX), SM(Kind::Compute, 6, 1, "cs_6_1", 0, 0, true, true, UINT_MAX),
SM(Kind::Compute, 6, 2, "cs_6_2", 0, 0, true, true, UINT_MAX), SM(Kind::Compute, 6, 2, "cs_6_2", 0, 0, true, true, UINT_MAX),
SM(Kind::Compute, 6, 3, "cs_6_3", 0, 0, true, true, UINT_MAX),
SM(Kind::Domain, 5, 0, "ds_5_0", 32, 32, true, true, 64), SM(Kind::Domain, 5, 0, "ds_5_0", 32, 32, true, true, 64),
SM(Kind::Domain, 5, 1, "ds_5_1", 32, 32, true, true, UINT_MAX), SM(Kind::Domain, 5, 1, "ds_5_1", 32, 32, true, true, UINT_MAX),
SM(Kind::Domain, 6, 0, "ds_6_0", 32, 32, true, true, UINT_MAX), SM(Kind::Domain, 6, 0, "ds_6_0", 32, 32, true, true, UINT_MAX),
SM(Kind::Domain, 6, 1, "ds_6_1", 32, 32, true, true, UINT_MAX), SM(Kind::Domain, 6, 1, "ds_6_1", 32, 32, true, true, UINT_MAX),
SM(Kind::Domain, 6, 2, "ds_6_2", 32, 32, true, true, UINT_MAX), SM(Kind::Domain, 6, 2, "ds_6_2", 32, 32, true, true, UINT_MAX),
SM(Kind::Domain, 6, 3, "ds_6_3", 32, 32, true, true, UINT_MAX),
SM(Kind::Geometry, 4, 0, "gs_4_0", 16, 32, false, false, 0), 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, 4, 1, "gs_4_1", 32, 32, false, false, 0),
@ -212,12 +227,14 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
SM(Kind::Geometry, 6, 0, "gs_6_0", 32, 32, true, true, UINT_MAX), SM(Kind::Geometry, 6, 0, "gs_6_0", 32, 32, true, true, UINT_MAX),
SM(Kind::Geometry, 6, 1, "gs_6_1", 32, 32, true, true, UINT_MAX), SM(Kind::Geometry, 6, 1, "gs_6_1", 32, 32, true, true, UINT_MAX),
SM(Kind::Geometry, 6, 2, "gs_6_2", 32, 32, true, true, UINT_MAX), SM(Kind::Geometry, 6, 2, "gs_6_2", 32, 32, true, true, UINT_MAX),
SM(Kind::Geometry, 6, 3, "gs_6_3", 32, 32, true, true, UINT_MAX),
SM(Kind::Hull, 5, 0, "hs_5_0", 32, 32, true, true, 64), SM(Kind::Hull, 5, 0, "hs_5_0", 32, 32, true, true, 64),
SM(Kind::Hull, 5, 1, "hs_5_1", 32, 32, true, true, UINT_MAX), SM(Kind::Hull, 5, 1, "hs_5_1", 32, 32, true, true, UINT_MAX),
SM(Kind::Hull, 6, 0, "hs_6_0", 32, 32, true, true, UINT_MAX), SM(Kind::Hull, 6, 0, "hs_6_0", 32, 32, true, true, UINT_MAX),
SM(Kind::Hull, 6, 1, "hs_6_1", 32, 32, true, true, UINT_MAX), SM(Kind::Hull, 6, 1, "hs_6_1", 32, 32, true, true, UINT_MAX),
SM(Kind::Hull, 6, 2, "hs_6_2", 32, 32, true, true, UINT_MAX), SM(Kind::Hull, 6, 2, "hs_6_2", 32, 32, true, true, UINT_MAX),
SM(Kind::Hull, 6, 3, "hs_6_3", 32, 32, true, true, UINT_MAX),
SM(Kind::Pixel, 4, 0, "ps_4_0", 32, 8, false, false, 0), SM(Kind::Pixel, 4, 0, "ps_4_0", 32, 8, false, false, 0),
SM(Kind::Pixel, 4, 1, "ps_4_1", 32, 8, false, false, 0), SM(Kind::Pixel, 4, 1, "ps_4_1", 32, 8, false, false, 0),
@ -226,6 +243,7 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
SM(Kind::Pixel, 6, 0, "ps_6_0", 32, 8, true, true, UINT_MAX), SM(Kind::Pixel, 6, 0, "ps_6_0", 32, 8, true, true, UINT_MAX),
SM(Kind::Pixel, 6, 1, "ps_6_1", 32, 8, true, true, UINT_MAX), SM(Kind::Pixel, 6, 1, "ps_6_1", 32, 8, true, true, UINT_MAX),
SM(Kind::Pixel, 6, 2, "ps_6_2", 32, 8, true, true, UINT_MAX), SM(Kind::Pixel, 6, 2, "ps_6_2", 32, 8, true, true, UINT_MAX),
SM(Kind::Pixel, 6, 3, "ps_6_3", 32, 8, true, true, UINT_MAX),
SM(Kind::Vertex, 4, 0, "vs_4_0", 16, 16, false, false, 0), 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, 4, 1, "vs_4_1", 32, 32, false, false, 0),
@ -234,9 +252,11 @@ const ShaderModel ShaderModel::ms_ShaderModels[kNumShaderModels] = {
SM(Kind::Vertex, 6, 0, "vs_6_0", 32, 32, true, true, UINT_MAX), SM(Kind::Vertex, 6, 0, "vs_6_0", 32, 32, true, true, UINT_MAX),
SM(Kind::Vertex, 6, 1, "vs_6_1", 32, 32, true, true, UINT_MAX), SM(Kind::Vertex, 6, 1, "vs_6_1", 32, 32, true, true, UINT_MAX),
SM(Kind::Vertex, 6, 2, "vs_6_2", 32, 32, true, true, UINT_MAX), SM(Kind::Vertex, 6, 2, "vs_6_2", 32, 32, true, true, UINT_MAX),
SM(Kind::Vertex, 6, 3, "vs_6_3", 32, 32, true, true, UINT_MAX),
SM(Kind::Library, 6, 1, "lib_6_1", 32, 32, true, true, UINT_MAX), SM(Kind::Library, 6, 1, "lib_6_1", 32, 32, true, true, UINT_MAX),
SM(Kind::Library, 6, 2, "lib_6_2", 32, 32, true, true, UINT_MAX), SM(Kind::Library, 6, 2, "lib_6_2", 32, 32, true, true, UINT_MAX),
SM(Kind::Library, 6, 3, "lib_6_3", 32, 32, true, true, UINT_MAX),
SM(Kind::Invalid, 0, 0, "invalid", 0, 0, false, false, 0), SM(Kind::Invalid, 0, 0, "invalid", 0, 0, false, false, 0),
}; };

Просмотреть файл

@ -2864,7 +2864,7 @@ static void ValidateDxilVersion(ValidationContext &ValCtx) {
GetNodeOperandAsInt(ValCtx, pVerValues, 1, &minorVer)) { GetNodeOperandAsInt(ValCtx, pVerValues, 1, &minorVer)) {
// This will need to be updated as dxil major/minor versions evolve, // This will need to be updated as dxil major/minor versions evolve,
// depending on the degree of compat across versions. // depending on the degree of compat across versions.
if ((majorVer == 1 && minorVer < 3) && if ((majorVer == 1 && minorVer < 4) &&
(majorVer == ValCtx.m_DxilMajor && minorVer == ValCtx.m_DxilMinor)) { (majorVer == ValCtx.m_DxilMajor && minorVer == ValCtx.m_DxilMinor)) {
return; return;
} }
@ -4262,8 +4262,10 @@ void GetValidationVersion(_Out_ unsigned *pMajor, _Out_ unsigned *pMinor) {
// - ILDN container part support // - ILDN container part support
// 1.2 adds: // 1.2 adds:
// - Metadata for floating point denorm mode // - Metadata for floating point denorm mode
// 1.3 adds:
// TODO: add comment
*pMajor = 1; *pMajor = 1;
*pMinor = 2; *pMinor = 3;
} }
_Use_decl_annotations_ HRESULT _Use_decl_annotations_ HRESULT

Просмотреть файл

@ -40,9 +40,9 @@
// CHECK: !{i32 12, !"L", i8 8, i8 0, !{{[0-9]+}}, i8 2, i32 1, i8 2, i32 7, i8 0, null} // CHECK: !{i32 12, !"L", i8 8, i8 0, !{{[0-9]+}}, i8 2, i32 1, i8 2, i32 7, i8 0, null}
// CHECK: !{i32 13, !"N", i8 8, i8 0, !{{[0-9]+}}, i8 1, i32 1, i8 1, i32 6, i8 2, null} // CHECK: !{i32 13, !"N", i8 8, i8 0, !{{[0-9]+}}, i8 1, i32 1, i8 1, i32 6, i8 2, null}
// CHECK: !{i32 14, !"SV_SampleIndex", i8 5, i8 12, !{{[0-9]+}}, i8 1, i32 1, i8 1, i32 -1, i8 -1, null} // CHECK: !{i32 14, !"SV_SampleIndex", i8 5, i8 12, !{{[0-9]+}}, i8 1, i32 1, i8 1, i32 -1, i8 -1, null}
// CHECK: !{i32 15, !"O", i8 3, i8 0, !12, i8 1, i32 1, i8 1, i32 6, i8 3, null} // CHECK: !{i32 15, !"O", i8 3, i8 0, !{{[0-9]+}}, i8 1, i32 1, i8 1, i32 6, i8 3, null}
// CHECK: !{i32 16, !"P", i8 3, i8 0, !12, i8 1, i32 1, i8 2, i32 8, i8 0, null} // CHECK: !{i32 16, !"P", i8 3, i8 0, !{{[0-9]+}}, i8 1, i32 1, i8 2, i32 8, i8 0, null}
// CHECK: !{i32 17, !"Q", i8 8, i8 0, !12, i8 2, i32 1, i8 1, i32 7, i8 2, null} // CHECK: !{i32 17, !"Q", i8 8, i8 0, !{{[0-9]+}}, i8 2, i32 1, i8 1, i32 7, i8 2, null}
float4 main(min16float2 a : A, float2 b : B, half3 c : C, uint id : SV_PrimitiveID, float4 main(min16float2 a : A, float2 b : B, half3 c : C, uint id : SV_PrimitiveID,
float2 d : D, int e : E, half2 f : F, half g : G, float2 d : D, int e : E, half2 f : F, half g : G,