glsl: init gl_FragColor if zero_init=true
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 24 Apr 2020 10:17:14 +0000 (12:17 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 5 May 2020 10:26:02 +0000 (12:26 +0200)
commit84f58a08634d0ea07f557ffa5b91c9c8777a2b04
tree1cc0b9a120418fd9623f645a3251488a75aec432
parent547e81655a0b9f6d7742e25f2e353e22c3a3b393
glsl: init gl_FragColor if zero_init=true

This fixes shaders doing "gl_FragColor += ..." and doesn't hurt correct
shaders, because the zero init is discarded.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4607>
src/compiler/glsl/ast_to_hir.cpp