mesa: Add asserts into emit_fog_instructions
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Thu, 19 Dec 2013 12:27:00 +0000 (05:27 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 19 Dec 2013 15:25:58 +0000 (08:25 -0700)
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/ff_fragment_shader.cpp

index 16715f635cb5d2182306a2aba8490289a4e7e08e..6e91697a1b134ba239912fc4c749f43e78c7f1c7 100644 (file)
@@ -1159,8 +1159,11 @@ emit_fog_instructions(texenv_fragment_program *p,
    fragcolor = swizzle_xyz(fog_result);
 
    oparams = p->shader->symbols->get_variable("gl_FogParamsOptimizedMESA");
+   assert(oparams);
    fogcoord = p->shader->symbols->get_variable("gl_FogFragCoord");
+   assert(fogcoord);
    params = p->shader->symbols->get_variable("gl_Fog");
+   assert(params);
    f = new(p->mem_ctx) ir_dereference_variable(fogcoord);
 
    ir_variable *f_var = p->make_temp(glsl_type::float_type, "fog_factor");