diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c index cbe5fe9d49e..3ad6720e2e3 100644 --- a/src/gallium/drivers/i915/i915_context.c +++ b/src/gallium/drivers/i915/i915_context.c @@ -220,7 +220,9 @@ i915_create_context(struct pipe_screen *screen, void *priv, unsigned flags) assert(i915->blitter); /* must be done before installing Draw stages */ + i915->no_log_program_errors = true; util_blitter_cache_all_shaders(i915->blitter); + i915->no_log_program_errors = false; draw_install_aaline_stage(i915->draw, &i915->base); draw_install_aapoint_stage(i915->draw, &i915->base); diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h index 385e9ca6e00..ecf7d79afdd 100644 --- a/src/gallium/drivers/i915/i915_context.h +++ b/src/gallium/drivers/i915/i915_context.h @@ -295,6 +295,8 @@ struct i915_context { int fired_vertices; int queued_vertices; + bool no_log_program_errors; + /** blitter/hw-clear */ struct blitter_context *blitter; }; diff --git a/src/gallium/drivers/i915/i915_fpc.h b/src/gallium/drivers/i915/i915_fpc.h index 59b517d8492..5ccbbc7e035 100644 --- a/src/gallium/drivers/i915/i915_fpc.h +++ b/src/gallium/drivers/i915/i915_fpc.h @@ -75,6 +75,7 @@ struct i915_fp_compile { uint nr_alu_insn; uint nr_decl_insn; + bool log_program_errors; boolean error; /**< Set if i915_program_error() is called */ uint NumNativeInstructions; uint NumNativeAluInstructions; diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c index 9f385b70a0d..6a70b630e48 100644 --- a/src/gallium/drivers/i915/i915_fpc_translate.c +++ b/src/gallium/drivers/i915/i915_fpc_translate.c @@ -107,15 +107,13 @@ i915_use_passthrough_shader(struct i915_fragment_shader *fs) void i915_program_error(struct i915_fp_compile *p, const char *msg, ...) { - va_list args; - char buffer[1024]; + if (p->log_program_errors) { + va_list args; - debug_printf("i915_program_error: "); - va_start(args, msg); - vsnprintf(buffer, sizeof(buffer), msg, args); - va_end(args); - debug_printf("%s", buffer); - debug_printf("\n"); + va_start(args, msg); + mesa_loge_v(msg, args); + va_end(args); + } p->error = 1; } @@ -943,6 +941,8 @@ i915_init_compile(struct i915_context *i915, struct i915_fragment_shader *ifs) for (i = 0; i < I915_TEX_UNITS; i++) ifs->generic_mapping[i] = -1; + p->log_program_errors = !i915->no_log_program_errors; + p->first_instruction = TRUE; p->nr_tex_indirect = 1; /* correct? */