Merge branch 'sep-reflect-merge' into sep-reflect
This commit is contained in:
Коммит
8f92b56130
|
@ -2043,37 +2043,51 @@ void DxilShaderReflection::MarkUsedSignatureElements() {
|
||||||
DxilInst_StoreOutput SO(&*I);
|
DxilInst_StoreOutput SO(&*I);
|
||||||
DxilInst_LoadPatchConstant LPC(&*I);
|
DxilInst_LoadPatchConstant LPC(&*I);
|
||||||
DxilInst_StorePatchConstant SPC(&*I);
|
DxilInst_StorePatchConstant SPC(&*I);
|
||||||
|
DxilInst_StoreVertexOutput SVO(&*I);
|
||||||
|
DxilInst_StorePrimitiveOutput SPO(&*I);
|
||||||
std::vector<D3D12_SIGNATURE_PARAMETER_DESC> *pDescs;
|
std::vector<D3D12_SIGNATURE_PARAMETER_DESC> *pDescs;
|
||||||
const DxilSignature *pSig;
|
const DxilSignature *pSig;
|
||||||
uint32_t col, row, sigId;
|
uint32_t col, row, sigId;
|
||||||
if (LI) {
|
if (LI) {
|
||||||
if (!GetUnsignedVal(LI.get_inputSigId(), &sigId)) continue;
|
if (!GetUnsignedVal(LI.get_inputSigId(), &sigId)) continue;
|
||||||
if (!GetUnsignedVal(LI.get_colIndex(), &col)) continue;
|
if (!GetUnsignedVal(LI.get_colIndex(), &col)) continue;
|
||||||
if (!GetUnsignedVal(LI.get_rowIndex(), &row)) continue;
|
GetUnsignedVal(LI.get_rowIndex(), &row);
|
||||||
pDescs = &m_InputSignature;
|
pDescs = &m_InputSignature;
|
||||||
pSig = &m_pDxilModule->GetInputSignature();
|
pSig = &m_pDxilModule->GetInputSignature();
|
||||||
}
|
}
|
||||||
else if (SO) {
|
else if (SO) {
|
||||||
if (!GetUnsignedVal(SO.get_outputSigId(), &sigId)) continue;
|
if (!GetUnsignedVal(SO.get_outputSigId(), &sigId)) continue;
|
||||||
if (!GetUnsignedVal(SO.get_colIndex(), &col)) continue;
|
if (!GetUnsignedVal(SO.get_colIndex(), &col)) continue;
|
||||||
if (!GetUnsignedVal(SO.get_rowIndex(), &row)) continue;
|
GetUnsignedVal(SO.get_rowIndex(), &row);
|
||||||
pDescs = &m_OutputSignature;
|
pDescs = &m_OutputSignature;
|
||||||
pSig = &m_pDxilModule->GetOutputSignature();
|
pSig = &m_pDxilModule->GetOutputSignature();
|
||||||
}
|
}
|
||||||
else if (SPC) {
|
else if (SPC) {
|
||||||
if (!GetUnsignedVal(SPC.get_outputSigID(), &sigId)) continue;
|
if (!GetUnsignedVal(SPC.get_outputSigID(), &sigId)) continue;
|
||||||
if (!GetUnsignedVal(SPC.get_col(), &col)) continue;
|
if (!GetUnsignedVal(SPC.get_col(), &col)) continue;
|
||||||
if (!GetUnsignedVal(SPC.get_row(), &row)) continue;
|
GetUnsignedVal(SPC.get_row(), &row);
|
||||||
pDescs = &m_PatchConstantSignature;
|
pDescs = &m_PatchConstantSignature;
|
||||||
pSig = &m_pDxilModule->GetPatchConstOrPrimSignature();
|
pSig = &m_pDxilModule->GetPatchConstOrPrimSignature();
|
||||||
}
|
}
|
||||||
else if (LPC) {
|
else if (LPC) {
|
||||||
if (!GetUnsignedVal(LPC.get_inputSigId(), &sigId)) continue;
|
if (!GetUnsignedVal(LPC.get_inputSigId(), &sigId)) continue;
|
||||||
if (!GetUnsignedVal(LPC.get_col(), &col)) continue;
|
if (!GetUnsignedVal(LPC.get_col(), &col)) continue;
|
||||||
if (!GetUnsignedVal(LPC.get_row(), &row)) continue;
|
GetUnsignedVal(LPC.get_row(), &row);
|
||||||
pDescs = &m_PatchConstantSignature;
|
pDescs = &m_PatchConstantSignature;
|
||||||
pSig = &m_pDxilModule->GetPatchConstOrPrimSignature();
|
pSig = &m_pDxilModule->GetPatchConstOrPrimSignature();
|
||||||
}
|
}
|
||||||
|
else if (SVO) {
|
||||||
|
if (!GetUnsignedVal(SVO.get_outputSigId(), &sigId)) continue;
|
||||||
|
if (!GetUnsignedVal(SVO.get_colIndex(), &col)) continue;
|
||||||
|
GetUnsignedVal(SVO.get_rowIndex(), &row);
|
||||||
|
pSig = &m_pDxilModule->GetOutputSignature();
|
||||||
|
}
|
||||||
|
else if (SPO) {
|
||||||
|
if (!GetUnsignedVal(SPO.get_outputSigId(), &sigId)) continue;
|
||||||
|
if (!GetUnsignedVal(SPO.get_colIndex(), &col)) continue;
|
||||||
|
GetUnsignedVal(SPO.get_rowIndex(), &row);
|
||||||
|
pSig = &m_pDxilModule->GetPatchConstOrPrimSignature();
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,6 +270,8 @@ static void MarkUsedSignatureElements(Function *F, DxilModule &DM) {
|
||||||
DxilInst_StoreOutput SO(&*I);
|
DxilInst_StoreOutput SO(&*I);
|
||||||
DxilInst_LoadPatchConstant LPC(&*I);
|
DxilInst_LoadPatchConstant LPC(&*I);
|
||||||
DxilInst_StorePatchConstant SPC(&*I);
|
DxilInst_StorePatchConstant SPC(&*I);
|
||||||
|
DxilInst_StoreVertexOutput SVO(&*I);
|
||||||
|
DxilInst_StorePrimitiveOutput SPO(&*I);
|
||||||
DxilSignature *pSig;
|
DxilSignature *pSig;
|
||||||
uint32_t col, row, sigId;
|
uint32_t col, row, sigId;
|
||||||
bool bDynIdx = false;
|
bool bDynIdx = false;
|
||||||
|
@ -297,6 +299,18 @@ static void MarkUsedSignatureElements(Function *F, DxilModule &DM) {
|
||||||
if (!GetUnsignedVal(LPC.get_row(), &row)) bDynIdx = true;
|
if (!GetUnsignedVal(LPC.get_row(), &row)) bDynIdx = true;
|
||||||
pSig = &DM.GetPatchConstOrPrimSignature();
|
pSig = &DM.GetPatchConstOrPrimSignature();
|
||||||
}
|
}
|
||||||
|
else if (SVO) {
|
||||||
|
if (!GetUnsignedVal(SVO.get_outputSigId(), &sigId)) continue;
|
||||||
|
if (!GetUnsignedVal(SVO.get_colIndex(), &col)) continue;
|
||||||
|
if (!GetUnsignedVal(SVO.get_rowIndex(), &row)) bDynIdx = true;
|
||||||
|
pSig = &DM.GetOutputSignature();
|
||||||
|
}
|
||||||
|
else if (SPO) {
|
||||||
|
if (!GetUnsignedVal(SPO.get_outputSigId(), &sigId)) continue;
|
||||||
|
if (!GetUnsignedVal(SPO.get_colIndex(), &col)) continue;
|
||||||
|
if (!GetUnsignedVal(SPO.get_rowIndex(), &row)) bDynIdx = true;
|
||||||
|
pSig = &DM.GetPatchConstOrPrimSignature();
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3675,10 +3675,10 @@ TEST_F(ValidationTest, MeshGreaterThanMaxXYZ) {
|
||||||
|
|
||||||
TEST_F(ValidationTest, MeshGreaterThanMaxVSigRowCount) {
|
TEST_F(ValidationTest, MeshGreaterThanMaxVSigRowCount) {
|
||||||
RewriteAssemblyCheckMsg(L"..\\CodeGenHLSL\\mesh-val\\mesh.hlsl", "ms_6_5",
|
RewriteAssemblyCheckMsg(L"..\\CodeGenHLSL\\mesh-val\\mesh.hlsl", "ms_6_5",
|
||||||
"!([0-9]+) = !{i32 1, !\"COLOR\", i8 9, i8 0, !([0-9]+), i8 2, i32 4, i8 1, i32 1, i8 0, null}\n"
|
"!([0-9]+) = !{i32 1, !\"COLOR\", i8 9, i8 0, !([0-9]+), i8 2, i32 4, i8 1, i32 1, i8 0, (.*)"
|
||||||
"!([0-9]+) = !{i32 0, i32 1, i32 2, i32 3}",
|
"!\\2 = !{i32 0, i32 1, i32 2, i32 3}",
|
||||||
"!\\1 = !{i32 1, !\"COLOR\", i8 9, i8 0, !\\2, i8 2, i32 32, i8 1, i32 1, i8 0, null}\n"
|
"!\\1 = !{i32 1, !\"COLOR\", i8 9, i8 0, !\\2, i8 2, i32 32, i8 1, i32 1, i8 0, \\3"
|
||||||
"!\\3 = !{i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10,"
|
"!\\2 = !{i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10,"
|
||||||
"i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20,"
|
"i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20,"
|
||||||
"i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31}",
|
"i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31}",
|
||||||
"For shader 'main', vertex output signatures are taking up more than 32 rows",
|
"For shader 'main', vertex output signatures are taking up more than 32 rows",
|
||||||
|
@ -3687,10 +3687,10 @@ TEST_F(ValidationTest, MeshGreaterThanMaxVSigRowCount) {
|
||||||
|
|
||||||
TEST_F(ValidationTest, MeshGreaterThanMaxPSigRowCount) {
|
TEST_F(ValidationTest, MeshGreaterThanMaxPSigRowCount) {
|
||||||
RewriteAssemblyCheckMsg(L"..\\CodeGenHLSL\\mesh-val\\mesh.hlsl", "ms_6_5",
|
RewriteAssemblyCheckMsg(L"..\\CodeGenHLSL\\mesh-val\\mesh.hlsl", "ms_6_5",
|
||||||
"!([0-9]+) = !{i32 4, !\"LAYER\", i8 4, i8 0, !([0-9]+), i8 1, i32 6, i8 1, i32 1, i8 0, null}\n"
|
"!([0-9]+) = !{i32 4, !\"LAYER\", i8 4, i8 0, !([0-9]+), i8 1, i32 6, i8 1, i32 1, i8 0, (.*)"
|
||||||
"!([0-9]+) = !{i32 0, i32 1, i32 2, i32 3, i32 4, i32 5}",
|
"!\\2 = !{i32 0, i32 1, i32 2, i32 3, i32 4, i32 5}",
|
||||||
"!\\1 = !{i32 4, !\"LAYER\", i8 4, i8 0, !\\2, i8 1, i32 32, i8 1, i32 1, i8 0, null}\n"
|
"!\\1 = !{i32 4, !\"LAYER\", i8 4, i8 0, !\\2, i8 1, i32 32, i8 1, i32 1, i8 0, \\3"
|
||||||
"!\\3 = !{i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10,"
|
"!\\2 = !{i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10,"
|
||||||
"i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20,"
|
"i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20,"
|
||||||
"i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31}",
|
"i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31}",
|
||||||
"For shader 'main', primitive output signatures are taking up more than 32 rows",
|
"For shader 'main', primitive output signatures are taking up more than 32 rows",
|
||||||
|
@ -3699,15 +3699,15 @@ TEST_F(ValidationTest, MeshGreaterThanMaxPSigRowCount) {
|
||||||
|
|
||||||
TEST_F(ValidationTest, MeshGreaterThanMaxTotalSigRowCount) {
|
TEST_F(ValidationTest, MeshGreaterThanMaxTotalSigRowCount) {
|
||||||
RewriteAssemblyCheckMsg(L"..\\CodeGenHLSL\\mesh-val\\mesh.hlsl", "ms_6_5",
|
RewriteAssemblyCheckMsg(L"..\\CodeGenHLSL\\mesh-val\\mesh.hlsl", "ms_6_5",
|
||||||
{ "!([0-9]+) = !{i32 1, !\"COLOR\", i8 9, i8 0, !([0-9]+), i8 2, i32 4, i8 1, i32 1, i8 0, null}\n"
|
{ "!([0-9]+) = !{i32 1, !\"COLOR\", i8 9, i8 0, !([0-9]+), i8 2, i32 4, i8 1, i32 1, i8 0, (.*)"
|
||||||
"!([0-9]+) = !{i32 0, i32 1, i32 2, i32 3}",
|
"!\\2 = !{i32 0, i32 1, i32 2, i32 3}",
|
||||||
"!([0-9]+) = !{i32 4, !\"LAYER\", i8 4, i8 0, !([0-9]+), i8 1, i32 6, i8 1, i32 1, i8 0, null}\n"
|
"!([0-9]+) = !{i32 4, !\"LAYER\", i8 4, i8 0, !([0-9]+), i8 1, i32 6, i8 1, i32 1, i8 0, (.*)"
|
||||||
"!([0-9]+) = !{i32 0, i32 1, i32 2, i32 3, i32 4, i32 5}" },
|
"!\\2 = !{i32 0, i32 1, i32 2, i32 3, i32 4, i32 5}" },
|
||||||
{ "!\\1 = !{i32 1, !\"COLOR\", i8 9, i8 0, !\\2, i8 2, i32 16, i8 1, i32 1, i8 0, null}\n"
|
{ "!\\1 = !{i32 1, !\"COLOR\", i8 9, i8 0, !\\2, i8 2, i32 16, i8 1, i32 1, i8 0, \\3"
|
||||||
"!\\3 = !{i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10,"
|
"!\\2 = !{i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10,"
|
||||||
"i32 11, i32 12, i32 13, i32 14, i32 15}",
|
"i32 11, i32 12, i32 13, i32 14, i32 15}",
|
||||||
"!\\1 = !{i32 4, !\"LAYER\", i8 4, i8 0, !\\2, i8 1, i32 16, i8 1, i32 1, i8 0, null}\n"
|
"!\\1 = !{i32 4, !\"LAYER\", i8 4, i8 0, !\\2, i8 1, i32 16, i8 1, i32 1, i8 0, \\3"
|
||||||
"!\\3 = !{i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10,"
|
"!\\2 = !{i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10,"
|
||||||
"i32 11, i32 12, i32 13, i32 14, i32 15}",
|
"i32 11, i32 12, i32 13, i32 14, i32 15}",
|
||||||
},
|
},
|
||||||
"For shader 'main', vertex and primitive output signatures are taking up more than 32 rows",
|
"For shader 'main', vertex and primitive output signatures are taking up more than 32 rows",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче