summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/evergreen_state.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-11-01 14:19:18 +0000
committerKeith Whitwell <keithw@vmware.com>2010-11-03 10:55:22 +0000
commitd6b6a0bc170bd61abbbe9cb6ba777c7192dbd018 (patch)
tree3a32cafc05bfb38eb8bc93f5e5524df31677106f /src/gallium/drivers/r600/evergreen_state.c
parentee07e0e39ad1c4d13d540b23220fecc564d07b16 (diff)
evergreeng: respect linewidth state, use integer widths only
Discard fractional bits from linewidth. This matches the nvidia closed drivers, my reading of the OpenGL SI and current llvmpipe behaviour. It looks a lot nicer & avoids ugliness where lines alternate between n and n+1 pixels in width along their length. Also fix up r600g to match.
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index ce8e93a1d2..7dd261d7e2 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -281,7 +281,10 @@ static void *evergreen_create_rs_state(struct pipe_context *ctx,
tmp = (unsigned)(state->point_size * 8.0);
r600_pipe_state_add_reg(rstate, R_028A00_PA_SU_POINT_SIZE, S_028A00_HEIGHT(tmp) | S_028A00_WIDTH(tmp), 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_028A04_PA_SU_POINT_MINMAX, 0x80000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_028A08_PA_SU_LINE_CNTL, 0x00000008, 0xFFFFFFFF, NULL);
+
+ tmp = (unsigned)state->line_width * 8;
+ r600_pipe_state_add_reg(rstate, R_028A08_PA_SU_LINE_CNTL, S_028A08_WIDTH(tmp), 0xFFFFFFFF, NULL);
+
r600_pipe_state_add_reg(rstate, R_028C00_PA_SC_LINE_CNTL, 0x00000400, 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_028C0C_PA_CL_GB_VERT_CLIP_ADJ, 0x3F800000, 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_028C10_PA_CL_GB_VERT_DISC_ADJ, 0x3F800000, 0xFFFFFFFF, NULL);