[Mesa-dev] [PATCH] st/mesa: use PIPE_BIND_DISPLAY_TARGET when checking for sRGB capability

Charmaine Lee charmainel at vmware.com
Tue Oct 28 15:55:24 PDT 2014


Reviewed-by: Charmaine Lee <charmainel at vmware.com>
________________________________________
From: mesa-dev <mesa-dev-bounces at lists.freedesktop.org> on behalf of Brian Paul <brianp at vmware.com>
Sent: Monday, October 27, 2014 2:04 PM
To: mesa-dev at lists.freedesktop.org
Subject: [Mesa-dev] [PATCH] st/mesa: use PIPE_BIND_DISPLAY_TARGET when  checking for sRGB capability

When we're checking if the framebuffer is sRGB capable, call
is_format_supported() with the PIPE_BIND_DISPLAY_TARGET flag.
---
 src/mesa/state_tracker/st_manager.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index df6de73..606d678 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -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;
    }

--
1.7.10.4

_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org
https://urldefense.proofpoint.com/v1/url?u=http://lists.freedesktop.org/mailman/listinfo/mesa-dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=iVNYIcCaC9TDvyNBQU%2F5q5NVsC01tSgJb3oX27T14ck%3D%0A&m=CrIGk2ntPz44fnQBsxSY6VhHZNmuyJDOmQqvD52bwXU%3D%0A&s=731def1578a3e3879d2f8175ea73c078bd2f2208959d246d03c6a0a5da4a0653


More information about the mesa-dev mailing list