mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
D3D12: Fix usage of CopyResource
CopyResource may only be used for resources that have exactly the same format, dimension, mips, layers. And it can only be used if the entire texture region is copied. Bug: dawn:353 Change-Id: Ia8f96cc10c88fe026e23bce2d0532624725b12e0 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/16984 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
b988e03982
commit
83e138ca96
@@ -729,6 +729,24 @@ TEST_P(CopyTests_T2T, TextureMip) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_P(CopyTests_T2T, SingleMipSrcMultipleMipDst) {
|
||||
constexpr uint32_t kWidth = 256;
|
||||
constexpr uint32_t kHeight = 128;
|
||||
for (unsigned int i = 1; i < 4; ++i) {
|
||||
DoTest({kWidth >> i, kHeight >> i, 0, 0, 0}, {kWidth, kHeight, 0, 0, i},
|
||||
{kWidth >> i, kHeight >> i});
|
||||
}
|
||||
}
|
||||
|
||||
TEST_P(CopyTests_T2T, MultipleMipSrcSingleMipDst) {
|
||||
constexpr uint32_t kWidth = 256;
|
||||
constexpr uint32_t kHeight = 128;
|
||||
for (unsigned int i = 1; i < 4; ++i) {
|
||||
DoTest({kWidth, kHeight, 0, 0, i}, {kWidth >> i, kHeight >> i, 0, 0, 0},
|
||||
{kWidth >> i, kHeight >> i});
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(brandon1.jones@intel.com) Add test for ensuring blitCommandEncoder on Metal.
|
||||
|
||||
DAWN_INSTANTIATE_TEST(CopyTests_T2T, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend());
|
||||
|
||||
Reference in New Issue
Block a user