diff options
author | Christoph Bumiller <[email protected]> | 2012-07-31 15:56:09 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2012-08-01 15:39:46 +0200 |
commit | 6286d9810b7ebae588060370cd7a63c327478a2f (patch) | |
tree | 615439a67beb92f629bfeffe27217257a94679c1 /src/gallium/drivers/r300/r300_render.c | |
parent | be2dcc5e9f61d380aec93eeb01227cbb6b5037c1 (diff) |
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).
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_render.c | 7 |
1 files changed, 6 insertions, 1 deletions
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) |