From 48ab3327f9f2192c37d18892f27cab6b172a16cb Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 11 Dec 2012 12:11:20 -0500 Subject: [PATCH] r600g: state emit testing patch If this patch helps, try commenting out each new emit sequence until you identify the one that causes the hang. Signed-off-by: Alex Deucher --- src/gallium/drivers/r600/r600_state_common.c | 78 ++++++++++++++++++++++++++ 1 files changed, 78 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index b132850..9a6dd8a 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -1251,6 +1251,84 @@ static void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info } rctx->pm4_dirty_cdwords = 0; +#if 1 + r600_write_context_reg_seq(cs, R_028028_DB_STENCIL_CLEAR, 2); + r600_write_value(cs, 0); /* R_028028_DB_STENCIL_CLEAR */ + r600_write_value(cs, 0x3F800000); /* R_02802C_DB_DEPTH_CLEAR */ +#endif +#if 1 + r600_write_context_reg_seq(cs, R_0286DC_SPI_FOG_CNTL, 3); + r600_write_value(cs, 0); /* R_0286DC_SPI_FOG_CNTL */ + r600_write_value(cs, 0); /* R_0286E0_SPI_FOG_FUNC_SCALE */ + r600_write_value(cs, 0); /* R_0286E4_SPI_FOG_FUNC_BIAS */ +#endif +#if 1 + r600_write_context_reg_seq(cs, R_028D2C_DB_SRESULTS_COMPARE_STATE1, 2); + r600_write_value(cs, 0); /* R_028D2C_DB_SRESULTS_COMPARE_STATE1 */ + r600_write_value(cs, 0); /* R_028D30_DB_PRELOAD_CONTROL */ +#endif +#if 1 + r600_write_context_reg(cs, R_028820_PA_CL_NANINF_CNTL, 0); +#endif +#if 1 + r600_write_context_reg(cs, R_028A48_PA_SC_MPASS_PS_CNTL, 0); +#endif +#if 1 + r600_write_context_reg_seq(cs, R_028C0C_PA_CL_GB_VERT_CLIP_ADJ, 4); + r600_write_value(cs, 0x3F800000); /* R_028C0C_PA_CL_GB_VERT_CLIP_ADJ */ + r600_write_value(cs, 0x3F800000); /* R_028C10_PA_CL_GB_VERT_DISC_ADJ */ + r600_write_value(cs, 0x3F800000); /* R_028C14_PA_CL_GB_HORZ_CLIP_ADJ */ + r600_write_value(cs, 0x3F800000); /* R_028C18_PA_CL_GB_HORZ_DISC_ADJ */ +#endif +#if 1 + r600_write_context_reg_seq(cs, R_0282D0_PA_SC_VPORT_ZMIN_0, 2); + r600_write_value(cs, 0); /* R_0282D0_PA_SC_VPORT_ZMIN_0 */ + r600_write_value(cs, 0x3F800000); /* R_0282D4_PA_SC_VPORT_ZMAX_0 */ +#endif +#if 1 + r600_write_context_reg(cs, R_028818_PA_CL_VTE_CNTL, 0x43F); +#endif +#if 1 + r600_write_context_reg(cs, R_028200_PA_SC_WINDOW_OFFSET, 0); +#endif +#if 1 + r600_write_context_reg(cs, R_02820C_PA_SC_CLIPRECT_RULE, 0xFFFF); +#endif +#if 1 + r600_write_context_reg_seq(cs, R_028C30_CB_CLRCMP_CONTROL, 4); + r600_write_value(cs, 0x1000000); /* R_028C30_CB_CLRCMP_CONTROL */ + r600_write_value(cs, 0); /* R_028C34_CB_CLRCMP_SRC */ + r600_write_value(cs, 0xFF); /* R_028C38_CB_CLRCMP_DST */ + r600_write_value(cs, 0xFFFFFFFF); /* R_028C3C_CB_CLRCMP_MSK */ +#endif +#if 1 + r600_write_context_reg_seq(cs, R_028030_PA_SC_SCREEN_SCISSOR_TL, 2); + r600_write_value(cs, 0); /* R_028030_PA_SC_SCREEN_SCISSOR_TL */ + r600_write_value(cs, S_028034_BR_X(8192) | S_028034_BR_Y(8192)); /* R_028034_PA_SC_SCREEN_SCISSOR_BR */ +#endif +#if 1 + r600_write_context_reg_seq(cs, R_028240_PA_SC_GENERIC_SCISSOR_TL, 2); + r600_write_value(cs, 0); /* R_028240_PA_SC_GENERIC_SCISSOR_TL */ + r600_write_value(cs, S_028244_BR_X(8192) | S_028244_BR_Y(8192)); /* R_028244_PA_SC_GENERIC_SCISSOR_BR */ +#endif +#if 1 + r600_write_context_reg_seq(cs, R_0288CC_SQ_PGM_CF_OFFSET_PS, 2); + r600_write_value(cs, 0); /* R_0288CC_SQ_PGM_CF_OFFSET_PS */ + r600_write_value(cs, 0); /* R_0288D0_SQ_PGM_CF_OFFSET_VS */ +#endif +#if 1 + r600_write_context_reg(cs, R_0288E0_SQ_VTX_SEMANTIC_CLEAR, ~0); +#endif +#if 1 + r600_write_context_reg_seq(cs, R_028400_VGT_MAX_VTX_INDX, 2); + r600_write_value(cs, ~0); /* R_028400_VGT_MAX_VTX_INDX */ + r600_write_value(cs, 0); /* R_028404_VGT_MIN_VTX_INDX */ +#endif +#if 1 + r600_write_context_reg(cs, R_0288A4_SQ_PGM_RESOURCES_FS, 0); + r600_write_context_reg(cs, R_0288DC_SQ_PGM_CF_OFFSET_FS, 0); +#endif + /* Update start instance. */ if (rctx->last_start_instance != info.start_instance) { r600_write_ctl_const(cs, R_03CFF4_SQ_VTX_START_INST_LOC, info.start_instance); -- 1.7.7.5