Fix a bug in 3D texture copy splitter for D3D12
TextureOffset should respect both origin and copySize when we are addressing the empty first row issue. So textureOffset in copy 1 should just move/add (copySize.height - blockInfo.height) rows in order to copy the last row of all depth slices but the last one. Bug: dawn:547 Change-Id: I6a1acf656651869c8934897d5c7e8974f1a5eb9a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54441 Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
parent
cd417bc9a1
commit
9288ea605d
|
@ -381,7 +381,7 @@ namespace dawn_native { namespace d3d12 {
|
|||
TextureCopySubresource::CopyInfo* copy1 = copy.AddCopy();
|
||||
*copy1 = copy0;
|
||||
copy1->alignedOffset += 2 * bytesPerRow;
|
||||
copy1->textureOffset.y = copySize.height - blockInfo.height;
|
||||
copy1->textureOffset.y += copySize.height - blockInfo.height;
|
||||
// Offset two rows from the copy height for the bufferOffset (See the figure above):
|
||||
// - one for the row we advanced in the buffer: row (N + 4).
|
||||
// - one for the last row we want to copy: row (N + 3) itself.
|
||||
|
|
Loading…
Reference in New Issue