panfrost: Fix two uninitialized accesses in compiler
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Tue, 7 May 2019 15:28:36 +0000 (17:28 +0200)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Fri, 10 May 2019 05:37:57 +0000 (07:37 +0200)
commit554975bafa4ec17e19d90725c66feeb4e1f49d9e
tree6a327060bd62528d3ca016ba2d75bd3e3f7c240d
parent67b9c196d0a403d7252448f262627eaeff49a958
panfrost: Fix two uninitialized accesses in compiler

Valgrind was complaining of those.

NIR_PASS only sets progress to TRUE if there was progress.

nir_const_load_to_arr() only sets as many constants as components has
the instruction.

This was causing some dEQP tests to flip-flop, such as:

dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_src_color_constant_color

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Fixes: 14531d676b11 ("nir: make nir_const_value scalar")
src/gallium/drivers/panfrost/midgard/midgard_compile.c