mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-03 22:24:13 +01:00
[dxvk] Fixed reported size of staging buffers
Fixes staging slice allocation in Tomb Raider (2013), and potentially other games which allocate large staging buffers.
This commit is contained in:
parent
363a0f8a6b
commit
e4d49aeb66
@ -49,7 +49,6 @@ namespace dxvk {
|
||||
|
||||
|
||||
Rc<DxvkPhysicalBuffer> DxvkBuffer::allocPhysicalBuffer(VkDeviceSize sliceCount) const {
|
||||
TRACE(this, sliceCount);
|
||||
return m_device->allocPhysicalBuffer(m_info, sliceCount, m_memFlags);
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,9 @@ namespace dxvk {
|
||||
|
||||
|
||||
VkDeviceSize DxvkStagingBuffer::freeBytes() const {
|
||||
return m_bufferSize - m_bufferOffset;
|
||||
return m_bufferSize >= m_bufferOffset
|
||||
? m_bufferSize - m_bufferOffset
|
||||
: VkDeviceSize(0);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user