mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
D3D12: Add workaround for T2T copy issue on Intel GPUs
On Intel Gen9 (SKL) and Gen9.5 (KBL, CFL, CML) GPUs with latest Intel D3D12 driver (27.20.100.9316), there is a bug in the command CopyTextureRegion() when we want to do the texture-to-texture copy with the formats whose texel block size < 4 bytes and source mipmap level > destination mipmap level. This patch adds a workaround for this driver bug by implementing the functionality of the T2T copy with one T2B copy and one B2T copy. BUG=chromium:1161355 TEST=dawn_end2end_tests Change-Id: I688bb8bae277832aaba1be2680012040ee8e1160 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43860 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
9f6bc4e3a9
commit
f905e57be2
@@ -1617,9 +1617,7 @@ TEST_P(CopyTests_T2T, CopyFromNonZeroMipLevelWithTexelBlockSizeLessThan4Bytes) {
|
||||
// This test can pass on the Windows Intel Vulkan driver version 27.20.100.9168.
|
||||
// TODO(jiawei.shao@intel.com): enable this test on Intel Vulkan drivers after the upgrade of
|
||||
// try bots.
|
||||
// TODO(jiawei.shao@intel.com): enable this test on Intel D3D12 drivers when the workaround is
|
||||
// implemented.
|
||||
DAWN_SKIP_TEST_IF((IsD3D12() || (IsVulkan() && IsWindows())) && IsIntel());
|
||||
DAWN_SKIP_TEST_IF(IsVulkan() && IsWindows() && IsIntel());
|
||||
|
||||
constexpr std::array<wgpu::TextureFormat, 11> kFormats = {
|
||||
{wgpu::TextureFormat::RG8Sint, wgpu::TextureFormat::RG8Uint, wgpu::TextureFormat::RG8Snorm,
|
||||
@@ -1663,12 +1661,15 @@ TEST_P(CopyTests_T2T, CopyFromNonZeroMipLevelWithTexelBlockSizeLessThan4Bytes) {
|
||||
}
|
||||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(CopyTests_T2T,
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
OpenGLESBackend(),
|
||||
VulkanBackend());
|
||||
DAWN_INSTANTIATE_TEST(
|
||||
CopyTests_T2T,
|
||||
D3D12Backend(),
|
||||
D3D12Backend(
|
||||
{"use_temp_buffer_in_small_format_texture_to_texture_copy_from_greater_to_less_mip_level"}),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
OpenGLESBackend(),
|
||||
VulkanBackend());
|
||||
|
||||
static constexpr uint64_t kSmallBufferSize = 4;
|
||||
static constexpr uint64_t kLargeBufferSize = 1 << 16;
|
||||
|
||||
Reference in New Issue
Block a user