diff options
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 5824fe0418a..cd7fb1eeb6e 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -2285,7 +2285,6 @@ static void cayman_init_atom_start_cs(struct r600_context *rctx) } r600_store_context_reg(cb, R_028230_PA_SC_EDGERULE, 0xAAAAAAAA); - r600_store_context_reg(cb, R_028818_PA_CL_VTE_CNTL, 0x0000043F); r600_store_context_reg(cb, R_028820_PA_CL_NANINF_CNTL, 0); r600_store_context_reg_seq(cb, CM_R_028BE8_PA_CL_GB_VERT_CLIP_ADJ, 4); @@ -2738,7 +2737,6 @@ void evergreen_init_atom_start_cs(struct r600_context *rctx) } r600_store_context_reg(cb, R_0286DC_SPI_FOG_CNTL, 0); - r600_store_context_reg(cb, R_028818_PA_CL_VTE_CNTL, 0x0000043F); r600_store_context_reg(cb, R_028820_PA_CL_NANINF_CNTL, 0); r600_store_context_reg_seq(cb, R_028AC0_DB_SRESULTS_COMPARE_STATE0, 3); @@ -3072,6 +3070,17 @@ void evergreen_update_vs_state(struct pipe_context *ctx, struct r600_pipe_shader r600_store_context_reg(cb, R_028860_SQ_PGM_RESOURCES_VS, S_028860_NUM_GPRS(rshader->bc.ngpr) | S_028860_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_02885C_SQ_PGM_START_VS, r600_resource_va(ctx->screen, (void *)shader->bo) >> 8); /* After that, the NOP relocation packet must be emitted (shader->bo, RADEON_USAGE_READ). */ |