diff options
author | marha <marha@users.sourceforge.net> | 2011-02-10 07:28:40 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-02-10 07:28:40 +0000 |
commit | 2eccc8cdcbff8a71ee25bac7cd71ef4f40564285 (patch) | |
tree | 58fd671ace1ab27a8e71de1b66c2f4da3c2222c0 /mesalib/src/mesa/state_tracker/st_atom_framebuffer.c | |
parent | 744bc6a5e71f207a33b0826598c1f93302f7fe01 (diff) | |
parent | 183968dd18dc91f73325980bd511ed6bdb38b432 (diff) | |
download | vcxsrv-2eccc8cdcbff8a71ee25bac7cd71ef4f40564285.tar.gz vcxsrv-2eccc8cdcbff8a71ee25bac7cd71ef4f40564285.tar.bz2 vcxsrv-2eccc8cdcbff8a71ee25bac7cd71ef4f40564285.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_framebuffer.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_framebuffer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_framebuffer.c b/mesalib/src/mesa/state_tracker/st_atom_framebuffer.c index 3ba690200..678a270c7 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/mesalib/src/mesa/state_tracker/st_atom_framebuffer.c @@ -39,7 +39,7 @@ #include "cso_cache/cso_context.h"
#include "util/u_math.h"
#include "util/u_inlines.h"
-
+#include "util/u_format.h"
/**
@@ -55,8 +55,10 @@ update_renderbuffer_surface(struct st_context *st, struct pipe_resource *resource = strb->rtt->pt;
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);
if (!strb->surface ||
+ strb->surface->format != format ||
strb->surface->texture != resource ||
strb->surface->width != rtt_width ||
strb->surface->height != rtt_height) {
@@ -67,7 +69,7 @@ update_renderbuffer_surface(struct st_context *st, u_minify(resource->height0, level) == rtt_height) {
struct pipe_surface surf_tmpl;
memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- surf_tmpl.format = resource->format;
+ surf_tmpl.format = format;
surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = level;
surf_tmpl.u.tex.first_layer = strb->rtt_face + strb->rtt_slice;
|