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

[dxvk] Add slice alignment to copyBufferToImage

This commit is contained in:
Philip Rebohle 2021-06-22 07:00:49 +02:00
parent 87d32a234d
commit 4840cdaf8c
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
6 changed files with 12 additions and 9 deletions

View File

@ -1243,7 +1243,7 @@ namespace dxvk {
ctx->copyBufferToImage(cDstImage,
cDstLayers, cDstOffset, cDstExtent,
cStagingSlice.buffer(),
cStagingSlice.offset(), 0);
cStagingSlice.offset(), 0, 0);
} else {
ctx->copyPackedBufferToDepthStencilImage(cDstImage, cDstLayers,
VkOffset2D { cDstOffset.x, cDstOffset.y },

View File

@ -363,7 +363,7 @@ namespace dxvk {
ctx->copyBufferToImage(cDstImage,
dstLayers, dstOffset, dstExtent,
cStagingSlice.buffer(),
cStagingSlice.offset(), 0);
cStagingSlice.offset(), 0, 0);
} else {
ctx->copyPackedBufferToDepthStencilImage(
cDstImage, dstLayers,

View File

@ -523,7 +523,7 @@ namespace dxvk {
if (cPackedFormat == VK_FORMAT_UNDEFINED) {
ctx->copyBufferToImage(cDstImage, cDstLayers,
VkOffset3D { 0, 0, 0 }, cDstLevelExtent,
cSrcBuffer, 0, 0);
cSrcBuffer, 0, 0, 0);
} else {
ctx->copyPackedBufferToDepthStencilImage(
cDstImage, cDstLayers,

View File

@ -707,7 +707,7 @@ namespace dxvk {
] (DxvkContext* ctx) {
ctx->copyBufferToImage(
cDstImage, cDstLayers, cDstOffset, cCopyExtent,
cSrcSlice.buffer(), cSrcSlice.offset(), 0);
cSrcSlice.buffer(), cSrcSlice.offset(), 0, 0);
});
dstTextureInfo->SetWrittenByGPU(dst->GetSubresource(), true);
@ -800,7 +800,7 @@ namespace dxvk {
ctx->copyBufferToImage(
cDstImage, cDstLayers,
cOffset, cExtent,
cSrcSlice.buffer(), cSrcSlice.offset(), 0);
cSrcSlice.buffer(), cSrcSlice.offset(), 0, 0);
});
dstTexInfo->SetWrittenByGPU(dstTexInfo->CalcSubresource(a, m), true);
@ -4359,7 +4359,7 @@ namespace dxvk {
ctx->copyBufferToImage(
cDstImage, cDstLayers,
cOffset, cDstLevelExtent,
cSrcSlice.buffer(), cSrcSlice.offset(), 0);
cSrcSlice.buffer(), cSrcSlice.offset(), 0, 0);
});
}
else {

View File

@ -726,7 +726,8 @@ namespace dxvk {
VkExtent3D dstExtent,
const Rc<DxvkBuffer>& srcBuffer,
VkDeviceSize srcOffset,
VkDeviceSize rowAlignment) {
VkDeviceSize rowAlignment,
VkDeviceSize sliceAlignment) {
this->spillRenderPass(true);
this->prepareImage(m_execBarriers, dstImage, vk::makeSubresourceRange(dstSubresource));
@ -763,7 +764,7 @@ namespace dxvk {
m_execAcquires.recordCommands(m_cmd);
this->copyImageBufferData<true>(DxvkCmdBuffer::ExecBuffer, dstImage, dstSubresource,
dstOffset, dstExtent, dstImageLayoutTransfer, srcSlice, rowAlignment, 0);
dstOffset, dstExtent, dstImageLayoutTransfer, srcSlice, rowAlignment, sliceAlignment);
m_execBarriers.accessImage(
dstImage, dstSubresourceRange,

View File

@ -349,6 +349,7 @@ namespace dxvk {
* \param [in] srcBuffer Source buffer
* \param [in] srcOffset Source offset, in bytes
* \param [in] rowAlignment Row alignment, in bytes
* \param [in] sliceAlignment Slice alignment, in bytes
*/
void copyBufferToImage(
const Rc<DxvkImage>& dstImage,
@ -357,7 +358,8 @@ namespace dxvk {
VkExtent3D dstExtent,
const Rc<DxvkBuffer>& srcBuffer,
VkDeviceSize srcOffset,
VkDeviceSize rowAlignment);
VkDeviceSize rowAlignment,
VkDeviceSize sliceAlignment);
/**
* \brief Copies data from one image to another