summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/copyimage.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-02-15 20:34:52 -0500
committerIlia Mirkin <[email protected]>2016-03-30 22:57:17 -0400
commitebdb5345480957c4fc3068fab17926be28d7dcd4 (patch)
tree49555054d5ca9dd5142ea98978d87a10ff6b10cf /src/mesa/main/copyimage.c
parent571f538a622d9a7050015b58b7b1ac240f289dcb (diff)
mesa: add GL_OES_copy_image support
Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main/copyimage.c')
-rw-r--r--src/mesa/main/copyimage.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/mesa/main/copyimage.c b/src/mesa/main/copyimage.c
index d571d221bce..a0f1c691220 100644
--- a/src/mesa/main/copyimage.c
+++ b/src/mesa/main/copyimage.c
@@ -25,6 +25,7 @@
* Jason Ekstrand <[email protected]>
*/
+#include "context.h"
#include "glheader.h"
#include "errors.h"
#include "enums.h"
@@ -360,8 +361,32 @@ compressed_format_compatible(const struct gl_context *ctx,
case GL_COMPRESSED_SIGNED_RED_RGTC1:
compressedClass = BLOCK_CLASS_64_BITS;
break;
+ case GL_COMPRESSED_RGBA8_ETC2_EAC:
+ case GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
+ case GL_COMPRESSED_RG11_EAC:
+ case GL_COMPRESSED_SIGNED_RG11_EAC:
+ if (_mesa_is_gles(ctx))
+ compressedClass = BLOCK_CLASS_128_BITS;
+ else
+ return false;
+ break;
+ case GL_COMPRESSED_RGB8_ETC2:
+ case GL_COMPRESSED_SRGB8_ETC2:
+ case GL_COMPRESSED_R11_EAC:
+ case GL_COMPRESSED_SIGNED_R11_EAC:
+ case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
+ case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
+ if (_mesa_is_gles(ctx))
+ compressedClass = BLOCK_CLASS_64_BITS;
+ else
+ return false;
+ break;
default:
- return false;
+ if (_mesa_is_gles(ctx) && _mesa_is_astc_format(compressedFormat))
+ compressedClass = BLOCK_CLASS_128_BITS;
+ else
+ return false;
+ break;
}
switch (otherFormat) {