summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2014-06-18 16:58:33 -0400
committerTom Stellard <[email protected]>2014-07-02 15:15:13 -0400
commit9e5beac236a3c12b4868f61da719726680975570 (patch)
treec7a24a067233ea60f0d53cdabd2f857336b1206f /src/gallium/drivers
parentb9f501bc6bc52c25bef86a24b49fda4e92fcd924 (diff)
gallium/radeon: Only print a message for LLVM diagnostic errors
We were printing messages for all diagnostic types, which was spamming the console for some OpenCL programs.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeon/radeon_llvm_emit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c
index 891781f6c83..6a394b265e4 100644
--- a/src/gallium/drivers/radeon/radeon_llvm_emit.c
+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c
@@ -87,11 +87,13 @@ static void radeonDiagnosticHandler(LLVMDiagnosticInfoRef di, void *context) {
char *diaginfo_message;
diaginfo_message = LLVMGetDiagInfoDescription(di);
- fprintf(stderr,"LLVM triggered Diagnostic Handler: %s\n", diaginfo_message);
LLVMDisposeMessage(diaginfo_message);
diagnosticflag = (unsigned int *)context;
- *diagnosticflag = ((LLVMDSError == LLVMGetDiagInfoSeverity(di)) ? 1 : 0);
+ if (LLVMGetDiagInfoSeverity(di) == LLVMDSError) {
+ *diagnosticflag = 1;
+ fprintf(stderr,"LLVM triggered Diagnostic Handler: %s\n", diaginfo_message);
+ }
}
#endif