From 9c3796417f2879f10b45f50827e2a977e9f96b70 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Fri, 6 Mar 2009 11:28:08 -0800 Subject: r300-gallium: GA enhancements. Basically an errata fixup register. --- src/gallium/drivers/r300/r300_state_invariant.c | 14 +++++++++++++- src/gallium/drivers/r300/r300_surface.c | 3 +-- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/r300/r300_state_invariant.c b/src/gallium/drivers/r300/r300_state_invariant.c index 7fd7aefeb72..4ead767a309 100644 --- a/src/gallium/drivers/r300/r300_state_invariant.c +++ b/src/gallium/drivers/r300/r300_state_invariant.c @@ -34,7 +34,7 @@ void r300_emit_invariant_state(struct r300_context* r300) struct r300_capabilities* caps = r300_screen(r300->context.screen)->caps; CS_LOCALS(r300); - BEGIN_CS(14); + BEGIN_CS(16); /* Amount of time to wait for vertex fetches in PVS */ OUT_CS_REG(VAP_PVS_VTX_TIMEOUT_REG, 0xffff); /* Various GB enables */ @@ -50,5 +50,17 @@ void r300_emit_invariant_state(struct r300_context* r300) OUT_CS_REG(R300_GB_SELECT, R300_GB_FOG_SELECT_1_1_W); /* AA enable */ OUT_CS_REG(R300_GB_AA_CONFIG, 0x0); + /* GA errata fixes. */ + if (caps->is_r500) { + OUT_CS_REG(R300_GA_ENHANCE, + R300_GA_ENHANCE_DEADLOCK_CNTL_PREVENT_TCL | + R300_GA_ENHANCE_FASTSYNC_CNTL_ENABLE | + R500_GA_ENHANCE_REG_READWRITE_ENABLE | + R500_GA_ENHANCE_REG_NOSTALL_ENABLE); + } else { + OUT_CS_REG(R300_GA_ENHANCE, + R300_GA_ENHANCE_DEADLOCK_CNTL_PREVENT_TCL | + R300_GA_ENHANCE_FASTSYNC_CNTL_ENABLE); + } END_CS; } diff --git a/src/gallium/drivers/r300/r300_surface.c b/src/gallium/drivers/r300/r300_surface.c index 635309ee01c..c1d324039ed 100644 --- a/src/gallium/drivers/r300/r300_surface.c +++ b/src/gallium/drivers/r300/r300_surface.c @@ -72,7 +72,7 @@ static void r300_surface_fill(struct pipe_context* pipe, r300_emit_rs_block_state(r300, &r300_rs_block_clear_state); } - BEGIN_CS(124 + (caps->has_tcl ? 2 : 0)); + BEGIN_CS(122 + (caps->has_tcl ? 2 : 0)); /* Flush PVS. */ OUT_CS_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0x0); @@ -111,7 +111,6 @@ static void r300_surface_fill(struct pipe_context* pipe, /* XXX this big chunk should be refactored into rs_state */ OUT_CS_REG(R300_GA_LINE_S0, 0x00000000); OUT_CS_REG(R300_GA_LINE_S1, 0x3F800000); - OUT_CS_REG(R300_GA_ENHANCE, 0x00000002); OUT_CS_REG(R300_GA_SOLID_RG, 0x00000000); OUT_CS_REG(R300_GA_SOLID_BA, 0x00000000); OUT_CS_REG(R300_GA_POLY_MODE, 0x00000000); -- cgit v1.2.3