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

[dxvk] Remove unused updateImage function

This commit is contained in:
Philip Rebohle 2022-02-12 14:28:32 +01:00
parent 3b833988fe
commit 1b88bc624a
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 0 additions and 78 deletions

View File

@ -2180,63 +2180,6 @@ namespace dxvk {
}
void DxvkContext::updateImage(
const Rc<DxvkImage>& image,
const VkImageSubresourceLayers& subresources,
VkOffset3D imageOffset,
VkExtent3D imageExtent,
const void* data,
VkDeviceSize pitchPerRow,
VkDeviceSize pitchPerLayer) {
this->spillRenderPass(true);
// Prepare the image layout. If the given extent covers
// the entire image, we may discard its previous contents.
auto subresourceRange = vk::makeSubresourceRange(subresources);
subresourceRange.aspectMask = image->formatInfo()->aspectMask;
this->prepareImage(m_execBarriers, image, subresourceRange);
if (m_execBarriers.isImageDirty(image, subresourceRange, DxvkAccess::Write))
m_execBarriers.recordCommands(m_cmd);
// Initialize the image if the entire subresource is covered
VkImageLayout imageLayoutInitial = image->info().layout;
VkImageLayout imageLayoutTransfer = image->pickLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
if (image->isFullSubresource(subresources, imageExtent))
imageLayoutInitial = VK_IMAGE_LAYOUT_UNDEFINED;
if (imageLayoutTransfer != imageLayoutInitial) {
m_execAcquires.accessImage(
image, subresourceRange,
imageLayoutInitial,
VK_PIPELINE_STAGE_TRANSFER_BIT, 0,
imageLayoutTransfer,
VK_PIPELINE_STAGE_TRANSFER_BIT,
VK_ACCESS_TRANSFER_WRITE_BIT);
}
m_execAcquires.recordCommands(m_cmd);
this->copyImageHostData(DxvkCmdBuffer::ExecBuffer,
image, subresources, imageOffset, imageExtent,
data, pitchPerRow, pitchPerLayer);
// Transition image back into its optimal layout
m_execBarriers.accessImage(
image, subresourceRange,
imageLayoutTransfer,
VK_PIPELINE_STAGE_TRANSFER_BIT,
VK_ACCESS_TRANSFER_WRITE_BIT,
image->info().layout,
image->info().stages,
image->info().access);
m_cmd->trackResource<DxvkAccess::Write>(image);
}
void DxvkContext::updateDepthStencilImage(
const Rc<DxvkImage>& image,
const VkImageSubresourceLayers& subresources,

View File

@ -782,27 +782,6 @@ namespace dxvk {
VkDeviceSize size,
const void* data);
/**
* \brief Updates an image
*
* Copies data from the host into an image.
* \param [in] image Destination image
* \param [in] subsresources Image subresources to update
* \param [in] imageOffset Offset of the image area to update
* \param [in] imageExtent Size of the image area to update
* \param [in] data Source data
* \param [in] pitchPerRow Row pitch of the source data
* \param [in] pitchPerLayer Layer pitch of the source data
*/
void updateImage(
const Rc<DxvkImage>& image,
const VkImageSubresourceLayers& subresources,
VkOffset3D imageOffset,
VkExtent3D imageExtent,
const void* data,
VkDeviceSize pitchPerRow,
VkDeviceSize pitchPerLayer);
/**
* \brief Updates an depth-stencil image
*