diff options
author | Dave Airlie <airlied@gmail.com> | 2011-01-28 14:16:00 +1000 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2011-02-05 17:06:30 +1000 |
commit | 88ffa9ce5b8e5fe2b93238f8b9a7a888be28324e (patch) | |
tree | f59e467d5cc03f938f9c4326c72029b9ef08dbc9 /src/mesa/drivers/dri/i965 | |
parent | 5c3f1cdbbeb4d787bad7729ccd3f10aa78d113ac (diff) |
mesa/965: add support for GL_EXT_framebuffer_sRGB (v2)
This adds i965 support for GL_EXT_framebuffer_sRGB, it introduces a new
constant to say that the driver can support sRGB enabled FBOs since enabling
the extension doesn't mean the driver can actually support sRGB.
Also adds the suggested state flush in the core code suggested by Brian.
fix the ARB_fbo color encoding.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index a372554555..c931df3c60 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -446,7 +446,10 @@ brw_update_renderbuffer_surface(struct brw_context *brw, case MESA_FORMAT_SARGB8: /* without GL_EXT_framebuffer_sRGB we shouldn't bind sRGB surfaces to the blend/update as sRGB */ - surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; + if (ctx->Color.sRGBEnabled) + surf.ss0.surface_format = brw_format_for_mesa_format[irb->Base.Format]; + else + surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; break; default: surf.ss0.surface_format = brw_format_for_mesa_format[irb->Base.Format]; |