mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
d3d12: Use instancing to pass constant vertex attribute
Maybe a bit hackish but it works.
This commit is contained in:
parent
64a555caca
commit
5f46b32616
1 changed files with 2 additions and 0 deletions
|
@ -109,6 +109,8 @@ std::vector<D3D12_INPUT_ELEMENT_DESC> getIALayout(ID3D12Device *device, const st
|
|||
IAElement.InputSlot = (UINT)inputSlot;
|
||||
IAElement.Format = getFormat(vertexData.type - 1, vertexData.size);
|
||||
IAElement.AlignedByteOffset = (UINT)(vertexData.addr - vertexBufferFormat[inputSlot].range.first);
|
||||
IAElement.InputSlotClass = (vertexData.addr > 0) ? D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA : D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA;
|
||||
IAElement.InstanceDataStepRate = (vertexData.addr > 0) ? 0 : 0;
|
||||
result.push_back(IAElement);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue