[Mesa-dev] [PATCH 22/23] radeonsi: move si_shader_dump call out of si_compile_llvm
Marek Olšák
maraeo at gmail.com
Wed Jan 6 04:41:44 PST 2016
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_compute.c | 3 +++
src/gallium/drivers/radeonsi/si_shader.c | 10 ++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index 2380242..ffac656 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -125,6 +125,9 @@ static void *si_create_compute_state(
si_compile_llvm(sctx->screen, &program->kernels[i].binary,
&program->kernels[i].config, sctx->tm,
mod, &sctx->b.debug, TGSI_PROCESSOR_COMPUTE);
+ si_shader_dump(sctx->screen, &program->kernels[i].binary,
+ &program->kernels[i].config,
+ &sctx->b.debug, TGSI_PROCESSOR_COMPUTE);
si_shader_binary_upload(sctx->screen, &program->kernels[i]);
LLVMDisposeModule(mod);
}
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index fea5b14..58d16cf 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3913,7 +3913,6 @@ int si_compile_llvm(struct si_screen *sscreen,
}
si_shader_binary_read_config(binary, conf, 0);
- si_shader_dump(sscreen, binary, conf, debug, processor);
FREE(binary->config);
FREE(binary->global_symbol_offsets);
@@ -3996,8 +3995,12 @@ static int si_generate_gs_copy_shader(struct si_screen *sscreen,
&si_shader_ctx->shader->config, si_shader_ctx->tm,
bld_base->base.gallivm->module,
debug, TGSI_PROCESSOR_GEOMETRY);
- if (!r)
+ if (!r) {
+ si_shader_dump(sscreen, &si_shader_ctx->shader->binary,
+ &si_shader_ctx->shader->config, debug,
+ TGSI_PROCESSOR_GEOMETRY);
r = si_shader_binary_upload(sscreen, si_shader_ctx->shader);
+ }
radeon_llvm_dispose(&si_shader_ctx->radeon_bld);
@@ -4199,6 +4202,9 @@ int si_shader_create(struct si_screen *sscreen, LLVMTargetMachineRef tm,
goto out;
}
+ si_shader_dump(sscreen, &shader->binary, &shader->config,
+ debug, si_shader_ctx.type);
+
r = si_shader_binary_upload(sscreen, shader);
if (r) {
fprintf(stderr, "LLVM failed to upload shader\n");
--
2.1.4
More information about the mesa-dev
mailing list