Skip to content

Commit a676404

Browse files
cmccarthy-codeweaversdoitsujin
authored andcommitted
[d3d11] Include all planes in subresource layout DepthPitch calculation.
1 parent 8fe495a commit a676404

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎src/d3d11/d3d11_texture.cpp‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -712,10 +712,11 @@ namespace dxvk {
712712

713713
auto blockCount = util::computeBlockCount(extent, formatInfo->blockSize);
714714

715-
if (!result.RowPitch) {
716-
result.RowPitch = elementSize * blockCount.width;
717-
result.DepthPitch = elementSize * blockCount.width * blockCount.height;
718-
}
715+
if (!result.RowPitch)
716+
result.RowPitch = elementSize * blockCount.width;
717+
718+
if (!result.DepthPitch || formatInfo->flags.test(DxvkFormatFlag::MultiPlane))
719+
result.DepthPitch += elementSize * blockCount.width * blockCount.height;
719720

720721
VkDeviceSize size = elementSize * blockCount.width * blockCount.height * blockCount.depth;
721722

0 commit comments

Comments
 (0)