From: Shuang He Date: Wed, 15 Dec 2010 03:16:49 +0000 (+0800) Subject: i915: Fix INTEL_DEBUG=wm segmentation fault X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2bd11ea11921bcd180b354342a8786c5b7ddd6b3;p=mesa.git i915: Fix INTEL_DEBUG=wm segmentation fault The program should be disassembled after it's uploaded --- diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 7a9fb7f088b..1c6e9845172 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -1162,11 +1162,6 @@ translate_program(struct i915_fragment_program *p) fixup_depth_write(p); i915_fini_program(p); - if (INTEL_DEBUG & DEBUG_WM) { - printf("i915:\n"); - i915_disassemble_program(i915->state.Program, i915->state.ProgramSize); - } - p->translated = 1; } @@ -1427,6 +1422,11 @@ i915ValidateFragmentProgram(struct i915_context *i915) if (!p->on_hardware) i915_upload_program(i915, p); + + if (INTEL_DEBUG & DEBUG_WM) { + printf("i915:\n"); + i915_disassemble_program(i915->state.Program, i915->state.ProgramSize); + } } void