st/mesa: use PIPE_BIND_DISPLAY_TARGET when checking for sRGB capability
authorBrian Paul <brianp@vmware.com>
Mon, 27 Oct 2014 21:03:05 +0000 (15:03 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 29 Oct 2014 00:07:54 +0000 (18:07 -0600)
When we're checking if the framebuffer is sRGB capable, call
is_format_supported() with the PIPE_BIND_DISPLAY_TARGET flag.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/mesa/state_tracker/st_manager.c

index df6de737fb6e0e98ad82ae9d5e4fd7eb3b469c17..606d67891c1e2e6df0254051092132896ca97d56 100644 (file)
@@ -452,7 +452,8 @@ st_framebuffer_create(struct st_context *st,
           st_pipe_format_to_mesa_format(srgb_format) != MESA_FORMAT_NONE &&
           screen->is_format_supported(screen, srgb_format,
                                       PIPE_TEXTURE_2D, stfbi->visual->samples,
-                                      PIPE_BIND_RENDER_TARGET))
+                                      (PIPE_BIND_DISPLAY_TARGET |
+                                       PIPE_BIND_RENDER_TARGET)))
          mode.sRGBCapable = GL_TRUE;
    }