From cd59933d9f70c6acea63013f1b773b545026bf81 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Fri, 8 May 2009 16:50:42 -0700 Subject: r300-gallium, radeon: A couple cleanups. Trying to track down goddamn bugs. :C --- src/gallium/winsys/drm/radeon/core/radeon_r300.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/gallium/winsys/drm/radeon') diff --git a/src/gallium/winsys/drm/radeon/core/radeon_r300.c b/src/gallium/winsys/drm/radeon/core/radeon_r300.c index da233203d7..5dcce20cd5 100644 --- a/src/gallium/winsys/drm/radeon/core/radeon_r300.c +++ b/src/gallium/winsys/drm/radeon/core/radeon_r300.c @@ -62,6 +62,7 @@ static boolean radeon_r300_validate(struct r300_winsys* winsys) if (retval == RADEON_CS_SPACE_OP_TO_BIG) { /* We might as well HCF, since this is not going to fit in the card, * period. */ + /* XXX just drop it on the floor instead */ exit(1); } else if (retval == RADEON_CS_SPACE_FLUSH) { /* We must flush before more rendering can commence. */ @@ -128,14 +129,19 @@ static void radeon_r300_flush_cs(struct r300_winsys* winsys) { struct radeon_winsys_priv* priv = (struct radeon_winsys_priv*)winsys->radeon_winsys; - int retval = 0; + struct radeon_cs_space_check* sc = priv->sc; + int retval = 1; + /* Emit the CS. */ retval = radeon_cs_emit(priv->cs); if (retval) { debug_printf("radeon: Bad CS, dumping...\n"); radeon_cs_print(priv->cs, stderr); } radeon_cs_erase(priv->cs); + + /* Clean out BOs. */ + memset(sc, 0, sizeof(struct radeon_cs_space_check) * RADEON_MAX_BOS); } /* Helper function to do the ioctls needed for setup and init. */ -- cgit v1.2.3