aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_llvm_emit.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-07-25 16:15:48 +0200
committerMarek Olšák <[email protected]>2015-07-31 16:49:17 +0200
commitac19a896d3de13b7d064d01c575f46f4191ef37c (patch)
tree3d64cd47504ec27e17700796fc5c67246833e3ce /src/gallium/drivers/radeon/radeon_llvm_emit.c
parent7dd1f45bc41c4a936b0ff84400840524bb9f8871 (diff)
radeonsi: add a debug flag that disables printing the LLVM IR in shader dumps
This is for shader-db and should reduce size of shader dumps.
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_llvm_emit.c')
-rw-r--r--src/gallium/drivers/radeon/radeon_llvm_emit.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c
index 04f62d13ca7..f0112c784d4 100644
--- a/src/gallium/drivers/radeon/radeon_llvm_emit.c
+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c
@@ -148,7 +148,8 @@ static void radeonDiagnosticHandler(LLVMDiagnosticInfoRef di, void *context)
* @returns 0 for success, 1 for failure
*/
unsigned radeon_llvm_compile(LLVMModuleRef M, struct radeon_shader_binary *binary,
- const char *gpu_family, unsigned dump, LLVMTargetMachineRef tm)
+ const char *gpu_family, bool dump_ir, bool dump_asm,
+ LLVMTargetMachineRef tm)
{
char cpu[CPU_STRING_LEN];
@@ -171,17 +172,15 @@ unsigned radeon_llvm_compile(LLVMModuleRef M, struct radeon_shader_binary *binar
}
strncpy(cpu, gpu_family, CPU_STRING_LEN);
memset(fs, 0, sizeof(fs));
- if (dump) {
+ if (dump_asm)
strncpy(fs, "+DumpCode", FS_STRING_LEN);
- }
tm = LLVMCreateTargetMachine(target, triple, cpu, fs,
LLVMCodeGenLevelDefault, LLVMRelocDefault,
LLVMCodeModelDefault);
dispose_tm = true;
}
- if (dump) {
+ if (dump_ir)
LLVMDumpModule(M);
- }
/* Setup Diagnostic Handler*/
llvm_ctx = LLVMGetModuleContext(M);