From c11ad489e7432f3ed2fcaf5b15b8fe3538ae6d30 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Fri, 1 May 2009 05:54:53 -0700 Subject: r300-gallium, radeon-winsys: Space accounting. It is no longer optional in current libdrm, so it was time to actually start counting our BOs. --- src/gallium/drivers/r300/r300_surface.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gallium/drivers/r300/r300_surface.c') diff --git a/src/gallium/drivers/r300/r300_surface.c b/src/gallium/drivers/r300/r300_surface.c index 79bed03..4dd5b8a 100644 --- a/src/gallium/drivers/r300/r300_surface.c +++ b/src/gallium/drivers/r300/r300_surface.c @@ -34,6 +34,13 @@ static void r300_surface_setup(struct pipe_context* pipe, unsigned pixpitch = tex->stride / tex->tex.block.size; CS_LOCALS(r300); + /* Make sure our target BO is okay. */ + r300->winsys->add_buffer(r300->winsys, tex->buffer, + 0, RADEON_GEM_DOMAIN_VRAM); + if (r300->winsys->validate(r300->winsys)) { + r300->context.flush(&r300->context, 0, NULL); + } + r300_emit_blend_state(r300, &blend_clear_state); r300_emit_blend_color_state(r300, &blend_color_clear_state); r300_emit_dsa_state(r300, &dsa_clear_state); -- cgit v1.1