From 3ce0a2fd7f4270b036b4449a312cff8dcfd5925e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 27 Dec 2015 22:22:24 +0100 Subject: [PATCH] radeonsi: pass TGSI processor type to si_compile_llvm for dumping MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit the parameter will be used later Reviewed-by: Edward O'Callaghan Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_compute.c | 2 +- src/gallium/drivers/radeonsi/si_shader.c | 6 +++--- src/gallium/drivers/radeonsi/si_shader.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 2565117..32e265e 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -123,7 +123,7 @@ static void *si_create_compute_state( LLVMModuleRef mod = radeon_llvm_get_kernel_module(program->llvm_ctx, i, code, header->num_bytes); si_compile_llvm(sctx->screen, &program->kernels[i], sctx->tm, - mod, &sctx->b.debug); + mod, &sctx->b.debug, TGSI_PROCESSOR_COMPUTE); LLVMDisposeModule(mod); } } diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index b453d97..c2e802e 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -3921,7 +3921,7 @@ int si_shader_binary_read(struct si_screen *sscreen, struct si_shader *shader, int si_compile_llvm(struct si_screen *sscreen, struct si_shader *shader, LLVMTargetMachineRef tm, LLVMModuleRef mod, - struct pipe_debug_callback *debug) + struct pipe_debug_callback *debug, unsigned processor) { int r = 0; bool dump_asm = r600_can_dump_shader(&sscreen->b, @@ -4026,7 +4026,7 @@ static int si_generate_gs_copy_shader(struct si_screen *sscreen, r = si_compile_llvm(sscreen, si_shader_ctx->shader, si_shader_ctx->tm, bld_base->base.gallivm->module, - debug); + debug, TGSI_PROCESSOR_GEOMETRY); radeon_llvm_dispose(&si_shader_ctx->radeon_bld); @@ -4235,7 +4235,7 @@ int si_shader_create(struct si_screen *sscreen, LLVMTargetMachineRef tm, radeon_llvm_finalize_module(&si_shader_ctx.radeon_bld); mod = bld_base->base.gallivm->module; - r = si_compile_llvm(sscreen, shader, tm, mod, debug); + r = si_compile_llvm(sscreen, shader, tm, mod, debug, si_shader_ctx.type); if (r) { fprintf(stderr, "LLVM failed to compile shader\n"); goto out; diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 443900b..b50b43c 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -332,7 +332,7 @@ int si_shader_create(struct si_screen *sscreen, LLVMTargetMachineRef tm, void si_dump_shader_key(unsigned shader, union si_shader_key *key, FILE *f); int si_compile_llvm(struct si_screen *sscreen, struct si_shader *shader, LLVMTargetMachineRef tm, LLVMModuleRef mod, - struct pipe_debug_callback *debug); + struct pipe_debug_callback *debug, unsigned processor); void si_shader_destroy(struct si_shader *shader); unsigned si_shader_io_get_unique_index(unsigned semantic_name, unsigned index); int si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader); -- 2.7.4