i965: Don't print the GLSL IR if it doesn't exist
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 26 Jun 2015 00:33:18 +0000 (17:33 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 26 Jun 2015 00:36:34 +0000 (17:36 -0700)
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_vec4.cpp

index 2c0ff961182cea05f8998dfeeeeab99874db5fa5..b43dafc798c3abe55f0214bffbab456874162d80 100644 (file)
@@ -4015,7 +4015,7 @@ brw_wm_fs_emit(struct brw_context *brw,
    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;
index a5c686ceaaff1666ab786a85abb7aff3db0f28a1..05f188fe1160af55bfcd9481132f8b9d4450ed1c 100644 (file)
@@ -1882,7 +1882,7 @@ brw_vs_emit(struct brw_context *brw,
       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) {