mesa/st: fix conditional jump depends on uninitialised value
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 31 Jul 2017 12:48:27 +0000 (22:48 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 2 Aug 2017 02:55:42 +0000 (12:55 +1000)
Reported by valgrind at:
glsl_to_tgsi_visitor::visit(ir_expression*) (st_glsl_to_tgsi.cpp:1560)

When compiling the Deus Ex shaders.

Fixes: 28a5e7104 ("st/glsl_to_tgsi: handle precise modifier")
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Karol Herbst <karolherbst@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 65bd348..4d66a32 100644 (file)
@@ -4645,6 +4645,7 @@ glsl_to_tgsi_visitor::glsl_to_tgsi_visitor()
    mem_ctx = ralloc_context(NULL);
    ctx = NULL;
    prog = NULL;
+   precise = 0;
    shader_program = NULL;
    shader = NULL;
    options = NULL;