mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 01:15:39 +00:00
Make Snorm formats non-renderable
They aren't guaranteed renderable in Vulkan nor core OpenGL 4.5 without extensions. They happened to work on a lot of our CQ builders but failed on Intel OpenGL Linux which helped understand this was an issue. BUG=dawn:128 Change-Id: I83c4f8116c1125c3bac2f1dd6197976c9063e129 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9682 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
bfc9cee5d3
commit
ccf805046a
@@ -245,9 +245,18 @@ TEST_F(TextureValidationTest, NonRenderableAndOutputAttachment) {
|
||||
descriptor.format = dawn::TextureFormat::RGBA8Unorm;
|
||||
device.CreateTexture(&descriptor);
|
||||
|
||||
// Fails because RG11B10Float is non-renderable
|
||||
descriptor.format = dawn::TextureFormat::RG11B10Float;
|
||||
ASSERT_DEVICE_ERROR(device.CreateTexture(&descriptor));
|
||||
dawn::TextureFormat nonRenderableFormats[] = {
|
||||
dawn::TextureFormat::RG11B10Float, dawn::TextureFormat::R8Snorm,
|
||||
dawn::TextureFormat::RG8Snorm, dawn::TextureFormat::RGBA8Snorm,
|
||||
dawn::TextureFormat::R16Snorm, dawn::TextureFormat::RG16Snorm,
|
||||
dawn::TextureFormat::RGBA16Snorm,
|
||||
};
|
||||
|
||||
for (dawn::TextureFormat format : nonRenderableFormats) {
|
||||
// Fails because `format` is non-renderable
|
||||
descriptor.format = format;
|
||||
ASSERT_DEVICE_ERROR(device.CreateTexture(&descriptor));
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(jiawei.shao@intel.com): add tests to verify we cannot create 1D or 3D textures with
|
||||
|
||||
Reference in New Issue
Block a user