Commit 7c02cfee by Alexey Knyazev Committed by Commit Bot

Avoid undefined behavior in BPTCCompressedTextureTest

Bug: angleproject:5360, angleproject:5731 Change-Id: Ia883d2d319d7ce4659f4e1e99b5eccf0e01a45e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2752747Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
parent 8650381e
...@@ -21,7 +21,10 @@ const unsigned int kPixelTolerance = 1u; ...@@ -21,7 +21,10 @@ const unsigned int kPixelTolerance = 1u;
const std::array<GLubyte, 16> kBC7Data4x4 = {0x50, 0x1f, 0xfc, 0xf, 0x0, 0xf0, 0xe3, 0xe1, const std::array<GLubyte, 16> kBC7Data4x4 = {0x50, 0x1f, 0xfc, 0xf, 0x0, 0xf0, 0xe3, 0xe1,
0xe1, 0xe1, 0xc1, 0xf, 0xfc, 0xc0, 0xf, 0xfc}; 0xe1, 0xe1, 0xc1, 0xf, 0xfc, 0xc0, 0xf, 0xfc};
const std::array<GLubyte, 16> kBC7BlackData4x4 = {}; // The pixel data represents a 4x4 pixel image with the transparent black solid color.
// Sampling from a zero-filled block is undefined, so use a valid one.
const std::array<GLubyte, 16> kBC7BlackData4x4 = {0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
} // anonymous namespace } // anonymous namespace
class BPTCCompressedTextureTest : public ANGLETest class BPTCCompressedTextureTest : public ANGLETest
...@@ -273,9 +276,6 @@ TEST_P(BPTCCompressedTextureTestES3, CopyTexSubImage3DDisallowed) ...@@ -273,9 +276,6 @@ TEST_P(BPTCCompressedTextureTestES3, CopyTexSubImage3DDisallowed)
// Test uploading texture data from a PBO to a texture. // Test uploading texture data from a PBO to a texture.
TEST_P(BPTCCompressedTextureTestES3, PBOCompressedTexImage) TEST_P(BPTCCompressedTextureTestES3, PBOCompressedTexImage)
{ {
// TODO(anglebug.com/5360): Failing on ARM-based Apple DTKs.
ANGLE_SKIP_TEST_IF(IsOSX() && IsARM64() && IsMetal());
ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled("GL_EXT_texture_compression_bptc")); ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled("GL_EXT_texture_compression_bptc"));
GLTexture texture; GLTexture texture;
...@@ -327,9 +327,6 @@ TEST_P(BPTCCompressedTextureTestES3, PBOCompressedTexImage) ...@@ -327,9 +327,6 @@ TEST_P(BPTCCompressedTextureTestES3, PBOCompressedTexImage)
// Test uploading texture data from a PBO to a non-zero base texture. // Test uploading texture data from a PBO to a non-zero base texture.
TEST_P(BPTCCompressedTextureTestES3, PBOCompressedTexImageNonZeroBase) TEST_P(BPTCCompressedTextureTestES3, PBOCompressedTexImageNonZeroBase)
{ {
// TODO(anglebug.com/5360): Failing on ARM-based Apple DTKs.
ANGLE_SKIP_TEST_IF(IsOSX() && IsARM64() && IsMetal());
ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled("GL_EXT_texture_compression_bptc")); ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled("GL_EXT_texture_compression_bptc"));
GLTexture texture; GLTexture texture;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment