mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 01:46:35 +00:00
Impl 3DTexture copy splitter for empty first row issue on D3D12
If there is an empty row at the beginning of a copy region due to
alignment adjustment, this copy region split by 2D texture splitter
will be definitely incorrect for 3D textures because every depth
slice (except the first slice) will wrongly skip one row. We need
to recompute this copy region via modifying this copy region and
adding a couple more copy regions for the empty first row issue.
The idea of recomputation is:
- modify this copy region and don't copy the last row in order to
make its bufferSize.height not exceed rowsPerImage,
- use one more copy region to handle the last row of each depth
slice except the last depth slice,
- use another copy region to handle the last row of the last depth
slice.
Bug: dawn:547
Change-Id: Ib2f6019963ed29d62a9f13d7316b5f04801db8c9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/52341
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
@@ -1054,8 +1054,6 @@ TEST_P(CopyTests_T2B, Texture3DSubRegion) {
|
||||
}
|
||||
|
||||
TEST_P(CopyTests_T2B, Texture3DNoSplitRowDataWithEmptyFirstRow) {
|
||||
DAWN_TEST_UNSUPPORTED_IF(IsD3D12()); // TODO(crbug.com/dawn/547): Implement on D3D12.
|
||||
|
||||
constexpr uint32_t kWidth = 2;
|
||||
constexpr uint32_t kHeight = 4;
|
||||
constexpr uint32_t kDepth = 3;
|
||||
@@ -1095,8 +1093,6 @@ TEST_P(CopyTests_T2B, Texture3DSplitRowDataWithoutEmptyFirstRow) {
|
||||
}
|
||||
|
||||
TEST_P(CopyTests_T2B, Texture3DSplitRowDataWithEmptyFirstRow) {
|
||||
DAWN_TEST_UNSUPPORTED_IF(IsD3D12()); // TODO(crbug.com/dawn/547): Implement on D3D12.
|
||||
|
||||
constexpr uint32_t kWidth = 39;
|
||||
constexpr uint32_t kHeight = 4;
|
||||
constexpr uint32_t kDepth = 3;
|
||||
@@ -1637,8 +1633,6 @@ TEST_P(CopyTests_B2T, Texture3DSubRegion) {
|
||||
}
|
||||
|
||||
TEST_P(CopyTests_B2T, Texture3DNoSplitRowDataWithEmptyFirstRow) {
|
||||
DAWN_TEST_UNSUPPORTED_IF(IsD3D12()); // TODO(crbug.com/dawn/547): Implement on D3D12.
|
||||
|
||||
constexpr uint32_t kWidth = 2;
|
||||
constexpr uint32_t kHeight = 4;
|
||||
constexpr uint32_t kDepth = 3;
|
||||
@@ -1678,8 +1672,6 @@ TEST_P(CopyTests_B2T, Texture3DSplitRowDataWithoutEmptyFirstRow) {
|
||||
}
|
||||
|
||||
TEST_P(CopyTests_B2T, Texture3DSplitRowDataWithEmptyFirstRow) {
|
||||
DAWN_TEST_UNSUPPORTED_IF(IsD3D12()); // TODO(crbug.com/dawn/547): Implement on D3D12.
|
||||
|
||||
constexpr uint32_t kWidth = 39;
|
||||
constexpr uint32_t kHeight = 4;
|
||||
constexpr uint32_t kDepth = 3;
|
||||
|
||||
Reference in New Issue
Block a user