[Mesa-dev] [PATCH] gallium/radeon: Only print a message for LLVM diagnostic errors
Tom Stellard
thomas.stellard at amd.com
Wed Jun 18 14:00:40 PDT 2014
We were printing messages for all diagnostic types, which was
spamming the console for some OpenCL programs.
---
src/gallium/drivers/radeon/radeon_llvm_emit.c | 6 ++++--
1 file 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 891781f..6a394b2 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
--
1.8.1.5
More information about the mesa-dev
mailing list