diff options
author | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2012-07-20 20:57:45 +0200 |
---|---|---|
committer | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2012-07-28 13:14:30 +0200 |
commit | 51e41a0d894109249448ecc6a6bfc09e095acada (patch) | |
tree | 96c598487d47d7ca4501731698d48fca3beffa34 /src/mesa | |
parent | acd66ec03346d37c593b5ba13e4c94ae11eef50d (diff) |
st/mesa: call update_renderbuffer_surface for sRGB renderbuffers, too
sRGBEnabled should affect both textures and renderbuffers, so we need
to check/update the pipe_surface format for both.
Fixes, for instance, rendering appearing too bright in wine applications
using sRGB multisample renderbuffers.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_atom_framebuffer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c index 6f94a47c6b5..a10dbfbd0ec 100644 --- a/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/src/mesa/state_tracker/st_atom_framebuffer.c @@ -53,7 +53,7 @@ update_renderbuffer_surface(struct st_context *st, struct st_renderbuffer *strb) { struct pipe_context *pipe = st->pipe; - struct pipe_resource *resource = strb->rtt->pt; + struct pipe_resource *resource = strb->rtt ? strb->rtt->pt : strb->texture; int rtt_width = strb->Base.Width; int rtt_height = strb->Base.Height; enum pipe_format format = st->ctx->Color.sRGBEnabled ? resource->format : util_format_linear(resource->format); @@ -121,7 +121,8 @@ update_framebuffer_state( struct st_context *st ) if (strb) { /*printf("--------- framebuffer surface rtt %p\n", strb->rtt);*/ - if (strb->rtt) { + if (strb->rtt || + (strb->texture && util_format_is_srgb(strb->texture->format))) { /* rendering to a GL texture, may have to update surface */ update_renderbuffer_surface(st, strb); } |