gallium: fix st_choose_format(internalFormat=GL_RGBA16)
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 4 Jul 2008 16:35:32 +0000 (10:35 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 4 Jul 2008 16:35:32 +0000 (10:35 -0600)
Need to check if we're choosing a surface or texture format.

src/mesa/state_tracker/st_format.c

index 03ec558a3677200af39911295f70383bf823e3cf..50a06868dfca32582d3c8bdcfc0c47ddff6d3967 100644 (file)
@@ -362,7 +362,10 @@ st_choose_format(struct pipe_context *pipe, GLint internalFormat,
    case GL_RGBA12:
       return default_rgba_format( screen, surfType );
    case GL_RGBA16:
-      return default_deep_rgba_format( screen, surfType );
+      if (surfType == PIPE_SURFACE)
+         return default_deep_rgba_format( screen, surfType );
+      else
+         return default_rgba_format( screen, surfType );
 
    case GL_RGBA4:
    case GL_RGBA2: