Skip to content

Commit

Permalink
[d3d9] Respect 4 byte pitch when reading back texture
Browse files Browse the repository at this point in the history
  • Loading branch information
K0bin authored and Joshua-Ashton committed Jul 1, 2021
1 parent c43618d commit 309284e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/d3d9/d3d9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4167,10 +4167,12 @@ namespace dxvk {
cPackedFormat = packedFormat
] (DxvkContext* ctx) {
if (cSubresources.aspectMask != (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
ctx->copyImageToBuffer(cImageBuffer, 0, 0, 0,
ctx->copyImageToBuffer(cImageBuffer, 0, 4, 0,
cImage, cSubresources, VkOffset3D { 0, 0, 0 },
cLevelExtent);
} else {
// Copying DS to a packed buffer is only supported for D24S8 and D32S8
// right now so the 4 byte row alignment is guaranteed by the format size
ctx->copyDepthStencilImageToPackedBuffer(
cImageBuffer, 0,
VkOffset2D { 0, 0 },
Expand Down

0 comments on commit 309284e

Please sign in to comment.