[Mesa-dev] [PATCH 2/3] Mesa: Add asserts into emit_fog_instructions
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Thu Dec 19 04:27:13 PST 2013
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
src/mesa/main/ff_fragment_shader.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index 16715f6..6e91697 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -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");
--
1.8.1.2
More information about the mesa-dev
mailing list