mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
[dxvk] Align index buffer size to index size
Fixes validation errors in FFXIV.
This commit is contained in:
parent
2e1a19c7fd
commit
a163082770
1 changed files with 4 additions and 2 deletions
|
@ -5594,11 +5594,13 @@ namespace dxvk {
|
|||
auto bufferInfo = m_state.vi.indexBuffer.getDescriptor();
|
||||
|
||||
if (m_features.test(DxvkContextFeature::IndexBufferRobustness)) {
|
||||
VkDeviceSize align = m_state.vi.indexType == VK_INDEX_TYPE_UINT16 ? 2 : 4;
|
||||
VkDeviceSize range = bufferInfo.buffer.range & ~(align - 1);
|
||||
|
||||
m_cmd->cmdBindIndexBuffer2(
|
||||
bufferInfo.buffer.buffer,
|
||||
bufferInfo.buffer.offset,
|
||||
bufferInfo.buffer.range,
|
||||
m_state.vi.indexType);
|
||||
range, m_state.vi.indexType);
|
||||
} else {
|
||||
m_cmd->cmdBindIndexBuffer(
|
||||
bufferInfo.buffer.buffer,
|
||||
|
|
Loading…
Add table
Reference in a new issue