[Mesa-dev] [PATCH 2/9] radeonsi: pass TGSI processor type to si_compile_llvm for dumping
Marek Olšák
maraeo at gmail.com
Fri Jan 1 06:13:55 PST 2016
From: Marek Olšák <marek.olsak at amd.com>
the parameter will be used later
---
src/gallium/drivers/radeonsi/si_compute.c | 2 +-
src/gallium/drivers/radeonsi/si_shader.c | 7 ++++---
src/gallium/drivers/radeonsi/si_shader.h | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index 47a74ee..45312d0 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);
+ mod, TGSI_PROCESSOR_COMPUTE);
LLVMDisposeModule(mod);
}
}
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index f04bfdc..6bece08 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3878,7 +3878,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)
+ LLVMTargetMachineRef tm, LLVMModuleRef mod, unsigned processor)
{
int r = 0;
bool dump_asm = r600_can_dump_shader(&sscreen->b,
@@ -3974,7 +3974,8 @@ static int si_generate_gs_copy_shader(struct si_screen *sscreen,
fprintf(stderr, "Copy Vertex Shader for Geometry Shader:\n\n");
r = si_compile_llvm(sscreen, si_shader_ctx->shader,
- si_shader_ctx->tm, bld_base->base.gallivm->module);
+ si_shader_ctx->tm, bld_base->base.gallivm->module,
+ TGSI_PROCESSOR_GEOMETRY);
radeon_llvm_dispose(&si_shader_ctx->radeon_bld);
@@ -4182,7 +4183,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);
+ r = si_compile_llvm(sscreen, shader, tm, mod, 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 90df43b..f3fd122 100644
--- a/src/gallium/drivers/radeonsi/si_shader.h
+++ b/src/gallium/drivers/radeonsi/si_shader.h
@@ -330,7 +330,7 @@ int si_shader_create(struct si_screen *sscreen, LLVMTargetMachineRef tm,
struct si_shader *shader);
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);
+ LLVMTargetMachineRef tm, LLVMModuleRef mod, 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.1.4
More information about the mesa-dev
mailing list