diff options
author | Juan A. Suarez Romero <[email protected]> | 2017-11-15 16:49:21 +0000 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2017-11-21 13:05:42 +0100 |
commit | ce221cbbcf25238771b9a59e06ce4995e08c091e (patch) | |
tree | 0ad4ba643414de1787101cb49497c685a701e6c1 /src | |
parent | 6236ffeb837a6eb3d1a13b3df21c9b749ebb4812 (diff) |
mesa/teximage: add TEXTURE_CUBE_MAP_ARRAY target for CompressedTexImage3D
From section 8.7, page 179 of OpenGL ES 3.2 spec:
An INVALID_OPERATION error is generated by CompressedTexImage3D
if internalformat is one of the the formats in table 8.17 and target
is not TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY or TEXTURE_3D.
An INVALID_OPERATION error is generated by CompressedTexImage3D if
internalformat is TEXTURE_CUBE_MAP_ARRAY and the “Cube Map Array”
column of table 8.17 is not checked, or if internalformat is
TEXTURE_3D and the “3D Tex.” column of table 8.17 is not checked.
So far it was only considering TEXTURE_2D_ARRAY as valid target. But as
"Cube Map Array" column is checked for all the cases, in practice we can
consider also TEXTURE_CUBE_MAP_ARRAY.
This fixes KHR-GLES32.core.texture_cube_map_array.etc2_texture
Reviewed-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/teximage.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 4ec6148bf42..3f3fcf6f84b 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1412,8 +1412,26 @@ _mesa_target_can_be_compressed(const struct gl_context *ctx, GLenum target, * * This should also be applicable for glTexStorage3D(). Other available * targets for these functions are: TEXTURE_3D and TEXTURE_CUBE_MAP_ARRAY. + * + * Section 8.7, page 179 of OpenGL ES 3.2 adds: + * + * An INVALID_OPERATION error is generated by CompressedTexImage3D + * if internalformat is one of the the formats in table 8.17 and target is + * not TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY or TEXTURE_3D. + * + * An INVALID_OPERATION error is generated by CompressedTexImage3D + * if internalformat is TEXTURE_CUBE_MAP_ARRAY and the “Cube Map + * Array” column of table 8.17 is not checked, or if internalformat + * is TEXTURE_- 3D and the “3D Tex.” column of table 8.17 is not + * checked. + * + * The instances of <internalformat> above should say <target>. + * + * Such table 8.17 has checked "Cube Map Array" column for all the + * cases. So in practice, TEXTURE_CUBE_MAP_ARRAY is now valid for OpenGL ES 3.2 */ - if (layout == MESA_FORMAT_LAYOUT_ETC2 && _mesa_is_gles3(ctx)) + if (layout == MESA_FORMAT_LAYOUT_ETC2 && _mesa_is_gles3(ctx) && + !_mesa_is_gles32(ctx)) return write_error(error, GL_INVALID_OPERATION); target_can_be_compresed = _mesa_has_texture_cube_map_array(ctx); break; |