aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2010-06-16 10:50:37 -0700
committerCorbin Simpson <[email protected]>2010-06-16 10:54:08 -0700
commit68cefb423a1bd7cb2bee6375cae8e9c46b1211c5 (patch)
tree44aa75aab933b1db9a7185d12b408b14cdb75024 /src/gallium/drivers
parente163fc0b15c80172fb2615fc04d7fc7bdc0d25c3 (diff)
r300g: Finish resolve function.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_render.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index c5a4406a921..16add416a4f 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -1024,24 +1024,32 @@ static void r300_resource_resolve(struct pipe_context* pipe,
struct pipe_subresource subsrc)
{
struct r300_context* r300 = r300_context(pipe);
- struct r300_texture* tex;
+ struct r300_texture* tex = r300_texture(dest);
+ struct pipe_surface* surf = dest->screen->get_tex_surface(dest->screen,
+ dest, subdest.face, subdest.level, 0, 0);
+ float color[] = {0, 0, 0, 0};
CS_LOCALS(r300);
+ DBG(r300, DBG_DRAW, "r300: Resolving resource...\n");
+
assert(tex && tex->buffer && "resolvebuf is marked, but NULL!");
OUT_CS_REG_SEQ(R300_RB3D_AARESOLVE_OFFSET, 1);
- OUT_CS_TEX_RELOC(tex, tex->offset, 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ OUT_CS_TEX_RELOC(tex, surf->offset, 0, tex->domain, 0);
OUT_CS_REG_SEQ(R300_RB3D_AARESOLVE_PITCH, 1);
- OUT_CS_TEX_RELOC(tex, tex->fb_state.colorpitch[tex->level],
- 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ OUT_CS_TEX_RELOC(tex, tex->fb_state.colorpitch[surf->level],
+ 0, tex->domain, 0);
OUT_CS_REG(R300_RB3D_AARESOLVE_CTL,
R300_RB3D_AARESOLVE_CTL_AARESOLVE_MODE_RESOLVE |
R300_RB3D_AARESOLVE_CTL_AARESOLVE_ALPHA_AVERAGE);
- r300->context.resource_fill_region(pipe,
- src, subsrc, 0, 0, 0, src->width0, src->height0, 0x0);
+ surf = src->screen->get_tex_surface(src->screen,
+ src, subsrc.face, subsrc.level, 0, 0);
+
+ r300->context.clear_render_target(pipe,
+ surf, color, 0, 0, src->width0, src->height0);
OUT_CS_REG(R300_RB3D_AARESOLVE_CTL, 0x0);
}