summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_render.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-07-25 13:47:58 +0200
committerChristoph Bumiller <[email protected]>2012-07-28 14:58:18 +0200
commit5d5af7d359e0060fa00b90a8f04900b96f9058b0 (patch)
treea104989f811f7c0b7712fb6f7e73025bbf31ce0b /src/gallium/drivers/r300/r300_render.c
parent51e41a0d894109249448ecc6a6bfc09e095acada (diff)
gallium: specify resource_resolve destination via a pipe_surface
The format member of pipe_surface may differ from that of the pipe_resource, which is used to communicate, for instance, whether sRGB encode should be enabled in the resolve operation or not. Fixes resolve to sRGB surfaces in mesa/st when GL_FRAMEBUFFER_SRGB is disabled. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r--src/gallium/drivers/r300/r300_render.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index ceda1269707..74e137d0220 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -1272,11 +1272,7 @@ static void r300_resource_resolve(struct pipe_context *pipe,
srcsurf = pipe->create_surface(pipe, info->src.res, &surf_tmpl);
/* XXX Offset both surfaces by x0,y1. */
- surf_tmpl.format = info->dst.res->format;
- surf_tmpl.u.tex.level = info->dst.level;
- surf_tmpl.u.tex.first_layer =
- surf_tmpl.u.tex.last_layer = info->dst.layer;
- dstsurf = pipe->create_surface(pipe, info->dst.res, &surf_tmpl);
+ dstsurf = info->dst.surface;
DBG(r300, DBG_DRAW, "r300: Resolving resource...\n");
@@ -1302,7 +1298,6 @@ static void r300_resource_resolve(struct pipe_context *pipe,
r300_mark_atom_dirty(r300, &r300->aa_state);
pipe_surface_reference(&srcsurf, NULL);
- pipe_surface_reference(&dstsurf, NULL);
}
void r300_init_render_functions(struct r300_context *r300)