From 379a32f42ebca9feeb024633f7774661619fd62e Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 28 Jul 2011 14:09:06 -0700 Subject: linker: Make linker_{error,warning} generally available linker_warning is a new function. It's identical to linker_error except that it doesn't set LinkStatus=false and it prepends "warning: " on messages instead of "error: ". Signed-off-by: Ian Romanick Reviewed-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/glsl/linker.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/glsl/linker.cpp') diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 35d893f499e..19eb9b5ff6f 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -177,6 +177,19 @@ linker_error(gl_shader_program *prog, const char *fmt, ...) } +void +linker_warning(gl_shader_program *prog, const char *fmt, ...) +{ + va_list ap; + + ralloc_strcat(&prog->InfoLog, "error: "); + va_start(ap, fmt); + ralloc_vasprintf_append(&prog->InfoLog, fmt, ap); + va_end(ap); + +} + + void invalidate_variable_locations(gl_shader *sh, enum ir_variable_mode mode, int generic_base) -- cgit v1.2.3