mesa: check for MESA_FORMAT_RGB9_E5_FLOAT in _mesa_is_format_signed()
authorBrian Paul <brianp@vmware.com>
Tue, 7 Jan 2014 16:05:03 +0000 (09:05 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 9 Jan 2014 18:35:50 +0000 (11:35 -0700)
This packed floating point format only stores positive values.

Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=73096
Cc: 10.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/mesa/main/formats.c

index eb2a07ea5f6c88b4f8ddfa5f358c17b3e88ac2bf..7e0ec23198c6403584ea3f63cc02e1dc31baa3b9 100644 (file)
@@ -1972,8 +1972,9 @@ _mesa_is_format_unsigned(gl_format format)
 GLboolean
 _mesa_is_format_signed(gl_format format)
 {
-   if (format == MESA_FORMAT_R11_G11_B10_FLOAT) {
-      /* this packed float format only stores unsigned values */
+   if (format == MESA_FORMAT_R11_G11_B10_FLOAT || 
+       format == MESA_FORMAT_RGB9_E5_FLOAT) {
+      /* these packed float formats only store unsigned values */
       return GL_FALSE;
    }
    else {