diff options
author | Dave Airlie <[email protected]> | 2011-02-06 19:01:58 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-02-10 10:14:27 +1000 |
commit | 21b0996dfcbe62c55dd31cc316cd47f2b8531d2e (patch) | |
tree | 9cb804ac4f5dfed19ff947dfaf89a94b162b3968 /src/mesa/state_tracker/st_cb_fbo.c | |
parent | 3b8bb7b449dae6c16df0fa45e6567ec3d6b05dcc (diff) |
mesa/st: enable GL_EXT_framebuffer_sRGB
If the formats don't match we need to update the surface with the new
format.
if we can render to SRGB formats, enable the extension
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_fbo.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 52464707eae..398e32a3459 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -390,7 +390,7 @@ st_render_texture(struct gl_context *ctx, /* new surface for rendering into the texture */ memset(&surf_tmpl, 0, sizeof(surf_tmpl)); - surf_tmpl.format = util_format_linear(strb->texture->format); + surf_tmpl.format = ctx->Color.sRGBEnabled ? strb->texture->format : util_format_linear(strb->texture->format); surf_tmpl.usage = PIPE_BIND_RENDER_TARGET; surf_tmpl.u.tex.level = strb->rtt_level; surf_tmpl.u.tex.first_layer = strb->rtt_face + strb->rtt_slice; |