r600g: set DISABLE in CB_COLOR_CONTROL if colormask is 0
this will be useful for in-place DB decompression, otherwise should be harmless Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
4fe74412cf
commit
43e3f19c76
|
@ -680,7 +680,7 @@ static void *evergreen_create_blend_state(struct pipe_context *ctx,
|
|||
struct r600_context *rctx = (struct r600_context *)ctx;
|
||||
struct r600_pipe_blend *blend = CALLOC_STRUCT(r600_pipe_blend);
|
||||
struct r600_pipe_state *rstate;
|
||||
uint32_t color_control, target_mask;
|
||||
uint32_t color_control = 0, target_mask;
|
||||
/* XXX there is more then 8 framebuffer */
|
||||
unsigned blend_cntl[8];
|
||||
|
||||
|
@ -693,7 +693,6 @@ static void *evergreen_create_blend_state(struct pipe_context *ctx,
|
|||
rstate->id = R600_PIPE_STATE_BLEND;
|
||||
|
||||
target_mask = 0;
|
||||
color_control = S_028808_MODE(1);
|
||||
if (state->logicop_enable) {
|
||||
color_control |= (state->logicop_func << 16) | (state->logicop_func << 20);
|
||||
} else {
|
||||
|
@ -711,6 +710,11 @@ static void *evergreen_create_blend_state(struct pipe_context *ctx,
|
|||
}
|
||||
blend->cb_target_mask = target_mask;
|
||||
|
||||
if (target_mask)
|
||||
color_control |= S_028808_MODE(V_028808_CB_NORMAL);
|
||||
else
|
||||
color_control |= S_028808_MODE(V_028808_CB_DISABLE);
|
||||
|
||||
r600_pipe_state_add_reg(rstate, R_028808_CB_COLOR_CONTROL,
|
||||
color_control);
|
||||
/* only have dual source on MRT0 */
|
||||
|
|
|
@ -482,6 +482,8 @@
|
|||
#define S_028808_MODE(x) (((x) & 0x7) << 4)
|
||||
#define G_028808_MODE(x) (((x) >> 4) & 0x7)
|
||||
#define C_028808_MODE 0xFFFFFF8F
|
||||
#define V_028808_CB_DISABLE 0
|
||||
#define V_028808_CB_NORMAL 1
|
||||
#define S_028808_ROP3(x) (((x) & 0xFF) << 16)
|
||||
#define G_028808_ROP3(x) (((x) >> 16) & 0xFF)
|
||||
#define C_028808_ROP3 0xFF00FFFF
|
||||
|
|
|
@ -718,6 +718,12 @@ static void *r600_create_blend_state(struct pipe_context *ctx,
|
|||
target_mask |= (state->rt[0].colormask << (4 * i));
|
||||
}
|
||||
}
|
||||
|
||||
if (target_mask)
|
||||
color_control |= S_028808_SPECIAL_OP(V_028808_NORMAL);
|
||||
else
|
||||
color_control |= S_028808_SPECIAL_OP(V_028808_DISABLE);
|
||||
|
||||
blend->cb_target_mask = target_mask;
|
||||
blend->cb_color_control = color_control;
|
||||
/* only MRT0 has dual src blend */
|
||||
|
|
|
@ -418,6 +418,8 @@
|
|||
#define G_028808_DEGAMMA_ENABLE(x) (((x) >> 3) & 0x1)
|
||||
#define C_028808_DEGAMMA_ENABLE 0xFFFFFFF7
|
||||
#define S_028808_SPECIAL_OP(x) (((x) & 0x7) << 4)
|
||||
#define V_028808_NORMAL 0
|
||||
#define V_028808_DISABLE 1
|
||||
#define G_028808_SPECIAL_OP(x) (((x) >> 4) & 0x7)
|
||||
#define C_028808_SPECIAL_OP 0xFFFFFF8F
|
||||
#define S_028808_PER_MRT_BLEND(x) (((x) & 0x1) << 7)
|
||||
|
|
Loading…
Reference in New Issue