mesa: handle HALF_FLOAT like FLOAT in get_tex_rgba
authorMarek Olšák <maraeo@gmail.com>
Wed, 13 Mar 2013 15:47:21 +0000 (16:47 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sat, 23 Mar 2013 12:17:05 +0000 (13:17 +0100)
NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
src/mesa/main/texgetimage.c

index 7299a4b23e9f5b549059e9552d227bad38ec257b..74b09ef2c2d59eb472faf1ea613cc5cb1b025eda 100644 (file)
@@ -518,6 +518,7 @@ get_tex_rgba(struct gl_context *ctx, GLuint dimensions,
    if (type_needs_clamping(type)) {
       /* the returned image type can't have negative values */
       if (dataType == GL_FLOAT ||
+          dataType == GL_HALF_FLOAT ||
           dataType == GL_SIGNED_NORMALIZED ||
           format == GL_LUMINANCE ||
           format == GL_LUMINANCE_ALPHA) {