Commit 784a8fd5 by Geoff Lang

Defer early-exit due to zero-sized copies until after all other validation for CopyTex*Image.

TRAC #20925 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods
parent 1beb1db8
...@@ -487,11 +487,6 @@ bool ValidateES2CopyTexImageParameters(gl::Context* context, GLenum target, GLin ...@@ -487,11 +487,6 @@ bool ValidateES2CopyTexImageParameters(gl::Context* context, GLenum target, GLin
return gl::error(GL_INVALID_VALUE, false); return gl::error(GL_INVALID_VALUE, false);
} }
if (width == 0 || height == 0)
{
return false;
}
// Verify zero border // Verify zero border
if (border != 0) if (border != 0)
{ {
...@@ -720,7 +715,8 @@ bool ValidateES2CopyTexImageParameters(gl::Context* context, GLenum target, GLin ...@@ -720,7 +715,8 @@ bool ValidateES2CopyTexImageParameters(gl::Context* context, GLenum target, GLin
} }
} }
return true; // If width or height is zero, it is a no-op. Return false without setting an error.
return (width > 0 && height > 0);
} }
bool ValidateES2TexStorageParameters(gl::Context *context, GLenum target, GLsizei levels, GLenum internalformat, bool ValidateES2TexStorageParameters(gl::Context *context, GLenum target, GLsizei levels, GLenum internalformat,
......
...@@ -337,11 +337,6 @@ bool ValidateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin ...@@ -337,11 +337,6 @@ bool ValidateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
return gl::error(GL_INVALID_VALUE, false); return gl::error(GL_INVALID_VALUE, false);
} }
if (width == 0 || height == 0)
{
return false;
}
if (border != 0) if (border != 0)
{ {
return gl::error(GL_INVALID_VALUE, false); return gl::error(GL_INVALID_VALUE, false);
...@@ -488,7 +483,8 @@ bool ValidateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin ...@@ -488,7 +483,8 @@ bool ValidateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
} }
} }
return true; // If width or height is zero, it is a no-op. Return false without setting an error.
return (width > 0 && height > 0);
} }
bool ValidateES3TexStorageParameters(gl::Context *context, GLenum target, GLsizei levels, GLenum internalformat, bool ValidateES3TexStorageParameters(gl::Context *context, GLenum target, GLsizei levels, GLenum internalformat,
......
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