etnaviv: fix 16bpp clears
authorLucas Stach <l.stach@pengutronix.de>
Fri, 22 Sep 2017 09:24:08 +0000 (11:24 +0200)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Fri, 22 Sep 2017 18:48:32 +0000 (20:48 +0200)
commite9d37d68cff2ac871d8e32a947173898683c0af3
tree3dd546f1dcdd7935693160b51a2ee1d196b394b4
parent066d1dc951d3a0833de6abd8e004bf467e6e50eb
etnaviv: fix 16bpp clears

util_pack_color may leave undefined values in the upper half of the packed
integer. As our hardware needs the upper 16 bits to mirror the lower 16bits,
this breaks clears of those formats if the undefined values aren't masked off.

I've only observed the issue with R5G6B5_UNORM surfaces, other 16bpp
formats seem to work fine.

Fixes: d6aa2ba2b2 (etnaviv: replace translate_clear_color with util_pack_color)
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_clear_blit.c