Commit 054369e3 by Jamie Madill

Allow the special format BGR5_A1 in CopyTexImage.

We use this format as a backbuffer texture for the EGL surface in some configs. Thus, the app needs to be able to use it, since they don't know when they are secretly using BGRA instead of RGBA, similar to our existing logic which allows BGRA in CopyTexImage. BUG=angle:811 Change-Id: I3748d38b3b085aa4ccaae67ce88711b13eb2c98e Reviewed-on: https://chromium-review.googlesource.com/239192Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent f4134d20
......@@ -611,7 +611,8 @@ bool ValidateES2CopyTexImageParameters(Context* context, GLenum target, GLint le
colorbufferFormat != GL_RGBA4 &&
colorbufferFormat != GL_RGB5_A1 &&
colorbufferFormat != GL_BGRA8_EXT &&
colorbufferFormat != GL_RGBA8_OES)
colorbufferFormat != GL_RGBA8_OES &&
colorbufferFormat != GL_BGR5_A1_ANGLEX)
{
context->recordError(Error(GL_INVALID_OPERATION));
return false;
......@@ -625,7 +626,8 @@ bool ValidateES2CopyTexImageParameters(Context* context, GLenum target, GLint le
colorbufferFormat != GL_RGBA4 &&
colorbufferFormat != GL_RGB5_A1 &&
colorbufferFormat != GL_BGRA8_EXT &&
colorbufferFormat != GL_RGBA8_OES)
colorbufferFormat != GL_RGBA8_OES &&
colorbufferFormat != GL_BGR5_A1_ANGLEX)
{
context->recordError(Error(GL_INVALID_OPERATION));
return false;
......@@ -639,7 +641,8 @@ bool ValidateES2CopyTexImageParameters(Context* context, GLenum target, GLint le
colorbufferFormat != GL_RGBA4 &&
colorbufferFormat != GL_RGB5_A1 &&
colorbufferFormat != GL_BGRA8_EXT &&
colorbufferFormat != GL_RGBA8_OES)
colorbufferFormat != GL_RGBA8_OES &&
colorbufferFormat != GL_BGR5_A1_ANGLEX)
{
context->recordError(Error(GL_INVALID_OPERATION));
return false;
......@@ -652,7 +655,8 @@ bool ValidateES2CopyTexImageParameters(Context* context, GLenum target, GLint le
colorbufferFormat != GL_RGBA4 &&
colorbufferFormat != GL_RGB5_A1 &&
colorbufferFormat != GL_BGRA8_EXT &&
colorbufferFormat != GL_RGBA8_OES)
colorbufferFormat != GL_RGBA8_OES &&
colorbufferFormat != GL_BGR5_A1_ANGLEX)
{
context->recordError(Error(GL_INVALID_OPERATION));
return false;
......@@ -664,7 +668,8 @@ bool ValidateES2CopyTexImageParameters(Context* context, GLenum target, GLint le
colorbufferFormat != GL_RGBA4 &&
colorbufferFormat != GL_RGB5_A1 &&
colorbufferFormat != GL_BGRA8_EXT &&
colorbufferFormat != GL_RGBA8_OES)
colorbufferFormat != GL_RGBA8_OES &&
colorbufferFormat != GL_BGR5_A1_ANGLEX)
{
context->recordError(Error(GL_INVALID_OPERATION));
return false;
......@@ -675,7 +680,8 @@ bool ValidateES2CopyTexImageParameters(Context* context, GLenum target, GLint le
if (colorbufferFormat != GL_RGBA4 &&
colorbufferFormat != GL_RGB5_A1 &&
colorbufferFormat != GL_BGRA8_EXT &&
colorbufferFormat != GL_RGBA8_OES)
colorbufferFormat != GL_RGBA8_OES &&
colorbufferFormat != GL_BGR5_A1_ANGLEX)
{
context->recordError(Error(GL_INVALID_OPERATION));
return false;
......
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