mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 17:30:20 +01:00
r600g: avoid GPU doing constant preload from random address
Previous command stream might have set any of the constant buffer and the previous address might no longer be valid thus GPU might preload constant from random invalid address and possibly triggering lockup. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
This commit is contained in:
parent
9ccaa24f84
commit
841c1b5f54
2 changed files with 40 additions and 0 deletions
|
|
@ -2602,6 +2602,26 @@ void evergreen_init_common_regs(struct r600_command_buffer *cb,
|
|||
r600_store_context_reg(cb, R_028848_SQ_PGM_RESOURCES_2_PS, S_028848_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
|
||||
r600_store_context_reg(cb, R_028864_SQ_PGM_RESOURCES_2_VS, S_028864_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
|
||||
|
||||
/* to avoid GPU doing any preloading of constant from random address */
|
||||
r600_store_context_reg_seq(cb, R_028140_ALU_CONST_BUFFER_SIZE_PS_0, 8);
|
||||
r600_store_value(cb, 0); /* R_028140_ALU_CONST_BUFFER_SIZE_PS_0 */
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_context_reg_seq(cb, R_028180_ALU_CONST_BUFFER_SIZE_VS_0, 8);
|
||||
r600_store_value(cb, 0); /* R_028180_ALU_CONST_BUFFER_SIZE_VS_0 */
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
|
||||
r600_store_context_reg(cb, R_028354_SX_SURFACE_SYNC, S_028354_SURFACE_SYNC_MASK(0xf));
|
||||
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -2381,6 +2381,26 @@ void r600_init_atom_start_cs(struct r600_context *rctx)
|
|||
r600_store_value(cb, 0); /* R_0288C4_SQ_REDUC_RING_ITEMSIZE */
|
||||
r600_store_value(cb, 0); /* R_0288C8_SQ_GS_VERT_ITEMSIZE */
|
||||
|
||||
/* to avoid GPU doing any preloading of constant from random address */
|
||||
r600_store_context_reg_seq(cb, R_028140_ALU_CONST_BUFFER_SIZE_PS_0, 8);
|
||||
r600_store_value(cb, 0); /* R_028140_ALU_CONST_BUFFER_SIZE_PS_0 */
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_context_reg_seq(cb, R_028180_ALU_CONST_BUFFER_SIZE_VS_0, 8);
|
||||
r600_store_value(cb, 0); /* R_028180_ALU_CONST_BUFFER_SIZE_VS_0 */
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
r600_store_value(cb, 0);
|
||||
|
||||
r600_store_context_reg_seq(cb, R_028A10_VGT_OUTPUT_PATH_CNTL, 13);
|
||||
r600_store_value(cb, 0); /* R_028A10_VGT_OUTPUT_PATH_CNTL */
|
||||
r600_store_value(cb, 0); /* R_028A14_VGT_HOS_CNTL */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue