r600g: make some scissor regs invariant on r600-r700
authorMarek Olšák <maraeo@gmail.com>
Sun, 26 Feb 2012 13:05:35 +0000 (14:05 +0100)
committerMarek Olšák <maraeo@gmail.com>
Mon, 5 Mar 2012 13:22:20 +0000 (14:22 +0100)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/r600/r600_hw_context.c
src/gallium/drivers/r600/r600_state.c

index 9e99c7ee54f7e0997afba1a65c72d91662093ede..6d30aa3ca056a8a8e8405de7bf81b69db9c766da 100644 (file)
@@ -374,12 +374,8 @@ static const struct r600_reg r600_context_reg_list[] = {
        {R_028010_DB_DEPTH_INFO, REG_FLAG_NEED_BO, 0},
        {R_028D24_DB_HTILE_SURFACE, 0, 0},
        {R_028D34_DB_PREFETCH_LIMIT, 0, 0},
-       {R_028030_PA_SC_SCREEN_SCISSOR_TL, 0, 0},
-       {R_028034_PA_SC_SCREEN_SCISSOR_BR, 0, 0},
        {R_028204_PA_SC_WINDOW_SCISSOR_TL, 0, 0},
        {R_028208_PA_SC_WINDOW_SCISSOR_BR, 0, 0},
-       {R_028240_PA_SC_GENERIC_SCISSOR_TL, 0, 0},
-       {R_028244_PA_SC_GENERIC_SCISSOR_BR, 0, 0},
        {R_028250_PA_SC_VPORT_SCISSOR_0_TL, 0, 0},
        {R_028254_PA_SC_VPORT_SCISSOR_0_BR, 0, 0},
        {R_02843C_PA_CL_VPORT_XSCALE_0, 0, 0},
index 163469c0c6424e219dba33225cd4b95d035cdc19..38b48a29b7d3933c93dfbf8e87ff2b9f4ecc6ec4 100644 (file)
@@ -1604,24 +1604,12 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
        tl = S_028240_TL_X(0) | S_028240_TL_Y(0) | S_028240_WINDOW_OFFSET_DISABLE(1);
        br = S_028244_BR_X(state->width) | S_028244_BR_Y(state->height);
 
-       r600_pipe_state_add_reg(rstate,
-                               R_028030_PA_SC_SCREEN_SCISSOR_TL, tl,
-                               NULL, 0);
-       r600_pipe_state_add_reg(rstate,
-                               R_028034_PA_SC_SCREEN_SCISSOR_BR, br,
-                               NULL, 0);
        r600_pipe_state_add_reg(rstate,
                                R_028204_PA_SC_WINDOW_SCISSOR_TL, tl,
                                NULL, 0);
        r600_pipe_state_add_reg(rstate,
                                R_028208_PA_SC_WINDOW_SCISSOR_BR, br,
                                NULL, 0);
-       r600_pipe_state_add_reg(rstate,
-                               R_028240_PA_SC_GENERIC_SCISSOR_TL, tl,
-                               NULL, 0);
-       r600_pipe_state_add_reg(rstate,
-                               R_028244_PA_SC_GENERIC_SCISSOR_BR, br,
-                               NULL, 0);
 
        r600_pipe_state_add_reg(rstate, R_0287A0_CB_SHADER_CONTROL,
                                shader_control, NULL, 0);
@@ -2068,6 +2056,14 @@ void r600_init_atom_start_cs(struct r600_context *rctx)
 
        r600_store_context_reg(cb, R_028C48_PA_SC_AA_MASK, 0xFFFFFFFF);
 
+       r600_store_context_reg_seq(cb, R_028030_PA_SC_SCREEN_SCISSOR_TL, 2);
+       r600_store_value(cb, 0); /* R_028030_PA_SC_SCREEN_SCISSOR_TL */
+       r600_store_value(cb, S_028034_BR_X(8192) | S_028034_BR_Y(8192)); /* R_028034_PA_SC_SCREEN_SCISSOR_BR */
+
+       r600_store_context_reg_seq(cb, R_028240_PA_SC_GENERIC_SCISSOR_TL, 2);
+       r600_store_value(cb, 0); /* R_028240_PA_SC_GENERIC_SCISSOR_TL */
+       r600_store_value(cb, S_028244_BR_X(8192) | S_028244_BR_Y(8192)); /* R_028244_PA_SC_GENERIC_SCISSOR_BR */
+
        r600_store_context_reg_seq(cb, R_0288CC_SQ_PGM_CF_OFFSET_PS, 2);
        r600_store_value(cb, 0); /* R_0288CC_SQ_PGM_CF_OFFSET_PS */
        r600_store_value(cb, 0); /* R_0288D0_SQ_PGM_CF_OFFSET_VS */