diff options
author | Christoph Bumiller <[email protected]> | 2014-05-17 01:20:20 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-06-02 12:49:03 +0200 |
commit | b206f5951cb8639041a27bfc35cd6add1127ba05 (patch) | |
tree | a198d9eb816b7b3742a2915410664cdf7d41f6b2 /src/gallium/drivers/r600/r600_state.c | |
parent | 4b586a26c8ab8804dacbf400f5fd53b5a1f70dac (diff) |
r600g: use TGSI_PROPERTY to disable viewport and clipping
v2 get rid of magic value, use DEFINES
v3 update clip_disable together with vs_position_window_space
Big thanks to Marek Olšák!
Signed-off-by: David Heidelberger <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_state.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 31d7bd04519..9e7a8e95289 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -2375,8 +2375,6 @@ void r600_init_atom_start_cs(struct r600_context *rctx) r600_store_value(cb, 0x3F800000); /* R_0282D4_PA_SC_VPORT_ZMAX_0 */ } - r600_store_context_reg(cb, R_028818_PA_CL_VTE_CNTL, 0x43F); - r600_store_context_reg(cb, R_028200_PA_SC_WINDOW_OFFSET, 0); r600_store_context_reg(cb, R_02820C_PA_SC_CLIPRECT_RULE, 0xFFFF); @@ -2588,6 +2586,17 @@ void r600_update_vs_state(struct pipe_context *ctx, struct r600_pipe_shader *sha r600_store_context_reg(cb, R_028868_SQ_PGM_RESOURCES_VS, S_028868_NUM_GPRS(rshader->bc.ngpr) | S_028868_STACK_SIZE(rshader->bc.nstack)); + if (rshader->vs_position_window_space) { + r600_store_context_reg(cb, R_028818_PA_CL_VTE_CNTL, + S_028818_VTX_XY_FMT(1) | S_028818_VTX_Z_FMT(1)); + } else { + r600_store_context_reg(cb, R_028818_PA_CL_VTE_CNTL, + S_028818_VTX_W0_FMT(1) | + S_028818_VPORT_X_SCALE_ENA(1) | S_028818_VPORT_X_OFFSET_ENA(1) | + S_028818_VPORT_Y_SCALE_ENA(1) | S_028818_VPORT_Y_OFFSET_ENA(1) | + S_028818_VPORT_Z_SCALE_ENA(1) | S_028818_VPORT_Z_OFFSET_ENA(1)); + + } r600_store_context_reg(cb, R_028858_SQ_PGM_START_VS, 0); /* After that, the NOP relocation packet must be emitted (shader->bo, RADEON_USAGE_READ). */ |