i965/fs: Fix segfault when using INTEL_DEBUG=perf with non-GLSL.
i965/fs: Fix segfault when using INTEL_DEBUG=perf with non-GLSL.

Now that ARB programs and fixed function are routed through the new
backend, shader might be NULL.  Don't do INTEL_DEBUG=perf support in
that case, since it relies on shader->compiled_once.

Since INTEL_DEBUG=perf wasn't previously supported, this maintains the
status quo.  It might be nice to support it someday, however.

This could be moved to brw_shader_program instead of brw_shader, but
it appears even prog can be NULL in that case.

Reviewed-by: Eric Anholt <96f164ad4d9b2b0dacf8ebee2bb1eeb3aa69adf1@anholt.net>
Signed-off-by: Kenneth Graunke <bd2562f754ec92342f93f61c25d731e290a2ffa8@whitecape.org>

zeux/glsl-optimizer,bkaradzic/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,benaadams/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,metora/MesaGLSLCompiler,mcanthony/glsl-optimizer,zeux/glsl-optimizer,wolf96/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,wolf96/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,mapbox/glsl-optimizer,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,djreep81/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,mapbox/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,mapbox/glsl-optimizer,metora/MesaGLSLCompiler,mapbox/glsl-optimizer,dellis1972/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,jbarczak/glsl-optimizer,bkaradzic/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,metora/MesaGLSLCompiler,tokyovigilante/glsl-optimizer,bkaradzic/glsl-optimizer,wolf96/glsl-optimizer,mapbox/glsl-optimizer,zeux/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,bkaradzic/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer