d3d12: Fix Input Layout
This commit is contained in:
@@ -101,6 +101,7 @@ std::vector<D3D12_INPUT_ELEMENT_DESC> getIALayout(ID3D12Device *device, bool ind
|
|||||||
rFile dump("VertexDataArray.dump", rFile::write);
|
rFile dump("VertexDataArray.dump", rFile::write);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
size_t inputSlot = 0;
|
||||||
for (u32 i = 0; i < g_vertexCount; ++i)
|
for (u32 i = 0; i < g_vertexCount; ++i)
|
||||||
{
|
{
|
||||||
if (!vertexData[i].IsEnabled()) continue;
|
if (!vertexData[i].IsEnabled()) continue;
|
||||||
@@ -210,8 +211,9 @@ std::vector<D3D12_INPUT_ELEMENT_DESC> getIALayout(ID3D12Device *device, bool ind
|
|||||||
{
|
{
|
||||||
IAElement.SemanticName = "TEXCOORD";
|
IAElement.SemanticName = "TEXCOORD";
|
||||||
IAElement.SemanticIndex = i;
|
IAElement.SemanticIndex = i;
|
||||||
IAElement.InputSlot = i;
|
IAElement.InputSlot = inputSlot;
|
||||||
IAElement.Format = getFormat(vertexData[i].type - 1, vertexData[i].size);
|
IAElement.Format = getFormat(vertexData[i].type - 1, vertexData[i].size);
|
||||||
|
inputSlot++;
|
||||||
}
|
}
|
||||||
result.push_back(IAElement);
|
result.push_back(IAElement);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user