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

[d3d9] Fix UP buffer allocation

This commit is contained in:
Philip Rebohle 2024-09-27 12:54:46 +02:00
parent 78f5136fde
commit 4ed50ec6be

View File

@ -4370,15 +4370,16 @@ namespace dxvk {
info.stages = VK_PIPELINE_STAGE_VERTEX_INPUT_BIT;
Rc<DxvkBuffer> buffer = m_dxvkDevice->createBuffer(info, memoryFlags);
void* mapPtr = buffer->mapPtr(0);
if (size <= UPBufferSize) {
m_upBuffer = std::move(buffer);
m_upBufferMapPtr = m_upBuffer->mapPtr(0);
m_upBufferMapPtr = mapPtr;
} else {
// Temporary buffer
D3D9BufferSlice result;
result.slice = DxvkBufferSlice(std::move(buffer), 0, size);
result.mapPtr = buffer->mapPtr(0);
result.mapPtr = mapPtr;
return result;
}
}