Enable all the tests which were blocked on WriteTexture.

Bug: dawn:483 dawn:643
Change-Id: Id6b6f0d1ff039eda3156bc371e6c722b3c72ac96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38580
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Stephen White 2021-01-25 19:42:18 +00:00 committed by Commit Bot service account
parent c4b75ac717
commit 2a799fe3bf
4 changed files with 14 additions and 62 deletions

View File

@ -90,9 +90,6 @@ class CopyTextureForBrowserTests : public DawnTest {
wgpu::CommandEncoder encoder = device.CreateCommandEncoder(); wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
// Use writeTexture to populate the current slice of the texture in
// `level` mip level for all platforms except OpenGL.
// TODO(shaobo.yan@intel.com): OpenGL doesn't have 'WriteTexture' implementation.
const utils::TextureDataCopyLayout copyLayout = const utils::TextureDataCopyLayout copyLayout =
utils::GetTextureDataCopyLayoutForTexture2DAtLevel( utils::GetTextureDataCopyLayoutForTexture2DAtLevel(
kTextureFormat, kTextureFormat,
@ -165,11 +162,6 @@ TEST_P(CopyTextureForBrowserTests, PassthroughCopy) {
// Tests skip due to crbug.com/dawn/592. // Tests skip due to crbug.com/dawn/592.
DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled()); DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
// OpenGL tests fails because 'WriteTexture' is unimplemented.
// Related bug : crbug.com/dawn/483
DAWN_SKIP_TEST_IF(IsOpenGL());
DAWN_SKIP_TEST_IF(IsOpenGLES());
constexpr uint32_t kWidth = 10; constexpr uint32_t kWidth = 10;
constexpr uint32_t kHeight = 1; constexpr uint32_t kHeight = 1;
@ -186,11 +178,6 @@ TEST_P(CopyTextureForBrowserTests, VerifyCopyOnXDirection) {
// Tests skip due to crbug.com/dawn/592. // Tests skip due to crbug.com/dawn/592.
DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled()); DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
// OpenGL tests fails because 'WriteTexture' is unimplemented.
// Related bug : crbug.com/dawn/483
DAWN_SKIP_TEST_IF(IsOpenGL());
DAWN_SKIP_TEST_IF(IsOpenGLES());
constexpr uint32_t kWidth = 1000; constexpr uint32_t kWidth = 1000;
constexpr uint32_t kHeight = 1; constexpr uint32_t kHeight = 1;
@ -207,11 +194,6 @@ TEST_P(CopyTextureForBrowserTests, VerifyCopyOnYDirection) {
// Tests skip due to crbug.com/dawn/592. // Tests skip due to crbug.com/dawn/592.
DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled()); DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
// OpenGL tests fails because 'WriteTexture' is unimplemented.
// Related bug : crbug.com/dawn/483
DAWN_SKIP_TEST_IF(IsOpenGL());
DAWN_SKIP_TEST_IF(IsOpenGLES());
constexpr uint32_t kWidth = 1; constexpr uint32_t kWidth = 1;
constexpr uint32_t kHeight = 1000; constexpr uint32_t kHeight = 1000;
@ -228,11 +210,6 @@ TEST_P(CopyTextureForBrowserTests, VerifyCopyFromLargeTexture) {
// Tests skip due to crbug.com/dawn/592. // Tests skip due to crbug.com/dawn/592.
DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled()); DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
// OpenGL tests fails because 'WriteTexture' is unimplemented.
// Related bug : crbug.com/dawn/483
DAWN_SKIP_TEST_IF(IsOpenGL());
DAWN_SKIP_TEST_IF(IsOpenGLES());
constexpr uint32_t kWidth = 899; constexpr uint32_t kWidth = 899;
constexpr uint32_t kHeight = 999; constexpr uint32_t kHeight = 999;
@ -249,11 +226,6 @@ TEST_P(CopyTextureForBrowserTests, VerifyFlipY) {
// Tests skip due to crbug.com/dawn/592. // Tests skip due to crbug.com/dawn/592.
DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled()); DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
// OpenGL tests fails because 'WriteTexture' is unimplemented.
// Related bug : crbug.com/dawn/483
DAWN_SKIP_TEST_IF(IsOpenGL());
DAWN_SKIP_TEST_IF(IsOpenGLES());
constexpr uint32_t kWidth = 901; constexpr uint32_t kWidth = 901;
constexpr uint32_t kHeight = 1001; constexpr uint32_t kHeight = 1001;
@ -271,11 +243,6 @@ TEST_P(CopyTextureForBrowserTests, VerifyFlipYInSlimTexture) {
// Tests skip due to crbug.com/dawn/592. // Tests skip due to crbug.com/dawn/592.
DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled()); DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
// OpenGL tests fails because 'WriteTexture' is unimplemented.
// Related bug : crbug.com/dawn/483
DAWN_SKIP_TEST_IF(IsOpenGL());
DAWN_SKIP_TEST_IF(IsOpenGLES());
constexpr uint32_t kWidth = 1; constexpr uint32_t kWidth = 1;
constexpr uint32_t kHeight = 1001; constexpr uint32_t kHeight = 1001;

View File

@ -237,10 +237,6 @@ TEST_P(GpuMemorySyncTests, ComputePassToRenderPass) {
// Use an image as both sampled and readonly storage in a compute pass. This is a regression test // Use an image as both sampled and readonly storage in a compute pass. This is a regression test
// for the Vulkan backend choosing different layouts for Sampled and ReadOnlyStorage. // for the Vulkan backend choosing different layouts for Sampled and ReadOnlyStorage.
TEST_P(GpuMemorySyncTests, SampledAndROStorageTextureInComputePass) { TEST_P(GpuMemorySyncTests, SampledAndROStorageTextureInComputePass) {
// TODO(dawn:483): Test is skipped on OpenGL because it uses WriteTexture which is
// unimplemented.
DAWN_SKIP_TEST_IF(IsOpenGL() || IsOpenGLES());
// Create a storage + sampled texture of one texel initialized to 1 // Create a storage + sampled texture of one texel initialized to 1
wgpu::TextureDescriptor texDesc; wgpu::TextureDescriptor texDesc;
texDesc.format = wgpu::TextureFormat::R32Uint; texDesc.format = wgpu::TextureFormat::R32Uint;

View File

@ -178,13 +178,6 @@ TEST_P(QueueWriteBufferTests, SuperLargeWriteBuffer) {
// Test a special code path: writing when dynamic uploader already contatins some unaligned // Test a special code path: writing when dynamic uploader already contatins some unaligned
// data, it might be necessary to use a ring buffer with properly aligned offset. // data, it might be necessary to use a ring buffer with properly aligned offset.
TEST_P(QueueWriteBufferTests, UnalignedDynamicUploader) { TEST_P(QueueWriteBufferTests, UnalignedDynamicUploader) {
// TODO(dawn:483): Skipping test because WriteTexture inside UnalignDynamicUploader
// is not implemented. Moreover when using UnalignDynamicUploader we are assuming
// that WriteTexture implementation uses a DynamicUploader which might be false in the
// case of a future OpenGL implementation.
DAWN_SKIP_TEST_IF(IsOpenGL());
DAWN_SKIP_TEST_IF(IsOpenGLES());
utils::UnalignDynamicUploader(device); utils::UnalignDynamicUploader(device);
wgpu::BufferDescriptor descriptor; wgpu::BufferDescriptor descriptor;

View File

@ -1453,9 +1453,6 @@ TEST_P(TextureZeroInitTest, CopyTextureToBufferNonRenderableUnaligned) {
// In this test WriteTexture fully overwrites a texture // In this test WriteTexture fully overwrites a texture
TEST_P(TextureZeroInitTest, WriteWholeTexture) { TEST_P(TextureZeroInitTest, WriteWholeTexture) {
// TODO(dawn:483): Remove this condition after implementing WriteTexture in those backends.
DAWN_SKIP_TEST_IF(IsOpenGL());
wgpu::TextureDescriptor descriptor = CreateTextureDescriptor( wgpu::TextureDescriptor descriptor = CreateTextureDescriptor(
1, 1, wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::CopySrc, kColorFormat); 1, 1, wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::CopySrc, kColorFormat);
wgpu::Texture texture = device.CreateTexture(&descriptor); wgpu::Texture texture = device.CreateTexture(&descriptor);
@ -1488,9 +1485,6 @@ TEST_P(TextureZeroInitTest, WriteWholeTexture) {
// Test WriteTexture to a subset of the texture, lazy init is necessary to clear the other // Test WriteTexture to a subset of the texture, lazy init is necessary to clear the other
// half. // half.
TEST_P(TextureZeroInitTest, WriteTextureHalf) { TEST_P(TextureZeroInitTest, WriteTextureHalf) {
// TODO(dawn:483): Remove this condition after implementing WriteTexture in those backends.
DAWN_SKIP_TEST_IF(IsOpenGL());
wgpu::TextureDescriptor descriptor = CreateTextureDescriptor( wgpu::TextureDescriptor descriptor = CreateTextureDescriptor(
4, 1, 4, 1,
wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled | wgpu::TextureUsage::CopySrc, wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled | wgpu::TextureUsage::CopySrc,
@ -1528,9 +1522,6 @@ TEST_P(TextureZeroInitTest, WriteTextureHalf) {
// In this test WriteTexture fully overwrites a range of subresources, so lazy initialization // In this test WriteTexture fully overwrites a range of subresources, so lazy initialization
// is needed for neither the subresources involved in the write nor the other subresources. // is needed for neither the subresources involved in the write nor the other subresources.
TEST_P(TextureZeroInitTest, WriteWholeTextureArray) { TEST_P(TextureZeroInitTest, WriteWholeTextureArray) {
// TODO(dawn:483): Remove this condition after implementing WriteTexture in those backends.
DAWN_SKIP_TEST_IF(IsOpenGL());
wgpu::TextureDescriptor descriptor = CreateTextureDescriptor( wgpu::TextureDescriptor descriptor = CreateTextureDescriptor(
1, 6, wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::CopySrc, kColorFormat); 1, 6, wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::CopySrc, kColorFormat);
wgpu::Texture texture = device.CreateTexture(&descriptor); wgpu::Texture texture = device.CreateTexture(&descriptor);
@ -1571,9 +1562,6 @@ TEST_P(TextureZeroInitTest, WriteWholeTextureArray) {
// Test WriteTexture to a subset of the subresource, lazy init is necessary to clear the other // Test WriteTexture to a subset of the subresource, lazy init is necessary to clear the other
// half. // half.
TEST_P(TextureZeroInitTest, WriteTextureArrayHalf) { TEST_P(TextureZeroInitTest, WriteTextureArrayHalf) {
// TODO(dawn:483): Remove this condition after implementing WriteTexture in those backends.
DAWN_SKIP_TEST_IF(IsOpenGL());
wgpu::TextureDescriptor descriptor = CreateTextureDescriptor( wgpu::TextureDescriptor descriptor = CreateTextureDescriptor(
4, 6, 4, 6,
wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled | wgpu::TextureUsage::CopySrc, wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled | wgpu::TextureUsage::CopySrc,
@ -1618,9 +1606,6 @@ TEST_P(TextureZeroInitTest, WriteTextureArrayHalf) {
// In this test WriteTexture fully overwrites a texture at mip level. // In this test WriteTexture fully overwrites a texture at mip level.
TEST_P(TextureZeroInitTest, WriteWholeTextureAtMipLevel) { TEST_P(TextureZeroInitTest, WriteWholeTextureAtMipLevel) {
// TODO(dawn:483): Remove this condition after implementing WriteTexture in those backends.
DAWN_SKIP_TEST_IF(IsOpenGL());
wgpu::TextureDescriptor descriptor = CreateTextureDescriptor( wgpu::TextureDescriptor descriptor = CreateTextureDescriptor(
4, 1, wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::CopySrc, kColorFormat); 4, 1, wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::CopySrc, kColorFormat);
wgpu::Texture texture = device.CreateTexture(&descriptor); wgpu::Texture texture = device.CreateTexture(&descriptor);
@ -1657,9 +1642,6 @@ TEST_P(TextureZeroInitTest, WriteWholeTextureAtMipLevel) {
// Test WriteTexture to a subset of the texture at mip level, lazy init is necessary to clear the // Test WriteTexture to a subset of the texture at mip level, lazy init is necessary to clear the
// other half. // other half.
TEST_P(TextureZeroInitTest, WriteTextureHalfAtMipLevel) { TEST_P(TextureZeroInitTest, WriteTextureHalfAtMipLevel) {
// TODO(dawn:483): Remove this condition after implementing WriteTexture in those backends.
DAWN_SKIP_TEST_IF(IsOpenGL());
wgpu::TextureDescriptor descriptor = CreateTextureDescriptor( wgpu::TextureDescriptor descriptor = CreateTextureDescriptor(
4, 1, 4, 1,
wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled | wgpu::TextureUsage::CopySrc, wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled | wgpu::TextureUsage::CopySrc,
@ -1860,6 +1842,9 @@ TEST_P(CompressedTextureZeroInitTest, FullMipCopy) {
// Test that 1 lazy clear count happens when we copy to half the texture // Test that 1 lazy clear count happens when we copy to half the texture
TEST_P(CompressedTextureZeroInitTest, HalfCopyBufferToTexture) { TEST_P(CompressedTextureZeroInitTest, HalfCopyBufferToTexture) {
// TODO(crbug.com/dawn/643): diagnose and fix this failure on OpenGL.
DAWN_SKIP_TEST_IF(IsOpenGL());
wgpu::TextureDescriptor textureDescriptor; wgpu::TextureDescriptor textureDescriptor;
textureDescriptor.usage = textureDescriptor.usage =
wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled; wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled;
@ -1899,6 +1884,9 @@ TEST_P(CompressedTextureZeroInitTest, FullCopyToNonZeroMipLevel) {
// Test that 1 lazy clear count happens when we copy buffer to half texture to a nonzero mip level // Test that 1 lazy clear count happens when we copy buffer to half texture to a nonzero mip level
// (with physical size different from the virtual mip size) // (with physical size different from the virtual mip size)
TEST_P(CompressedTextureZeroInitTest, HalfCopyToNonZeroMipLevel) { TEST_P(CompressedTextureZeroInitTest, HalfCopyToNonZeroMipLevel) {
// TODO(crbug.com/dawn/643): diagnose and fix this failure on OpenGL.
DAWN_SKIP_TEST_IF(IsOpenGL());
wgpu::TextureDescriptor textureDescriptor; wgpu::TextureDescriptor textureDescriptor;
textureDescriptor.usage = textureDescriptor.usage =
wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled; wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled;
@ -1937,6 +1925,9 @@ TEST_P(CompressedTextureZeroInitTest, FullCopyToNonZeroArrayLayer) {
// Test that 1 lazy clear count happens when we copy buffer to half texture to a nonzero array layer // Test that 1 lazy clear count happens when we copy buffer to half texture to a nonzero array layer
TEST_P(CompressedTextureZeroInitTest, HalfCopyToNonZeroArrayLayer) { TEST_P(CompressedTextureZeroInitTest, HalfCopyToNonZeroArrayLayer) {
// TODO(crbug.com/dawn/643): diagnose and fix this failure on OpenGL.
DAWN_SKIP_TEST_IF(IsOpenGL());
wgpu::TextureDescriptor textureDescriptor; wgpu::TextureDescriptor textureDescriptor;
textureDescriptor.usage = textureDescriptor.usage =
wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled; wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled;
@ -1998,6 +1989,9 @@ TEST_P(CompressedTextureZeroInitTest, FullCopyTextureToTextureMipLevel) {
// half copy texture to texture, lazy clears are needed for noncopied half // half copy texture to texture, lazy clears are needed for noncopied half
TEST_P(CompressedTextureZeroInitTest, HalfCopyTextureToTextureMipLevel) { TEST_P(CompressedTextureZeroInitTest, HalfCopyTextureToTextureMipLevel) {
// TODO(crbug.com/dawn/643): diagnose and fix this failure on OpenGL.
DAWN_SKIP_TEST_IF(IsOpenGL());
// create srcTexture with data // create srcTexture with data
wgpu::TextureDescriptor srcDescriptor = CreateTextureDescriptor( wgpu::TextureDescriptor srcDescriptor = CreateTextureDescriptor(
3, 1, 3, 1,
@ -2044,4 +2038,6 @@ TEST_P(CompressedTextureZeroInitTest, HalfCopyTextureToTextureMipLevel) {
DAWN_INSTANTIATE_TEST(CompressedTextureZeroInitTest, DAWN_INSTANTIATE_TEST(CompressedTextureZeroInitTest,
D3D12Backend({"nonzero_clear_resources_on_creation_for_testing"}), D3D12Backend({"nonzero_clear_resources_on_creation_for_testing"}),
MetalBackend({"nonzero_clear_resources_on_creation_for_testing"}), MetalBackend({"nonzero_clear_resources_on_creation_for_testing"}),
OpenGLBackend({"nonzero_clear_resources_on_creation_for_testing"}),
OpenGLESBackend({"nonzero_clear_resources_on_creation_for_testing"}),
VulkanBackend({"nonzero_clear_resources_on_creation_for_testing"})); VulkanBackend({"nonzero_clear_resources_on_creation_for_testing"}));