summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_readpix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_readpix.c')
-rw-r--r--src/mesa/swrast/s_readpix.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index b5ab06e4ba..80f737b052 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -366,12 +366,18 @@ read_rgba_pixels( GLcontext *ctx,
case GL_UNSIGNED_INT_2_10_10_10_REV:
/* valid pixel type */
break;
+ case GL_HALF_FLOAT_ARB:
+ if (!ctx->Extensions.ARB_half_float_pixel) {
+ _mesa_error( ctx, GL_INVALID_ENUM, "glReadPixels(type)" );
+ return;
+ }
+ break;
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glReadPixels(type)" );
return;
}
- if (!_mesa_is_legal_format_and_type(format, type) ||
+ if (!_mesa_is_legal_format_and_type(ctx, format, type) ||
format == GL_INTENSITY) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(format or type)");
return;