mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[dxvk] Remove old staging buffer allocator from DxvkCommandList
This commit is contained in:
parent
24c282378e
commit
8c1a56af89
@ -8,8 +8,7 @@ namespace dxvk {
|
|||||||
uint32_t queueFamily)
|
uint32_t queueFamily)
|
||||||
: m_vkd (device->vkd()),
|
: m_vkd (device->vkd()),
|
||||||
m_cmdBuffersUsed(0),
|
m_cmdBuffersUsed(0),
|
||||||
m_descriptorPoolTracker(device),
|
m_descriptorPoolTracker(device) {
|
||||||
m_stagingAlloc (device) {
|
|
||||||
VkFenceCreateInfo fenceInfo;
|
VkFenceCreateInfo fenceInfo;
|
||||||
fenceInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
|
fenceInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
|
||||||
fenceInfo.pNext = nullptr;
|
fenceInfo.pNext = nullptr;
|
||||||
@ -127,43 +126,8 @@ namespace dxvk {
|
|||||||
m_gpuQueryTracker.reset();
|
m_gpuQueryTracker.reset();
|
||||||
m_gpuEventTracker.reset();
|
m_gpuEventTracker.reset();
|
||||||
m_eventTracker.reset();
|
m_eventTracker.reset();
|
||||||
m_stagingAlloc.reset();
|
|
||||||
m_descriptorPoolTracker.reset();
|
m_descriptorPoolTracker.reset();
|
||||||
m_resources.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -722,25 +722,6 @@ namespace dxvk {
|
|||||||
pipelineStage, queryPool, query);
|
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:
|
private:
|
||||||
|
|
||||||
Rc<vk::DeviceFn> m_vkd;
|
Rc<vk::DeviceFn> m_vkd;
|
||||||
@ -754,7 +735,6 @@ namespace dxvk {
|
|||||||
DxvkCmdBufferFlags m_cmdBuffersUsed;
|
DxvkCmdBufferFlags m_cmdBuffersUsed;
|
||||||
DxvkLifetimeTracker m_resources;
|
DxvkLifetimeTracker m_resources;
|
||||||
DxvkDescriptorPoolTracker m_descriptorPoolTracker;
|
DxvkDescriptorPoolTracker m_descriptorPoolTracker;
|
||||||
DxvkStagingAlloc m_stagingAlloc;
|
|
||||||
DxvkEventTracker m_eventTracker;
|
DxvkEventTracker m_eventTracker;
|
||||||
DxvkGpuEventTracker m_gpuEventTracker;
|
DxvkGpuEventTracker m_gpuEventTracker;
|
||||||
DxvkGpuQueryTracker m_gpuQueryTracker;
|
DxvkGpuQueryTracker m_gpuQueryTracker;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user