aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/readpix.c
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2018-05-24 14:05:27 +0300
committerTapani Pälli <[email protected]>2018-08-13 12:03:17 +0300
commit0d356cf4781bece0dc9a7b84b4b38c45cb2e4eaa (patch)
treec103b29818cc5247bc735e285c32591586e0be7c /src/mesa/main/readpix.c
parentde57926dc909b3fb180ff06a6c5235309fdbf4df (diff)
mesa: enable EXT_render_snorm extension
Patch sets additional formats renderable and enables the extension when OpenGL ES 3.1 is supported. v2: instead of dummy_true, have a separate toggle for extension (Eric Anholt) v3: add missing checks, simplify some existing checks and fix glCopyTexImage2D check (Nanley Chery) add SHORT and BYTE support in read_pixels_es3_error_check Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src/mesa/main/readpix.c')
-rw-r--r--src/mesa/main/readpix.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index e8c28d86162..2cbb578a37f 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -939,6 +939,25 @@ read_pixels_es3_error_check(struct gl_context *ctx, GLenum format, GLenum type,
return GL_NO_ERROR;
}
}
+ if (type == GL_SHORT) {
+ switch (internalFormat) {
+ case GL_R16_SNORM:
+ case GL_RG16_SNORM:
+ case GL_RGBA16_SNORM:
+ if (_mesa_has_EXT_texture_norm16(ctx) &&
+ _mesa_has_EXT_render_snorm(ctx))
+ return GL_NO_ERROR;
+ }
+ }
+ if (type == GL_BYTE) {
+ switch (internalFormat) {
+ case GL_R8_SNORM:
+ case GL_RG8_SNORM:
+ case GL_RGBA8_SNORM:
+ if (_mesa_has_EXT_render_snorm(ctx))
+ return GL_NO_ERROR;
+ }
+ }
break;
case GL_BGRA:
/* GL_EXT_read_format_bgra */