mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
Validate that 3D texture copies cannot be between the same subresource
Bug: dawn:547 Change-Id: I747ccdb895121292e527acc385d69697bc86d8b2 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50240 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Yunchao He <yunchao.he@intel.com>
This commit is contained in:
committed by
Commit Bot service account
parent
5200c8158c
commit
67851d9021
@@ -421,12 +421,13 @@ namespace dawn_native {
|
||||
}
|
||||
|
||||
if (src.texture == dst.texture && src.mipLevel == dst.mipLevel) {
|
||||
ASSERT(src.texture->GetDimension() == wgpu::TextureDimension::e2D &&
|
||||
dst.texture->GetDimension() == wgpu::TextureDimension::e2D);
|
||||
if (IsRangeOverlapped(src.origin.z, dst.origin.z, copySize.depthOrArrayLayers)) {
|
||||
wgpu::TextureDimension dimension = src.texture->GetDimension();
|
||||
ASSERT(dimension != wgpu::TextureDimension::e1D);
|
||||
if ((dimension == wgpu::TextureDimension::e2D &&
|
||||
IsRangeOverlapped(src.origin.z, dst.origin.z, copySize.depthOrArrayLayers)) ||
|
||||
dimension == wgpu::TextureDimension::e3D) {
|
||||
return DAWN_VALIDATION_ERROR(
|
||||
"Copy subresources cannot be overlapped when copying within the same "
|
||||
"texture.");
|
||||
"Cannot copy between overlapping subresources of the same texture.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user