mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-01 16:24:12 +01:00
[d3d9] Respect 4 byte pitch when reading back texture
This commit is contained in:
parent
c43618d19f
commit
309284e7dc
@ -4167,10 +4167,12 @@ namespace dxvk {
|
|||||||
cPackedFormat = packedFormat
|
cPackedFormat = packedFormat
|
||||||
] (DxvkContext* ctx) {
|
] (DxvkContext* ctx) {
|
||||||
if (cSubresources.aspectMask != (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
|
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 },
|
cImage, cSubresources, VkOffset3D { 0, 0, 0 },
|
||||||
cLevelExtent);
|
cLevelExtent);
|
||||||
} else {
|
} 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(
|
ctx->copyDepthStencilImageToPackedBuffer(
|
||||||
cImageBuffer, 0,
|
cImageBuffer, 0,
|
||||||
VkOffset2D { 0, 0 },
|
VkOffset2D { 0, 0 },
|
||||||
|
Loading…
Reference in New Issue
Block a user