Commit 0ccd5aee by tmartino Committed by Jamie Madill

Correcting INVALID_OPERATION to INVALID_ENUM

Should return INVALID_ENUM when uncompressed texture passed to compressed image constructor. BUG=angleproject:1168 Change-Id: If30f0407e7455d6e19432831883d33a1e8bfec9a Reviewed-on: https://chromium-review.googlesource.com/303750Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent ee0d4c52
......@@ -124,23 +124,10 @@ bool ValidateES2TexImageParameters(Context *context, GLenum target, GLint level,
return false;
}
GLenum actualInternalFormat = isSubImage ? texture->getInternalFormat(target, level) : internalformat;
const InternalFormat &actualFormatInfo = GetInternalFormatInfo(actualInternalFormat);
if (isCompressed != actualFormatInfo.compressed)
{
context->recordError(Error(GL_INVALID_OPERATION));
return false;
}
if (isCompressed)
{
if (!ValidCompressedImageSize(context, actualInternalFormat, width, height))
{
context->recordError(Error(GL_INVALID_OPERATION));
return false;
}
GLenum actualInternalFormat =
isSubImage ? texture->getInternalFormat(target, level) : internalformat;
switch (actualInternalFormat)
{
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
......@@ -166,7 +153,13 @@ bool ValidateES2TexImageParameters(Context *context, GLenum target, GLint level,
}
break;
default:
context->recordError(Error(GL_INVALID_ENUM));
context->recordError(Error(
GL_INVALID_ENUM, "internalformat is not a supported compressed internal format"));
return false;
}
if (!ValidCompressedImageSize(context, actualInternalFormat, width, height))
{
context->recordError(Error(GL_INVALID_OPERATION));
return false;
}
}
......
......@@ -267,8 +267,6 @@
1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.depth_component_unsigned_short = FAIL
1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.depth_component_unsigned_int = FAIL
1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.srgb8 = FAIL
1029 WIN LINUX MAC : dEQP-GLES2.functional.negative_api.texture.compressedteximage_2d_invalid_format_tex2d = FAIL
1029 WIN LINUX MAC : dEQP-GLES2.functional.negative_api.texture.compressedteximage_2d_invalid_format_cube = FAIL
1128 WIN LINUX MAC : dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_invalid_size = FAIL
1029 WIN LINUX MAC : dEQP-GLES2.functional.negative_api.texture.teximage2d_invalid_format = FAIL
1029 WIN LINUX MAC : dEQP-GLES2.functional.negative_api.texture.teximage2d_invalid_internalformat = FAIL
......
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