Commit abef6807 by Jamie Madill

Remove an unnecessary and non-compliant format check from the SubImage family of calls.

We were overly restricting the user's input data for SubImage calls. TRAC #23834 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods
parent 978911ca
...@@ -271,6 +271,8 @@ GLenum Texture::getUsage() const ...@@ -271,6 +271,8 @@ GLenum Texture::getUsage() const
void Texture::setImage(GLint unpackAlignment, GLenum type, const void *pixels, rx::Image *image) void Texture::setImage(GLint unpackAlignment, GLenum type, const void *pixels, rx::Image *image)
{ {
// We no longer need the "GLenum format" parameter to TexImage to determine what data format "pixels" contains.
// From our image internal format we know how many channels to expect, and "type" gives the format of pixel's components.
if (pixels != NULL) if (pixels != NULL)
{ {
image->loadData(0, 0, 0, image->getWidth(), image->getHeight(), image->getDepth(), unpackAlignment, type, pixels); image->loadData(0, 0, 0, image->getWidth(), image->getHeight(), image->getDepth(), unpackAlignment, type, pixels);
......
...@@ -246,15 +246,6 @@ bool ValidateES3TexImageParameters(gl::Context *context, GLenum target, GLint le ...@@ -246,15 +246,6 @@ bool ValidateES3TexImageParameters(gl::Context *context, GLenum target, GLint le
return gl::error(GL_INVALID_OPERATION, false); return gl::error(GL_INVALID_OPERATION, false);
} }
if (format != GL_NONE)
{
GLenum internalformat = gl::GetSizedInternalFormat(format, type, context->getClientVersion());
if (internalformat != textureInternalFormat)
{
return gl::error(GL_INVALID_OPERATION, false);
}
}
if (isCompressed) if (isCompressed)
{ {
if ((width % 4 != 0 && width != textureLevelWidth) || if ((width % 4 != 0 && width != textureLevelWidth) ||
......
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