mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxvk] Minor memory management tweaks
This commit is contained in:
parent
32078033c6
commit
30eb43a284
@ -21,8 +21,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
VkDescriptorSet DxvkDescriptorAlloc::alloc(VkDescriptorSetLayout layout) {
|
VkDescriptorSet DxvkDescriptorAlloc::alloc(VkDescriptorSetLayout layout) {
|
||||||
// VkDescriptorSet set = allocFrom(m_pools[m_poolId], layout);
|
VkDescriptorSet set = allocFrom(m_pools[m_poolId], layout);
|
||||||
VkDescriptorSet set = VK_NULL_HANDLE;
|
|
||||||
|
|
||||||
if (set == VK_NULL_HANDLE) {
|
if (set == VK_NULL_HANDLE) {
|
||||||
if (++m_poolId >= m_pools.size())
|
if (++m_poolId >= m_pools.size())
|
||||||
|
@ -33,7 +33,7 @@ namespace dxvk {
|
|||||||
class DxvkDevice : public RcObject {
|
class DxvkDevice : public RcObject {
|
||||||
friend class DxvkSubmissionQueue;
|
friend class DxvkSubmissionQueue;
|
||||||
|
|
||||||
constexpr static VkDeviceSize DefaultStagingBufferSize = 16 * 1024 * 1024;
|
constexpr static VkDeviceSize DefaultStagingBufferSize = 4 * 1024 * 1024;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DxvkDevice(
|
DxvkDevice(
|
||||||
|
@ -59,14 +59,12 @@ namespace dxvk {
|
|||||||
m_memory(memory),
|
m_memory(memory),
|
||||||
m_mapPtr(mapPtr),
|
m_mapPtr(mapPtr),
|
||||||
m_size (size) {
|
m_size (size) {
|
||||||
TRACE(this, heap, size);
|
|
||||||
// Mark the entire chunk as free
|
// Mark the entire chunk as free
|
||||||
m_freeList.push_back(FreeSlice { 0, size });
|
m_freeList.push_back(FreeSlice { 0, size });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DxvkMemoryChunk::~DxvkMemoryChunk() {
|
DxvkMemoryChunk::~DxvkMemoryChunk() {
|
||||||
TRACE(this);
|
|
||||||
m_heap->freeDeviceMemory(m_memory);
|
m_heap->freeDeviceMemory(m_memory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user