From 6286d9810b7ebae588060370cd7a63c327478a2f Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Tue, 31 Jul 2012 15:56:09 +0200 Subject: Revert "gallium: specify resource_resolve destination via a pipe_surface" This reverts commit 5d5af7d359e0060fa00b90a8f04900b96f9058b0. It turns out the issue this was supposed to fix merely counter-acted a bug in the hardware driver that I wasn't aware of. The resource_resolve is not supposed to do sRGB conversion, period. (This would violate the requirement that source and destination must be of the same format). --- src/gallium/drivers/r300/r300_render.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/r300/r300_render.c') diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 74e137d0220..ceda1269707 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -1272,7 +1272,11 @@ 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. */ - dstsurf = info->dst.surface; + 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); DBG(r300, DBG_DRAW, "r300: Resolving resource...\n"); @@ -1298,6 +1302,7 @@ 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) -- cgit v1.2.3