svga: fix invalid memory reference in needs_to_create_zero()
svga: fix invalid memory reference in needs_to_create_zero()

The emit->key.fkey info is only valid if we're generating a fragment shader.
We should not look at it if we're generating a vertex shader.

When generating a vertex shader, the value of emit->key.fkey.num_textures was
garbage and the loop over num_textures would read invalid data.  At best
this would cause us to emit an unused constant.  At worse, we could segfault.
Just by dumb luck, fkey.num_textures was usually a smallish integer.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <61b5a29db2c0650f7c8510f93eece059c1b09320@vmware.com>

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