1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-30 22:24:15 +01:00

[d3d11] Implemented IAGetIndexBuffer an IAGetVertexBuffers

TressFX needs this.
This commit is contained in:
Philip Rebohle 2018-01-23 19:10:48 +01:00
parent 14bb4ed9c2
commit 363a0f8a6b
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 24 additions and 8 deletions

View File

@ -947,15 +947,31 @@ namespace dxvk {
ID3D11Buffer** ppVertexBuffers,
UINT* pStrides,
UINT* pOffsets) {
Logger::err("D3D11DeviceContext::IAGetVertexBuffers: Not implemented");
for (uint32_t i = 0; i < NumBuffers; i++) {
if (ppVertexBuffers != nullptr)
ppVertexBuffers[i] = m_state.ia.vertexBuffers[StartSlot + i].buffer.ref();
if (pStrides != nullptr)
pStrides[i] = m_state.ia.vertexBuffers[StartSlot + i].stride;
if (pOffsets != nullptr)
pOffsets[i] = m_state.ia.vertexBuffers[StartSlot + i].offset;
}
}
void STDMETHODCALLTYPE D3D11DeviceContext::IAGetIndexBuffer(
ID3D11Buffer** pIndexBuffer,
DXGI_FORMAT* Format,
UINT* Offset) {
Logger::err("D3D11DeviceContext::IAGetIndexBuffer: Not implemented");
ID3D11Buffer** ppIndexBuffer,
DXGI_FORMAT* pFormat,
UINT* pOffset) {
if (ppIndexBuffer != nullptr)
*ppIndexBuffer = m_state.ia.indexBuffer.buffer.ref();
if (pFormat != nullptr)
*pFormat = m_state.ia.indexBuffer.format;
if (pOffset != nullptr)
*pOffset = m_state.ia.indexBuffer.offset;
}

View File

@ -182,9 +182,9 @@ namespace dxvk {
UINT* pOffsets) final;
void STDMETHODCALLTYPE IAGetIndexBuffer(
ID3D11Buffer** pIndexBuffer,
DXGI_FORMAT* Format,
UINT* Offset) final;
ID3D11Buffer** ppIndexBuffer,
DXGI_FORMAT* pFormat,
UINT* pOffset) final;
void STDMETHODCALLTYPE VSSetShader(
ID3D11VertexShader* pVertexShader,