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:
parent
87d32a234d
commit
4840cdaf8c
@ -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 },
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user