Try PIPE_FORMAT_R5G6B5_UNORM for GL_RGB5 request.
authorBrian <brian.paul@tungstengraphics.com>
Wed, 12 Dec 2007 19:58:59 +0000 (12:58 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 12 Dec 2007 19:58:59 +0000 (12:58 -0700)
src/mesa/state_tracker/st_format.c

index 98cc2084f05450e51b535806d7470e17c67ba04d..287a0054b92142ee3bf8ee1ca4ccde31d747c814 100644 (file)
@@ -413,6 +413,8 @@ st_choose_pipe_format(struct pipe_context *pipe, GLint internalFormat,
    case GL_R3_G3_B2:
       if (pipe->is_format_supported( pipe, PIPE_FORMAT_A1R5G5B5_UNORM, surfType ))
          return PIPE_FORMAT_A1R5G5B5_UNORM;
+      if (pipe->is_format_supported( pipe, PIPE_FORMAT_R5G6B5_UNORM, surfType ))
+         return PIPE_FORMAT_R5G6B5_UNORM;
       return default_rgba_format( pipe, surfType );
 
    case GL_ALPHA: