[Mesa-dev] [PATCH v2 2/3] radeonsi: count compilations in si_compile_llvm
Nicolai Hähnle
nhaehnle at gmail.com
Mon Dec 21 13:18:21 PST 2015
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
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 <marek.olsak at amd.com>
---
(unchanged from v1)
src/gallium/drivers/radeonsi/si_shader.c | 2 ++
src/gallium/drivers/radeonsi/si_state_shaders.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
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;
}
--
2.5.0
More information about the mesa-dev
mailing list