From 484858ae48fef039034cf43391883a432ac40c78 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Sat, 14 Feb 2009 15:24:44 -0800 Subject: r300-gallium: Fix scissors. Don't use SCISSORS_OFFSET since we're DRI2, and don't forget to set scissors in clear. --- src/gallium/drivers/r300/r300_surface.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (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 392c7d318d..8c6b336aac 100644 --- a/src/gallium/drivers/r300/r300_surface.c +++ b/src/gallium/drivers/r300/r300_surface.c @@ -54,7 +54,7 @@ static void r300_surface_fill(struct pipe_context* pipe, return; } - BEGIN_CS(158 + (caps->is_r500 ? 22 : 14) + (caps->has_tcl ? 4 : 2)); + BEGIN_CS(161 + (caps->is_r500 ? 22 : 14) + (caps->has_tcl ? 4 : 2)); /* Flush PVS. */ OUT_CS_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0x0); @@ -189,10 +189,16 @@ static void r300_surface_fill(struct pipe_context* pipe, R300_PS_UCP_MODE_CLIP_AS_TRIFAN); } + /* The size of the point we're about to draw, in sixths of pixels */ OUT_CS_REG(R300_GA_POINT_SIZE, ((h * 6) & R300_POINTSIZE_Y_MASK) | ((w * 6) << R300_POINTSIZE_X_SHIFT)); + /* Pixel scissors */ + OUT_CS_REG_SEQ(R300_SC_SCISSORS_TL, 2); + OUT_CS((x << R300_SCISSORS_X_SHIFT) | (y << R300_SCISSORS_Y_SHIFT)); + OUT_CS((w << R300_SCISSORS_X_SHIFT) | (h << R300_SCISSORS_Y_SHIFT)); + /* RS block setup */ if (caps->is_r500) { /* XXX We seem to be in disagreement about how many of these we have -- cgit v1.2.3