From 8c1a56af89b3c619e2802333f90819b358f523ec Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 21 Jun 2019 16:10:00 +0200 Subject: [PATCH] [dxvk] Remove old staging buffer allocator from DxvkCommandList --- src/dxvk/dxvk_cmdlist.cpp | 38 +------------------------------------- src/dxvk/dxvk_cmdlist.h | 20 -------------------- 2 files changed, 1 insertion(+), 57 deletions(-) diff --git a/src/dxvk/dxvk_cmdlist.cpp b/src/dxvk/dxvk_cmdlist.cpp index 2d8e313b2..4f4f3aa55 100644 --- a/src/dxvk/dxvk_cmdlist.cpp +++ b/src/dxvk/dxvk_cmdlist.cpp @@ -8,8 +8,7 @@ namespace dxvk { uint32_t queueFamily) : m_vkd (device->vkd()), m_cmdBuffersUsed(0), - m_descriptorPoolTracker(device), - m_stagingAlloc (device) { + m_descriptorPoolTracker(device) { VkFenceCreateInfo fenceInfo; fenceInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; fenceInfo.pNext = nullptr; @@ -127,43 +126,8 @@ namespace dxvk { m_gpuQueryTracker.reset(); m_gpuEventTracker.reset(); m_eventTracker.reset(); - m_stagingAlloc.reset(); m_descriptorPoolTracker.reset(); m_resources.reset(); } - - DxvkStagingBufferSlice DxvkCommandList::stagedAlloc(VkDeviceSize size) { - return m_stagingAlloc.alloc(size); - } - - - void DxvkCommandList::stagedBufferCopy( - DxvkCmdBuffer cmdBuffer, - VkBuffer dstBuffer, - VkDeviceSize dstOffset, - VkDeviceSize dataSize, - const DxvkStagingBufferSlice& dataSlice) { - m_cmdBuffersUsed.set(cmdBuffer); - - VkBufferCopy region; - region.srcOffset = dataSlice.offset; - region.dstOffset = dstOffset; - region.size = dataSize; - - m_vkd->vkCmdCopyBuffer(getCmdBuffer(cmdBuffer), - dataSlice.buffer, dstBuffer, 1, ®ion); - } - - - void DxvkCommandList::stagedBufferImageCopy( - VkImage dstImage, - VkImageLayout dstImageLayout, - const VkBufferImageCopy& dstImageRegion, - const DxvkStagingBufferSlice& dataSlice) { - m_vkd->vkCmdCopyBufferToImage(m_execBuffer, - dataSlice.buffer, dstImage, dstImageLayout, - 1, &dstImageRegion); - } - } \ No newline at end of file diff --git a/src/dxvk/dxvk_cmdlist.h b/src/dxvk/dxvk_cmdlist.h index 0f5e738fb..841449065 100644 --- a/src/dxvk/dxvk_cmdlist.h +++ b/src/dxvk/dxvk_cmdlist.h @@ -722,25 +722,6 @@ namespace dxvk { pipelineStage, queryPool, query); } - - DxvkStagingBufferSlice stagedAlloc( - VkDeviceSize size); - - - void stagedBufferCopy( - DxvkCmdBuffer cmdBuffer, - VkBuffer dstBuffer, - VkDeviceSize dstOffset, - VkDeviceSize dataSize, - const DxvkStagingBufferSlice& dataSlice); - - - void stagedBufferImageCopy( - VkImage dstImage, - VkImageLayout dstImageLayout, - const VkBufferImageCopy& dstImageRegion, - const DxvkStagingBufferSlice& dataSlice); - private: Rc m_vkd; @@ -754,7 +735,6 @@ namespace dxvk { DxvkCmdBufferFlags m_cmdBuffersUsed; DxvkLifetimeTracker m_resources; DxvkDescriptorPoolTracker m_descriptorPoolTracker; - DxvkStagingAlloc m_stagingAlloc; DxvkEventTracker m_eventTracker; DxvkGpuEventTracker m_gpuEventTracker; DxvkGpuQueryTracker m_gpuQueryTracker;