From: Nicolai Hähnle Date: Tue, 15 Dec 2015 00:34:45 +0000 (-0500) Subject: radeonsi: count compilations in si_compile_llvm X-Git-Tag: upstream/17.1.0~13537 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d1fc2cf51438a649eecbe4f8e858eebd93c1757;p=platform%2Fupstream%2Fmesa.git radeonsi: count compilations in si_compile_llvm This changes the count slightly (because of si_generate_gs_copy_shader), but this is only relevant for the driver-specific num-compilations query. It sets the stage for the next commit. Reviewed-by: Marek Olšák --- diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 4a67276..511ed88 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -3885,6 +3885,8 @@ int si_compile_llvm(struct si_screen *sscreen, struct si_shader *shader, shader->selector ? shader->selector->tokens : NULL); bool dump_ir = dump_asm && !(sscreen->b.debug_flags & DBG_NO_IR); + p_atomic_inc(&sscreen->b.num_compilations); + r = radeon_llvm_compile(mod, &shader->binary, r600_get_llvm_processor_name(sscreen->b.family), dump_ir, dump_asm, tm); if (r) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index f0147ce..8700590 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -634,7 +634,6 @@ static int si_shader_select(struct pipe_context *ctx, sel->last_variant = shader; } state->current = shader; - p_atomic_inc(&sctx->screen->b.num_compilations); pipe_mutex_unlock(sel->mutex); return 0; }