diff options
author | Anuj Phogat <anuj.phogat@gmail.com> | 2014-05-30 17:48:34 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2014-08-06 14:36:06 -0700 |
commit | 323f0246efb5b86918ea9d59da7bda0d2679928e (patch) | |
tree | c2d9bd95e17fc8e9a5d37b80a4c1ee5be5f78794 /src/mesa | |
parent | 686247ff62578004ccacfe597e8ebc8d12624678 (diff) |
mesa: Fix condition for using compressed internalformat in glCompressedTexImage3D()
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
(cherry picked from commit 3c7a0c690a1a0d72ad2b911e4a209447ce3edc1f)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/teximage.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 1d938630c4e..28e7a5813fd 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2262,7 +2262,14 @@ compressed_texture_error_check(struct gl_context *ctx, GLint dimensions, if (!_mesa_target_can_be_compressed(ctx, target, internalFormat)) { reason = "target"; - error = GL_INVALID_ENUM; + /* From section 3.8.6, page 146 of OpenGL ES 3.0 spec: + * + * "The ETC2/EAC texture compression algorithm supports only + * two-dimensional images. If internalformat is an ETC2/EAC format, + * CompressedTexImage3D will generate an INVALID_OPERATION error if + * target is not TEXTURE_2D_ARRAY." + */ + error = _mesa_is_desktop_gl(ctx) ? GL_INVALID_ENUM : GL_INVALID_OPERATION; goto error; } |