From 2b0be2015d6501d0f03ea1c6b0c36ffb301ac15a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 24 Dec 2013 05:30:37 +0000 Subject: [PATCH] r600g: enable instance cnt register with new enough kernel The instance cnt register was missing for a few kernels, with a new enough kernel we can output it. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher --- src/gallium/drivers/r600/evergreen_state.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index c206c08c9c9..057852029ff 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -3595,6 +3595,7 @@ void evergreen_update_es_state(struct pipe_context *ctx, struct r600_pipe_shader void evergreen_update_gs_state(struct pipe_context *ctx, struct r600_pipe_shader *shader) { + struct r600_context *rctx = (struct r600_context *)ctx; struct r600_command_buffer *cb = &shader->command_buffer; struct r600_shader *rshader = &shader->shader; struct r600_shader *cp_shader = &shader->gs_copy_shader->shader; @@ -3611,12 +3612,11 @@ void evergreen_update_gs_state(struct pipe_context *ctx, struct r600_pipe_shader r600_store_context_reg(cb, R_028B38_VGT_GS_MAX_VERT_OUT, S_028B38_MAX_VERT_OUT(rshader->gs_max_out_vertices)); - -/* XXX kernel checker fails - r600_store_context_reg(cb, R_028B90_VGT_GS_INSTANCE_CNT, - S_028B90_CNT(0) | - S_028B90_ENABLE(0)); -*/ + if (rctx->screen->b.info.drm_minor >= 35) { + r600_store_context_reg(cb, R_028B90_VGT_GS_INSTANCE_CNT, + S_028B90_CNT(0) | + S_028B90_ENABLE(0)); + } r600_store_context_reg_seq(cb, R_02891C_SQ_GS_VERT_ITEMSIZE, 4); r600_store_value(cb, cp_shader->ring_item_size >> 2); r600_store_value(cb, 0); -- 2.30.2