gallium: fix the texture case in default_deep_rgba_format()
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 7 Apr 2008 21:53:49 +0000 (15:53 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 7 Apr 2008 21:53:49 +0000 (15:53 -0600)
Fixes glean pixelFormat test

src/mesa/state_tracker/st_format.c

index 20defd5e164501aedd281e24395e854b98c3a1c0..cd41dc4684dc6623d567d8b9dca875f6ba08cc6b 100644 (file)
@@ -321,7 +321,10 @@ default_deep_rgba_format(struct pipe_screen *screen, uint type)
    if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_SNORM, type)) {
       return PIPE_FORMAT_R16G16B16A16_SNORM;
    }
-   return PIPE_FORMAT_NONE;
+   if (type == PIPE_TEXTURE)
+      return default_rgba_format(screen, type);
+   else
+      return PIPE_FORMAT_NONE;
 }