i915g: Log program compile errors to mesa_loge().
Now these major driver failures are no longer hidden under -DDEBUG, and would also work on android (you know, if you cared). We do want to suppress logging for u_blitter shaders that fail to compile during util_blitter_cache_all_shaders(). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11617>
This commit is contained in:
parent
7921648cd6
commit
8259ff0d22
|
@ -220,7 +220,9 @@ i915_create_context(struct pipe_screen *screen, void *priv, unsigned flags)
|
||||||
assert(i915->blitter);
|
assert(i915->blitter);
|
||||||
|
|
||||||
/* must be done before installing Draw stages */
|
/* must be done before installing Draw stages */
|
||||||
|
i915->no_log_program_errors = true;
|
||||||
util_blitter_cache_all_shaders(i915->blitter);
|
util_blitter_cache_all_shaders(i915->blitter);
|
||||||
|
i915->no_log_program_errors = false;
|
||||||
|
|
||||||
draw_install_aaline_stage(i915->draw, &i915->base);
|
draw_install_aaline_stage(i915->draw, &i915->base);
|
||||||
draw_install_aapoint_stage(i915->draw, &i915->base);
|
draw_install_aapoint_stage(i915->draw, &i915->base);
|
||||||
|
|
|
@ -295,6 +295,8 @@ struct i915_context {
|
||||||
int fired_vertices;
|
int fired_vertices;
|
||||||
int queued_vertices;
|
int queued_vertices;
|
||||||
|
|
||||||
|
bool no_log_program_errors;
|
||||||
|
|
||||||
/** blitter/hw-clear */
|
/** blitter/hw-clear */
|
||||||
struct blitter_context *blitter;
|
struct blitter_context *blitter;
|
||||||
};
|
};
|
||||||
|
|
|
@ -75,6 +75,7 @@ struct i915_fp_compile {
|
||||||
uint nr_alu_insn;
|
uint nr_alu_insn;
|
||||||
uint nr_decl_insn;
|
uint nr_decl_insn;
|
||||||
|
|
||||||
|
bool log_program_errors;
|
||||||
boolean error; /**< Set if i915_program_error() is called */
|
boolean error; /**< Set if i915_program_error() is called */
|
||||||
uint NumNativeInstructions;
|
uint NumNativeInstructions;
|
||||||
uint NumNativeAluInstructions;
|
uint NumNativeAluInstructions;
|
||||||
|
|
|
@ -107,15 +107,13 @@ i915_use_passthrough_shader(struct i915_fragment_shader *fs)
|
||||||
void
|
void
|
||||||
i915_program_error(struct i915_fp_compile *p, const char *msg, ...)
|
i915_program_error(struct i915_fp_compile *p, const char *msg, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
if (p->log_program_errors) {
|
||||||
char buffer[1024];
|
va_list args;
|
||||||
|
|
||||||
debug_printf("i915_program_error: ");
|
va_start(args, msg);
|
||||||
va_start(args, msg);
|
mesa_loge_v(msg, args);
|
||||||
vsnprintf(buffer, sizeof(buffer), msg, args);
|
va_end(args);
|
||||||
va_end(args);
|
}
|
||||||
debug_printf("%s", buffer);
|
|
||||||
debug_printf("\n");
|
|
||||||
|
|
||||||
p->error = 1;
|
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++)
|
for (i = 0; i < I915_TEX_UNITS; i++)
|
||||||
ifs->generic_mapping[i] = -1;
|
ifs->generic_mapping[i] = -1;
|
||||||
|
|
||||||
|
p->log_program_errors = !i915->no_log_program_errors;
|
||||||
|
|
||||||
p->first_instruction = TRUE;
|
p->first_instruction = TRUE;
|
||||||
|
|
||||||
p->nr_tex_indirect = 1; /* correct? */
|
p->nr_tex_indirect = 1; /* correct? */
|
||||||
|
|
Loading…
Reference in New Issue