mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Skip testing of SNORM formats where non-readable.
SNORM textures are non-renderable on vanilla ES, which means they're also non-readable. Use the EXT_render_snorm extension where available, otherwise skip the test for now. Bug: dawn:624 dawn:636 dawn:647 dawn:667 Change-Id: Ic50368032d6168060b6b52889b4ba952ce662f02 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40420 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
160edb3eba
commit
b0ca30280a
@@ -117,6 +117,10 @@ TEST_P(NonzeroTextureCreationTests, ArrayLayerClears) {
|
||||
|
||||
// Test that nonrenderable texture formats clear 0x01 because toggle is enabled
|
||||
TEST_P(NonzeroTextureCreationTests, NonrenderableTextureFormat) {
|
||||
// TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading
|
||||
// from Snorm textures.
|
||||
DAWN_SKIP_TEST_IF(HasToggleEnabled("disable_snorm_read"));
|
||||
|
||||
wgpu::TextureDescriptor descriptor;
|
||||
descriptor.dimension = wgpu::TextureDimension::e2D;
|
||||
descriptor.size.width = kSize;
|
||||
@@ -151,6 +155,10 @@ TEST_P(NonzeroTextureCreationTests, NonrenderableTextureFormat) {
|
||||
// Test that textures with more than 1 array layers and nonrenderable texture formats clear to 0x01
|
||||
// because toggle is enabled
|
||||
TEST_P(NonzeroTextureCreationTests, NonRenderableTextureClearWithMultiArrayLayers) {
|
||||
// TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading
|
||||
// from Snorm textures.
|
||||
DAWN_SKIP_TEST_IF(HasToggleEnabled("disable_snorm_read"));
|
||||
|
||||
wgpu::TextureDescriptor descriptor;
|
||||
descriptor.dimension = wgpu::TextureDimension::e2D;
|
||||
descriptor.size.width = kSize;
|
||||
|
||||
@@ -770,8 +770,9 @@ TEST_P(StorageTextureTests, ReadonlyStorageTextureInVertexShader) {
|
||||
|
||||
// Test that read-only storage textures are supported in fragment shader.
|
||||
TEST_P(StorageTextureTests, ReadonlyStorageTextureInFragmentShader) {
|
||||
// TODO(crbug.com/dawn/624): this test fails on GLES. Investigate why.
|
||||
DAWN_SKIP_TEST_IF(IsOpenGLES());
|
||||
// TODO(crbug.com/dawn/672): Investigate why this test fails on Linux
|
||||
// NVidia OpenGLES drivers.
|
||||
DAWN_SKIP_TEST_IF(IsNvidia() && IsLinux() && IsOpenGLES());
|
||||
|
||||
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
||||
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
||||
@@ -807,20 +808,22 @@ TEST_P(StorageTextureTests, ReadonlyStorageTextureInFragmentShader) {
|
||||
|
||||
// Test that write-only storage textures are supported in compute shader.
|
||||
TEST_P(StorageTextureTests, WriteonlyStorageTextureInComputeShader) {
|
||||
// TODO(crbug.com/dawn/647): diagnose and fix this OpenGL ES failure.
|
||||
DAWN_SKIP_TEST_IF(IsOpenGLES());
|
||||
|
||||
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
||||
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
||||
continue;
|
||||
}
|
||||
if (!OpenGLESSupportsStorageTexture(format)) {
|
||||
if (IsOpenGLES() && !OpenGLESSupportsStorageTexture(format)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// TODO(jiawei.shao@intel.com): investigate why this test fails with RGBA8Snorm on Linux
|
||||
// Intel OpenGL driver.
|
||||
if (format == wgpu::TextureFormat::RGBA8Snorm && IsIntel() && IsOpenGL() && IsLinux()) {
|
||||
if (format == wgpu::TextureFormat::RGBA8Snorm && HasToggleEnabled("disable_snorm_read")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// TODO(crbug.com/dawn/676): investigate why this test fails with RGBA8Snorm on Linux
|
||||
// Intel OpenGL and OpenGLES drivers.
|
||||
if (format == wgpu::TextureFormat::RGBA8Snorm && IsIntel() &&
|
||||
(IsOpenGL() || IsOpenGLES()) && IsLinux()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -878,8 +881,9 @@ TEST_P(StorageTextureTests, ReadWriteDifferentStorageTextureInOneDispatchInCompu
|
||||
|
||||
// Test that write-only storage textures are supported in fragment shader.
|
||||
TEST_P(StorageTextureTests, WriteonlyStorageTextureInFragmentShader) {
|
||||
// TODO(crbug.com/dawn/647): diagnose and fix this OpenGL ES failure.
|
||||
DAWN_SKIP_TEST_IF(IsOpenGLES());
|
||||
// TODO(crbug.com/dawn/672): Investigate why this test fails on Linux
|
||||
// NVidia OpenGLES drivers.
|
||||
DAWN_SKIP_TEST_IF(IsNvidia() && IsLinux() && IsOpenGLES());
|
||||
|
||||
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
||||
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
||||
@@ -889,9 +893,14 @@ TEST_P(StorageTextureTests, WriteonlyStorageTextureInFragmentShader) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// TODO(jiawei.shao@intel.com): investigate why this test fails with RGBA8Snorm on Linux
|
||||
// Intel OpenGL driver.
|
||||
if (format == wgpu::TextureFormat::RGBA8Snorm && IsIntel() && IsOpenGL() && IsLinux()) {
|
||||
if (format == wgpu::TextureFormat::RGBA8Snorm && HasToggleEnabled("disable_snorm_read")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// TODO(crbug.com/dawn/676): investigate why this test fails with RGBA8Snorm on Linux
|
||||
// Intel OpenGL and OpenGLES drivers.
|
||||
if (format == wgpu::TextureFormat::RGBA8Snorm && IsIntel() &&
|
||||
(IsOpenGL() || IsOpenGLES()) && IsLinux()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1040,9 +1049,6 @@ TEST_P(StorageTextureTests, ReadonlyAndWriteonlyStorageTexturePingPong) {
|
||||
// Test that multiple dispatches to increment values by ping-ponging between a sampled texture and
|
||||
// a write-only storage texture are synchronized in one pass.
|
||||
TEST_P(StorageTextureTests, SampledAndWriteonlyStorageTexturePingPong) {
|
||||
// TODO(crbug.com/dawn/636): diagnose and fix this failure on OpenGL ES
|
||||
DAWN_SKIP_TEST_IF(IsOpenGLES());
|
||||
|
||||
constexpr wgpu::TextureFormat kTextureFormat = wgpu::TextureFormat::R32Uint;
|
||||
wgpu::Texture storageTexture1 = CreateTexture(
|
||||
kTextureFormat,
|
||||
|
||||
@@ -1017,8 +1017,9 @@ TEST_P(TextureZeroInitTest, ComputePassSampledTextureClear) {
|
||||
|
||||
// This tests that the code path of CopyTextureToBuffer clears correctly for non-renderable textures
|
||||
TEST_P(TextureZeroInitTest, NonRenderableTextureClear) {
|
||||
// TODO(crbug.com/dawn/660): Diagnose and fix this failure on SwANGLE.
|
||||
DAWN_SKIP_TEST_IF(IsANGLE());
|
||||
// TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading
|
||||
// from Snorm textures.
|
||||
DAWN_SKIP_TEST_IF(HasToggleEnabled("disable_snorm_read"));
|
||||
|
||||
wgpu::TextureDescriptor descriptor =
|
||||
CreateTextureDescriptor(1, 1, wgpu::TextureUsage::CopySrc, kNonrenderableColorFormat);
|
||||
@@ -1049,8 +1050,9 @@ TEST_P(TextureZeroInitTest, NonRenderableTextureClear) {
|
||||
|
||||
// This tests that the code path of CopyTextureToBuffer clears correctly for non-renderable textures
|
||||
TEST_P(TextureZeroInitTest, NonRenderableTextureClearUnalignedSize) {
|
||||
// TODO(crbug.com/dawn/660): Diagnose and fix this failure on SwANGLE.
|
||||
DAWN_SKIP_TEST_IF(IsANGLE());
|
||||
// TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading
|
||||
// from Snorm textures.
|
||||
DAWN_SKIP_TEST_IF(HasToggleEnabled("disable_snorm_read"));
|
||||
|
||||
wgpu::TextureDescriptor descriptor =
|
||||
CreateTextureDescriptor(1, 1, wgpu::TextureUsage::CopySrc, kNonrenderableColorFormat);
|
||||
@@ -1084,8 +1086,9 @@ TEST_P(TextureZeroInitTest, NonRenderableTextureClearUnalignedSize) {
|
||||
// This tests that the code path of CopyTextureToBuffer clears correctly for non-renderable textures
|
||||
// with more than 1 array layers
|
||||
TEST_P(TextureZeroInitTest, NonRenderableTextureClearWithMultiArrayLayers) {
|
||||
// TODO(crbug.com/dawn/660): Diagnose and fix this failure on SwANGLE.
|
||||
DAWN_SKIP_TEST_IF(IsANGLE());
|
||||
// TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading
|
||||
// from Snorm textures.
|
||||
DAWN_SKIP_TEST_IF(HasToggleEnabled("disable_snorm_read"));
|
||||
|
||||
wgpu::TextureDescriptor descriptor =
|
||||
CreateTextureDescriptor(1, 2, wgpu::TextureUsage::CopySrc, kNonrenderableColorFormat);
|
||||
@@ -1427,6 +1430,10 @@ TEST_P(TextureZeroInitTest, PreservesInitializedArrayLayer) {
|
||||
// This is a regression test for crbug.com/dawn/451 where the lazy texture
|
||||
// init path on D3D12 had a divide-by-zero exception in the copy split logic.
|
||||
TEST_P(TextureZeroInitTest, CopyTextureToBufferNonRenderableUnaligned) {
|
||||
// TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading
|
||||
// from Snorm textures.
|
||||
DAWN_SKIP_TEST_IF(HasToggleEnabled("disable_snorm_read"));
|
||||
|
||||
wgpu::TextureDescriptor descriptor;
|
||||
descriptor.size.width = kUnalignedSize;
|
||||
descriptor.size.height = kUnalignedSize;
|
||||
|
||||
Reference in New Issue
Block a user