Move glTexSubImage early out check after more of the error checks are done.

Trac #20875 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1106 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 0c854684
...@@ -5623,11 +5623,6 @@ void __stdcall glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint ...@@ -5623,11 +5623,6 @@ void __stdcall glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint
return error(GL_INVALID_ENUM); return error(GL_INVALID_ENUM);
} }
if (width == 0 || height == 0 || pixels == NULL)
{
return;
}
gl::Context *context = gl::getNonLostContext(); gl::Context *context = gl::getNonLostContext();
if (context) if (context)
...@@ -5665,6 +5660,11 @@ void __stdcall glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint ...@@ -5665,6 +5660,11 @@ void __stdcall glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint
return error(GL_INVALID_OPERATION); return error(GL_INVALID_OPERATION);
} }
if (width == 0 || height == 0 || pixels == NULL)
{
return;
}
if (target == GL_TEXTURE_2D) if (target == GL_TEXTURE_2D)
{ {
gl::Texture2D *texture = context->getTexture2D(); gl::Texture2D *texture = context->getTexture2D();
......
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