diff options
author | Marek Olšák <[email protected]> | 2014-04-20 18:17:51 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-04-25 01:33:13 +0200 |
commit | 3a3b1bf60e0ef233a8610684a7472e3600d0e65e (patch) | |
tree | 62ede41f1c076aa90e02c46c97f8fa6d06542e32 /src/gallium/drivers/r600/r600_state.c | |
parent | 3d0c4f3b01569f43318e648786ae79f7b6b4948e (diff) |
r600g: fix hang on RV740 by using DX_RASTERIZATION_KILL instead of SX_MISC
Changing SX_MISC hangs RV740. When we're at it, let's use DX_RASTERIZATION_KILL
on all R700 and later chipsets.
Cc: 10.0 10.1 [email protected]
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_state.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index ffcceacfb81..a0ba1318e2c 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -460,6 +460,10 @@ static void *r600_create_rs_state(struct pipe_context *ctx, S_028810_ZCLIP_NEAR_DISABLE(!state->depth_clip) | S_028810_ZCLIP_FAR_DISABLE(!state->depth_clip) | S_028810_DX_LINEAR_ATTR_CLIP_ENA(1); + if (rctx->b.chip_class == R700) { + rs->pa_cl_clip_cntl |= + S_028810_DX_RASTERIZATION_KILL(state->rasterizer_discard); + } rs->multisample_enable = state->multisample; /* offset */ @@ -532,7 +536,10 @@ static void *r600_create_rs_state(struct pipe_context *ctx, if (rctx->b.chip_class == R700) { r600_store_context_reg(&rs->buffer, R_028814_PA_SU_SC_MODE_CNTL, rs->pa_su_sc_mode_cntl); } - r600_store_context_reg(&rs->buffer, R_028350_SX_MISC, S_028350_MULTIPASS(state->rasterizer_discard)); + if (rctx->b.chip_class == R600) { + r600_store_context_reg(&rs->buffer, R_028350_SX_MISC, + S_028350_MULTIPASS(state->rasterizer_discard)); + } return rs; } @@ -2397,8 +2404,11 @@ void r600_init_atom_start_cs(struct r600_context *rctx) r600_store_context_reg(cb, R_0288A4_SQ_PGM_RESOURCES_FS, 0); + if (rctx->b.chip_class == R700) + r600_store_context_reg(cb, R_028350_SX_MISC, 0); if (rctx->b.chip_class == R700 && rctx->screen->b.has_streamout) r600_store_context_reg(cb, R_028354_SX_SURFACE_SYNC, S_028354_SURFACE_SYNC_MASK(0xf)); + r600_store_context_reg(cb, R_028800_DB_DEPTH_CONTROL, 0); if (rctx->screen->b.has_streamout) { r600_store_context_reg(cb, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 0); |