r600g: remove some magic numbers
authorMarek Olšák <maraeo@gmail.com>
Sun, 19 Jun 2011 21:28:33 +0000 (23:28 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 19 Jun 2011 21:28:33 +0000 (23:28 +0200)
src/gallium/drivers/r600/r600_state.c
src/gallium/drivers/r600/r600d.h

index d927e4a945e743710fb8e606d5ffab9d0f9ba14e..4ce17403ba2b0ce6e3256030d0638a268ba6b232 100644 (file)
@@ -1290,14 +1290,22 @@ void r600_init_config(struct r600_pipe_context *rctx)
 
        if (family >= CHIP_RV770) {
                r600_pipe_state_add_reg(rstate, R_008D8C_SQ_DYN_GPR_CNTL_PS_FLUSH_REQ, 0x00004000, 0xFFFFFFFF, NULL);
-               r600_pipe_state_add_reg(rstate, R_009508_TA_CNTL_AUX, 0x07000002, 0xFFFFFFFF, NULL);
+               r600_pipe_state_add_reg(rstate, R_009508_TA_CNTL_AUX,
+                                       S_009508_DISABLE_CUBE_ANISO(1) |
+                                       S_009508_SYNC_GRADIENT(1) |
+                                       S_009508_SYNC_WALKER(1) |
+                                       S_009508_SYNC_ALIGNER(1), 0xFFFFFFFF, NULL);
                r600_pipe_state_add_reg(rstate, R_009830_DB_DEBUG, 0x00000000, 0xFFFFFFFF, NULL);
                r600_pipe_state_add_reg(rstate, R_009838_DB_WATERMARKS, 0x00420204, 0xFFFFFFFF, NULL);
                r600_pipe_state_add_reg(rstate, R_0286C8_SPI_THREAD_GROUPING, 0x00000000, 0xFFFFFFFF, NULL);
                r600_pipe_state_add_reg(rstate, R_028A4C_PA_SC_MODE_CNTL, 0x00514002, 0xFFFFFFFF, NULL);
        } else {
                r600_pipe_state_add_reg(rstate, R_008D8C_SQ_DYN_GPR_CNTL_PS_FLUSH_REQ, 0x00000000, 0xFFFFFFFF, NULL);
-               r600_pipe_state_add_reg(rstate, R_009508_TA_CNTL_AUX, 0x07000003, 0xFFFFFFFF, NULL);
+               r600_pipe_state_add_reg(rstate, R_009508_TA_CNTL_AUX,
+                                       S_009508_DISABLE_CUBE_ANISO(1) |
+                                       S_009508_SYNC_GRADIENT(1) |
+                                       S_009508_SYNC_WALKER(1) |
+                                       S_009508_SYNC_ALIGNER(1), 0xFFFFFFFF, NULL);
                r600_pipe_state_add_reg(rstate, R_009830_DB_DEBUG, 0x82000000, 0xFFFFFFFF, NULL);
                r600_pipe_state_add_reg(rstate, R_009838_DB_WATERMARKS, 0x01020204, 0xFFFFFFFF, NULL);
                r600_pipe_state_add_reg(rstate, R_0286C8_SPI_THREAD_GROUPING, 0x00000001, 0xFFFFFFFF, NULL);
index 6373572b65f63517a957938339a0a2cf56bc379c..f6eec24cc058e1e533908f29980ede11b98cd483 100644 (file)
 #define   S_009508_DISABLE_CUBE_WRAP(x)                (((x) & 0x1) << 0)
 #define   G_009508_DISABLE_CUBE_WRAP(x)                (((x) >> 0) & 0x1)
 #define   C_009508_DISABLE_CUBE_WRAP                   0xFFFFFFFE
+#define   S_009508_DISABLE_CUBE_ANISO(x)               (((x) & 0x1) << 1)
+#define   G_009508_DISABLE_CUBE_ANISO(x)               (((x) >> 1) & 0x1)
+#define   C_009508_DISABLE_CUBE_ANISO                  (~(1 << 1))
 #define   S_009508_SYNC_GRADIENT(x)                    (((x) & 0x1) << 24)
 #define   G_009508_SYNC_GRADIENT(x)                    (((x) >> 24) & 0x1)
 #define   C_009508_SYNC_GRADIENT                       0xFEFFFFFF