From 4a71da3a1cab1efe39567bf78406d02e971ef2bf Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sun, 22 Apr 2018 22:34:18 +0200 Subject: [PATCH] [d3d11] Improved debug output for CopySubresourceRegion --- src/d3d11/d3d11_context.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index 2cc7756df..576ac8954 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -433,7 +433,12 @@ namespace dxvk { // Don't perform the copy if the offsets aren't aligned if (!util::isBlockAligned(srcOffset, srcFormatInfo->blockSize) || !util::isBlockAligned(dstOffset, dstFormatInfo->blockSize)) { - Logger::err("D3D11: CopySubresourceRegion: Unaligned block offset"); + Logger::err(str::format( + "D3D11: CopySubresourceRegion: Unaligned block offset", + "\n Src offset: (", srcOffset.x, ",", srcOffset.y, ",", srcOffset.z, ")", + "\n Src block size: (", srcFormatInfo->blockSize.width, "x", srcFormatInfo->blockSize.height, "x", srcFormatInfo->blockSize.depth, ")", + "\n Dst offset: (", dstOffset.x, ",", dstOffset.y, ",", dstOffset.z, ")", + "\n Dst block size: (", dstFormatInfo->blockSize.width, "x", dstFormatInfo->blockSize.height, "x", dstFormatInfo->blockSize.depth, ")")); return; } @@ -451,7 +456,15 @@ namespace dxvk { // if it does not touch the image border for unaligned dimensons if (!util::isBlockAligned(srcOffset, regExtent, srcFormatInfo->blockSize, srcExtent) || !util::isBlockAligned(dstOffset, regExtent, dstFormatInfo->blockSize, dstExtent)) { - Logger::err("D3D11: CopySubresourceRegion: Unaligned block size"); + Logger::err(str::format( + "D3D11: CopySubresourceRegion: Unaligned block size", + "\n Src offset: (", srcOffset.x, ",", srcOffset.y, ",", srcOffset.z, ")", + "\n Src extent: (", srcExtent.width, "x", srcExtent.height, "x", srcExtent.depth, ")", + "\n Src block size: (", srcFormatInfo->blockSize.width, "x", srcFormatInfo->blockSize.height, "x", srcFormatInfo->blockSize.depth, ")", + "\n Dst offset: (", dstOffset.x, ",", dstOffset.y, ",", dstOffset.z, ")", + "\n Dst extent: (", dstExtent.width, "x", dstExtent.height, "x", dstExtent.depth, ")", + "\n Dst block size: (", dstFormatInfo->blockSize.width, "x", dstFormatInfo->blockSize.height, "x", dstFormatInfo->blockSize.depth, ")", + "\n Region extent: (", regExtent.width, "x", regExtent.height, "x", regExtent.depth, ")")); return; }