if (prog)
shader = (brw_shader *) prog->_LinkedShaders[MESA_SHADER_FRAGMENT];
- if (unlikely(INTEL_DEBUG & DEBUG_WM))
+ if (unlikely(INTEL_DEBUG & DEBUG_WM) && shader->base.ir)
brw_dump_ir("fragment", prog, &shader->base, &fp->Base);
int st_index8 = -1, st_index16 = -1;
st_index = brw_get_shader_time_index(brw, prog, &c->vp->program.Base,
ST_VS);
- if (unlikely(INTEL_DEBUG & DEBUG_VS))
+ if (unlikely(INTEL_DEBUG & DEBUG_VS) && shader->base.ir)
brw_dump_ir("vertex", prog, &shader->base, &c->vp->program.Base);
if (brw->intelScreen->compiler->scalar_vs) {