evergreeng: set hardware pixelcenters according to gl_rasterization_rules
authorKeith Whitwell <keithw@vmware.com>
Wed, 3 Nov 2010 11:15:43 +0000 (11:15 +0000)
committerKeith Whitwell <keithw@vmware.com>
Wed, 3 Nov 2010 11:16:04 +0000 (11:16 +0000)
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/evergreend.h

index 7dd261d7e235976ad87004389477dcdd5ab3c390..4725b5e75e2f7ca99487ebc0de1453a54c01c129 100644 (file)
@@ -291,7 +291,11 @@ static void *evergreen_create_rs_state(struct pipe_context *ctx,
        r600_pipe_state_add_reg(rstate, R_028C14_PA_CL_GB_HORZ_CLIP_ADJ, 0x3F800000, 0xFFFFFFFF, NULL);
        r600_pipe_state_add_reg(rstate, R_028C18_PA_CL_GB_HORZ_DISC_ADJ, 0x3F800000, 0xFFFFFFFF, NULL);
        r600_pipe_state_add_reg(rstate, R_028B7C_PA_SU_POLY_OFFSET_CLAMP, 0x0, 0xFFFFFFFF, NULL);
-       r600_pipe_state_add_reg(rstate, R_028C08_PA_SU_VTX_CNTL, 0x00000005, 0xFFFFFFFF, NULL);
+
+       r600_pipe_state_add_reg(rstate, R_028C08_PA_SU_VTX_CNTL,
+                               S_028C08_PIX_CENTER_HALF(state->gl_rasterization_rules),
+                               0xFFFFFFFF, NULL);
+
        r600_pipe_state_add_reg(rstate, R_02820C_PA_SC_CLIPRECT_RULE, clip_rule, 0xFFFFFFFF, NULL);
        return rstate;
 }
index 7e7bd01291d2b32383b22a755c5c9efba761e36c..a337916c0981de887225d8f1d17349f4e131f59d 100644 (file)
 #define R_028C00_PA_SC_LINE_CNTL                     0x00028C00
 #define R_028C04_PA_SC_AA_CONFIG                     0x00028C04
 #define R_028C08_PA_SU_VTX_CNTL                      0x00028C08
+#define   S_028C08_PIX_CENTER_HALF(x)                  (((x) & 0x1) << 0)
+#define   G_028C08_PIX_CENTER_HALF(x)                  (((x) >> 0) & 0x1)
+#define   C_028C08_PIX_CENTER_HALF                     0xFFFFFFFE
 #define R_028C0C_PA_CL_GB_VERT_CLIP_ADJ              0x00028C0C
 #define R_028C10_PA_CL_GB_VERT_DISC_ADJ              0x00028C10
 #define R_028C14_PA_CL_GB_HORZ_CLIP_ADJ              0x00028C14