Commit 70022972 by Geoff Lang

Revert "Work around deprecated LUMA formats in the core profile."

Caused failures in the WebglConformance.conformance_textures_misc_copy_tex_image_2d_formats test on the ATI FYI waterfall bot. This reverts commit 61f51dc1. Change-Id: Iddea03d53ae2a9b639e36931f01c1e889e550af4 Reviewed-on: https://chromium-review.googlesource.com/294262Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 1e949799
...@@ -45,36 +45,6 @@ static bool CompatibleTextureTarget(GLenum textureType, GLenum textureTarget) ...@@ -45,36 +45,6 @@ static bool CompatibleTextureTarget(GLenum textureType, GLenum textureTarget)
} }
} }
static bool IsLUMAFormat(GLenum format)
{
return format == GL_LUMINANCE || format == GL_ALPHA || format == GL_LUMINANCE_ALPHA;
}
static LUMAWorkaround GetLUMAWorkaroundInfo(GLenum originalFormat, GLenum destinationFormat)
{
const gl::InternalFormat &originalFormatInfo = gl::GetInternalFormatInfo(originalFormat);
if (IsLUMAFormat(originalFormatInfo.format))
{
const gl::InternalFormat &destinationFormatInfo =
gl::GetInternalFormatInfo(destinationFormat);
return LUMAWorkaround(!IsLUMAFormat(destinationFormatInfo.format),
originalFormatInfo.format, destinationFormatInfo.format);
}
else
{
return LUMAWorkaround(false, GL_NONE, GL_NONE);
}
}
LUMAWorkaround::LUMAWorkaround() : LUMAWorkaround(false, GL_NONE, GL_NONE)
{
}
LUMAWorkaround::LUMAWorkaround(bool enabled_, GLenum sourceFormat_, GLenum workaroundFormat_)
: enabled(enabled_), sourceFormat(sourceFormat_), workaroundFormat(workaroundFormat_)
{
}
TextureGL::TextureGL(GLenum type, TextureGL::TextureGL(GLenum type,
const FunctionsGL *functions, const FunctionsGL *functions,
const WorkaroundsGL &workarounds, const WorkaroundsGL &workarounds,
...@@ -84,7 +54,6 @@ TextureGL::TextureGL(GLenum type, ...@@ -84,7 +54,6 @@ TextureGL::TextureGL(GLenum type,
mFunctions(functions), mFunctions(functions),
mWorkarounds(workarounds), mWorkarounds(workarounds),
mStateManager(stateManager), mStateManager(stateManager),
mLUMAWorkaroundLevels(gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS),
mAppliedSamplerState(), mAppliedSamplerState(),
mTextureID(0) mTextureID(0)
{ {
...@@ -135,9 +104,6 @@ gl::Error TextureGL::setImage(GLenum target, size_t level, GLenum internalFormat ...@@ -135,9 +104,6 @@ gl::Error TextureGL::setImage(GLenum target, size_t level, GLenum internalFormat
UNREACHABLE(); UNREACHABLE();
} }
mLUMAWorkaroundLevels[level] =
GetLUMAWorkaroundInfo(internalFormat, texImageFormat.internalFormat);
return gl::Error(GL_NO_ERROR); return gl::Error(GL_NO_ERROR);
} }
...@@ -168,9 +134,6 @@ gl::Error TextureGL::setSubImage(GLenum target, size_t level, const gl::Box &are ...@@ -168,9 +134,6 @@ gl::Error TextureGL::setSubImage(GLenum target, size_t level, const gl::Box &are
UNREACHABLE(); UNREACHABLE();
} }
ASSERT(mLUMAWorkaroundLevels[level].enabled ==
GetLUMAWorkaroundInfo(format, texSubImageFormat.format).enabled);
return gl::Error(GL_NO_ERROR); return gl::Error(GL_NO_ERROR);
} }
...@@ -201,9 +164,6 @@ gl::Error TextureGL::setCompressedImage(GLenum target, size_t level, GLenum inte ...@@ -201,9 +164,6 @@ gl::Error TextureGL::setCompressedImage(GLenum target, size_t level, GLenum inte
UNREACHABLE(); UNREACHABLE();
} }
ASSERT(!GetLUMAWorkaroundInfo(internalFormat, compressedTexImageFormat.internalFormat).enabled);
mLUMAWorkaroundLevels[level].enabled = false;
return gl::Error(GL_NO_ERROR); return gl::Error(GL_NO_ERROR);
} }
...@@ -235,9 +195,6 @@ gl::Error TextureGL::setCompressedSubImage(GLenum target, size_t level, const gl ...@@ -235,9 +195,6 @@ gl::Error TextureGL::setCompressedSubImage(GLenum target, size_t level, const gl
UNREACHABLE(); UNREACHABLE();
} }
ASSERT(!mLUMAWorkaroundLevels[level].enabled &&
!GetLUMAWorkaroundInfo(format, compressedTexSubImageFormat.format).enabled);
return gl::Error(GL_NO_ERROR); return gl::Error(GL_NO_ERROR);
} }
...@@ -263,9 +220,6 @@ gl::Error TextureGL::copyImage(GLenum target, size_t level, const gl::Rectangle ...@@ -263,9 +220,6 @@ gl::Error TextureGL::copyImage(GLenum target, size_t level, const gl::Rectangle
UNREACHABLE(); UNREACHABLE();
} }
mLUMAWorkaroundLevels[level] =
GetLUMAWorkaroundInfo(internalFormat, copyTexImageFormat.internalFormat);
return gl::Error(GL_NO_ERROR); return gl::Error(GL_NO_ERROR);
} }
...@@ -425,13 +379,6 @@ gl::Error TextureGL::setStorage(GLenum target, size_t levels, GLenum internalFor ...@@ -425,13 +379,6 @@ gl::Error TextureGL::setStorage(GLenum target, size_t levels, GLenum internalFor
UNREACHABLE(); UNREACHABLE();
} }
LUMAWorkaround lumaWorkaround =
GetLUMAWorkaroundInfo(internalFormat, texStorageFormat.internalFormat);
for (size_t level = 0; level < mLUMAWorkaroundLevels.size(); level++)
{
mLUMAWorkaroundLevels[level] = lumaWorkaround;
}
return gl::Error(GL_NO_ERROR); return gl::Error(GL_NO_ERROR);
} }
...@@ -439,12 +386,6 @@ gl::Error TextureGL::generateMipmaps(const gl::SamplerState &samplerState) ...@@ -439,12 +386,6 @@ gl::Error TextureGL::generateMipmaps(const gl::SamplerState &samplerState)
{ {
mStateManager->bindTexture(mTextureType, mTextureID); mStateManager->bindTexture(mTextureType, mTextureID);
mFunctions->generateMipmap(mTextureType); mFunctions->generateMipmap(mTextureType);
for (size_t level = samplerState.baseLevel; level < mLUMAWorkaroundLevels.size(); level++)
{
mLUMAWorkaroundLevels[level] = mLUMAWorkaroundLevels[samplerState.baseLevel];
}
return gl::Error(GL_NO_ERROR); return gl::Error(GL_NO_ERROR);
} }
...@@ -454,8 +395,6 @@ void TextureGL::bindTexImage(egl::Surface *surface) ...@@ -454,8 +395,6 @@ void TextureGL::bindTexImage(egl::Surface *surface)
// Make sure this texture is bound // Make sure this texture is bound
mStateManager->bindTexture(mTextureType, mTextureID); mStateManager->bindTexture(mTextureType, mTextureID);
mLUMAWorkaroundLevels[0].enabled = false;
} }
void TextureGL::releaseTexImage() void TextureGL::releaseTexImage()
...@@ -480,148 +419,40 @@ gl::Error TextureGL::setEGLImageTarget(GLenum target, egl::Image *image) ...@@ -480,148 +419,40 @@ gl::Error TextureGL::setEGLImageTarget(GLenum target, egl::Image *image)
return gl::Error(GL_INVALID_OPERATION); return gl::Error(GL_INVALID_OPERATION);
} }
template <typename T, typename ApplyTextureFuncType> template <typename T>
static inline void SyncSamplerStateMember(const FunctionsGL *functions, static inline void SyncSamplerStateMember(const FunctionsGL *functions, const gl::SamplerState &newState,
ApplyTextureFuncType applyTextureFunc, gl::SamplerState &curState, GLenum textureType, GLenum name,
const gl::SamplerState &newState,
gl::SamplerState &curState,
GLenum textureType,
GLenum name,
T(gl::SamplerState::*samplerMember)) T(gl::SamplerState::*samplerMember))
{ {
if (curState.*samplerMember != newState.*samplerMember) if (curState.*samplerMember != newState.*samplerMember)
{ {
applyTextureFunc();
curState.*samplerMember = newState.*samplerMember; curState.*samplerMember = newState.*samplerMember;
functions->texParameterf(textureType, name, static_cast<GLfloat>(curState.*samplerMember)); functions->texParameterf(textureType, name, static_cast<GLfloat>(curState.*samplerMember));
} }
} }
template <typename T, typename ApplyTextureFuncType>
static inline void SyncSamplerStateSwizzle(const FunctionsGL *functions,
ApplyTextureFuncType applyTextureFunc,
const LUMAWorkaround &lumaWorkaround,
const gl::SamplerState &newState,
gl::SamplerState &curState,
GLenum textureType,
GLenum name,
T(gl::SamplerState::*samplerMember))
{
if (lumaWorkaround.enabled)
{
UNUSED_ASSERTION_VARIABLE(lumaWorkaround.workaroundFormat);
GLenum resultSwizzle = GL_NONE;
switch (newState.*samplerMember)
{
case GL_RED:
case GL_GREEN:
case GL_BLUE:
if (lumaWorkaround.sourceFormat == GL_LUMINANCE ||
lumaWorkaround.sourceFormat == GL_LUMINANCE_ALPHA)
{
// Texture is backed by a RED or RG texture, point all color channels at the red
// channel.
ASSERT(lumaWorkaround.workaroundFormat == GL_RED ||
lumaWorkaround.workaroundFormat == GL_RG);
resultSwizzle = GL_RED;
}
else if (lumaWorkaround.sourceFormat == GL_ALPHA)
{
// Color channels are not supposed to exist, make them always sample 0.
resultSwizzle = GL_ZERO;
}
else
{
UNREACHABLE();
}
break;
case GL_ALPHA:
if (lumaWorkaround.sourceFormat == GL_LUMINANCE)
{
// Alpha channel is not supposed to exist, make it always sample 1.
resultSwizzle = GL_ONE;
}
else if (lumaWorkaround.sourceFormat == GL_ALPHA)
{
// Texture is backed by a RED texture, point the alpha channel at the red
// channel.
ASSERT(lumaWorkaround.workaroundFormat == GL_RED);
resultSwizzle = GL_RED;
}
else if (lumaWorkaround.sourceFormat == GL_LUMINANCE_ALPHA)
{
// Texture is backed by an RG texture, point the alpha channel at the green
// channel.
ASSERT(lumaWorkaround.workaroundFormat == GL_RG);
resultSwizzle = GL_GREEN;
}
else
{
UNREACHABLE();
}
break;
case GL_ZERO:
case GL_ONE:
// Don't modify the swizzle state when requesting ZERO or ONE.
resultSwizzle = newState.*samplerMember;
break;
default:
UNREACHABLE();
break;
}
// Apply the new swizzle state if needed
if (curState.*samplerMember != resultSwizzle)
{
applyTextureFunc();
curState.*samplerMember = resultSwizzle;
functions->texParameterf(textureType, name, static_cast<GLfloat>(resultSwizzle));
}
}
else
{
SyncSamplerStateMember(functions, applyTextureFunc, newState, curState, textureType, name,
samplerMember);
}
}
void TextureGL::syncSamplerState(const gl::SamplerState &samplerState) const void TextureGL::syncSamplerState(const gl::SamplerState &samplerState) const
{ {
// Callback lamdba to bind this texture only if needed. if (mAppliedSamplerState != samplerState)
bool textureApplied = false; {
auto applyTextureFunc = [&]() mStateManager->bindTexture(mTextureType, mTextureID);
{ SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_MIN_FILTER, &gl::SamplerState::minFilter);
if (!textureApplied) SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_MAG_FILTER, &gl::SamplerState::magFilter);
{ SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_WRAP_S, &gl::SamplerState::wrapS);
mStateManager->bindTexture(mTextureType, mTextureID); SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_WRAP_T, &gl::SamplerState::wrapT);
textureApplied = true; SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_WRAP_R, &gl::SamplerState::wrapR);
} SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_MAX_ANISOTROPY_EXT, &gl::SamplerState::maxAnisotropy);
}; SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_BASE_LEVEL, &gl::SamplerState::baseLevel);
SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_MAX_LEVEL, &gl::SamplerState::maxLevel);
// clang-format off SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_MIN_LOD, &gl::SamplerState::minLod);
SyncSamplerStateMember(mFunctions, applyTextureFunc, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_MIN_FILTER, &gl::SamplerState::minFilter); SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_MAX_LOD, &gl::SamplerState::maxLod);
SyncSamplerStateMember(mFunctions, applyTextureFunc, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_MAG_FILTER, &gl::SamplerState::magFilter); SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_COMPARE_MODE, &gl::SamplerState::compareMode);
SyncSamplerStateMember(mFunctions, applyTextureFunc, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_WRAP_S, &gl::SamplerState::wrapS); SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_COMPARE_FUNC, &gl::SamplerState::compareFunc);
SyncSamplerStateMember(mFunctions, applyTextureFunc, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_WRAP_T, &gl::SamplerState::wrapT); SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_SWIZZLE_R, &gl::SamplerState::swizzleRed);
SyncSamplerStateMember(mFunctions, applyTextureFunc, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_WRAP_R, &gl::SamplerState::wrapR); SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_SWIZZLE_G, &gl::SamplerState::swizzleGreen);
SyncSamplerStateMember(mFunctions, applyTextureFunc, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_MAX_ANISOTROPY_EXT, &gl::SamplerState::maxAnisotropy); SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_SWIZZLE_B, &gl::SamplerState::swizzleBlue);
SyncSamplerStateMember(mFunctions, applyTextureFunc, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_BASE_LEVEL, &gl::SamplerState::baseLevel); SyncSamplerStateMember(mFunctions, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_SWIZZLE_A, &gl::SamplerState::swizzleAlpha);
SyncSamplerStateMember(mFunctions, applyTextureFunc, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_MAX_LEVEL, &gl::SamplerState::maxLevel); }
SyncSamplerStateMember(mFunctions, applyTextureFunc, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_MIN_LOD, &gl::SamplerState::minLod);
SyncSamplerStateMember(mFunctions, applyTextureFunc, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_MAX_LOD, &gl::SamplerState::maxLod);
SyncSamplerStateMember(mFunctions, applyTextureFunc, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_COMPARE_MODE, &gl::SamplerState::compareMode);
SyncSamplerStateMember(mFunctions, applyTextureFunc, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_COMPARE_FUNC, &gl::SamplerState::compareFunc);
const LUMAWorkaround &LUMAWorkaround = mLUMAWorkaroundLevels[samplerState.baseLevel];
SyncSamplerStateSwizzle(mFunctions, applyTextureFunc, LUMAWorkaround, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_SWIZZLE_R, &gl::SamplerState::swizzleRed);
SyncSamplerStateSwizzle(mFunctions, applyTextureFunc, LUMAWorkaround, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_SWIZZLE_G, &gl::SamplerState::swizzleGreen);
SyncSamplerStateSwizzle(mFunctions, applyTextureFunc, LUMAWorkaround, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_SWIZZLE_B, &gl::SamplerState::swizzleBlue);
SyncSamplerStateSwizzle(mFunctions, applyTextureFunc, LUMAWorkaround, samplerState, mAppliedSamplerState, mTextureType, GL_TEXTURE_SWIZZLE_A, &gl::SamplerState::swizzleAlpha);
// clang-format on
} }
GLuint TextureGL::getTextureID() const GLuint TextureGL::getTextureID() const
......
...@@ -19,16 +19,6 @@ class FunctionsGL; ...@@ -19,16 +19,6 @@ class FunctionsGL;
class StateManagerGL; class StateManagerGL;
struct WorkaroundsGL; struct WorkaroundsGL;
struct LUMAWorkaround
{
bool enabled;
GLenum sourceFormat;
GLenum workaroundFormat;
LUMAWorkaround();
LUMAWorkaround(bool enabled, GLenum sourceFormat, GLenum workaroundFormat);
};
class TextureGL : public TextureImpl class TextureGL : public TextureImpl
{ {
public: public:
...@@ -80,8 +70,6 @@ class TextureGL : public TextureImpl ...@@ -80,8 +70,6 @@ class TextureGL : public TextureImpl
const WorkaroundsGL &mWorkarounds; const WorkaroundsGL &mWorkarounds;
StateManagerGL *mStateManager; StateManagerGL *mStateManager;
std::vector<LUMAWorkaround> mLUMAWorkaroundLevels;
mutable gl::SamplerState mAppliedSamplerState; mutable gl::SamplerState mAppliedSamplerState;
GLuint mTextureID; GLuint mTextureID;
}; };
......
...@@ -316,21 +316,6 @@ static GLenum GetNativeInternalFormat(const FunctionsGL *functions, ...@@ -316,21 +316,6 @@ static GLenum GetNativeInternalFormat(const FunctionsGL *functions,
// Update the internal format to GL_RGBA. // Update the internal format to GL_RGBA.
result = GL_RGBA8; result = GL_RGBA8;
} }
if ((functions->profile & GL_CONTEXT_CORE_PROFILE_BIT) != 0)
{
// Work around deprecated luminance alpha formats in the OpenGL core profile by backing
// them with R or RG textures.
if (formatInfo.format == GL_LUMINANCE || formatInfo.format == GL_ALPHA)
{
result = gl::GetSizedInternalFormat(GL_RED, formatInfo.type);
}
if (formatInfo.format == GL_LUMINANCE_ALPHA)
{
result = gl::GetSizedInternalFormat(GL_RG, formatInfo.type);
}
}
} }
else if (functions->isAtLeastGLES(gl::Version(3, 0))) else if (functions->isAtLeastGLES(gl::Version(3, 0)))
{ {
...@@ -359,21 +344,6 @@ static GLenum GetNativeFormat(const FunctionsGL *functions, ...@@ -359,21 +344,6 @@ static GLenum GetNativeFormat(const FunctionsGL *functions,
{ {
result = GL_RGBA; result = GL_RGBA;
} }
if ((functions->profile & GL_CONTEXT_CORE_PROFILE_BIT) != 0)
{
// Work around deprecated luminance alpha formats in the OpenGL core profile by backing
// them with R or RG textures.
if (format == GL_LUMINANCE || format == GL_ALPHA)
{
result = GL_RED;
}
if (format == GL_LUMINANCE_ALPHA)
{
result = GL_RG;
}
}
} }
return result; return result;
......
...@@ -108,7 +108,8 @@ class SwizzleTest : public ANGLETest ...@@ -108,7 +108,8 @@ class SwizzleTest : public ANGLETest
{ {
glGenTextures(1, &mTexture); glGenTextures(1, &mTexture);
glBindTexture(GL_TEXTURE_2D, mTexture); glBindTexture(GL_TEXTURE_2D, mTexture);
glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, 1, 1, 0, dataFormat, dataType, data); glTexStorage2D(GL_TEXTURE_2D, 1, internalFormat, 1, 1);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1, 1, dataFormat, dataType, data);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
...@@ -267,48 +268,6 @@ TEST_P(SwizzleTest, D24_2D) ...@@ -267,48 +268,6 @@ TEST_P(SwizzleTest, D24_2D)
runTest2D(); runTest2D();
} }
TEST_P(SwizzleTest, L8_2D)
{
GLubyte data[] = { 0x77 };
init2DTexture(GL_LUMINANCE, GL_LUMINANCE, GL_UNSIGNED_BYTE, data);
runTest2D();
}
TEST_P(SwizzleTest, A8_2D)
{
GLubyte data[] = { 0x55 };
init2DTexture(GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, data);
runTest2D();
}
TEST_P(SwizzleTest, LA8_2D)
{
GLubyte data[] = { 0x77, 0x66 };
init2DTexture(GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, data);
runTest2D();
}
TEST_P(SwizzleTest, L32F_2D)
{
GLfloat data[] = { 0.7f };
init2DTexture(GL_LUMINANCE, GL_LUMINANCE, GL_FLOAT, data);
runTest2D();
}
TEST_P(SwizzleTest, A32F_2D)
{
GLfloat data[] = { 0.4f, };
init2DTexture(GL_ALPHA, GL_ALPHA, GL_FLOAT, data);
runTest2D();
}
TEST_P(SwizzleTest, LA32F_2D)
{
GLfloat data[] = { 0.5f, 0.6f, };
init2DTexture(GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, GL_FLOAT, data);
runTest2D();
}
#include "media/pixel.inl" #include "media/pixel.inl"
TEST_P(SwizzleTest, CompressedDXT_2D) TEST_P(SwizzleTest, CompressedDXT_2D)
......
...@@ -105,6 +105,14 @@ class UnpackAlignmentTest : public ANGLETest ...@@ -105,6 +105,14 @@ class UnpackAlignmentTest : public ANGLETest
void testAlignment(int alignment, unsigned int offset, GLenum format, GLenum type) void testAlignment(int alignment, unsigned int offset, GLenum format, GLenum type)
{ {
// TODO(geofflang): Support LUMA formats in the core profile.
if (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE &&
(format == GL_LUMINANCE_ALPHA || format == GL_LUMINANCE || format == GL_ALPHA))
{
std::cout << "Test skipped on OpenGL with LUMA formats." << std::endl;
return;
}
static const unsigned int width = 7; static const unsigned int width = 7;
static const unsigned int height = 2; static const unsigned int height = 2;
......
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