mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 11:52:12 +01:00
[d3d11] Fix IAGetIndexBuffer with optimized index buffers
This commit is contained in:
parent
5ac9c45f65
commit
d118d35820
@ -1740,8 +1740,12 @@ namespace dxvk {
|
||||
if (pFormat != nullptr)
|
||||
*pFormat = m_state.ia.indexBuffer.format;
|
||||
|
||||
if (pOffset != nullptr)
|
||||
*pOffset = m_state.ia.indexBuffer.offset;
|
||||
if (pOffset != nullptr) {
|
||||
uint32_t shift = m_state.ia.indexBuffer.format == DXGI_FORMAT_R16_UINT ? 1 : 2;
|
||||
*pOffset = m_state.ia.indexBuffer.optimized
|
||||
? m_state.ia.indexBuffer.firstIndex << shift
|
||||
: m_state.ia.indexBuffer.offset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user