vc4: fix vc4_yuv_blit overwriting fragment constant buffer slot 0
authorChris Lord <clord@igalia.com>
Fri, 28 Feb 2020 15:18:14 +0000 (15:18 +0000)
committerMarge Bot <eric+marge@anholt.net>
Tue, 3 Mar 2020 19:06:03 +0000 (19:06 +0000)
commit291f40a4991a7fe6d6091051421290c585bb63a8
tree67123f58f11089d02287acafc3d63708f884290a
parent2d1ba8638219c6c9b0aa370b12ca91c6e4b7844d
vc4: fix vc4_yuv_blit overwriting fragment constant buffer slot 0

vc4_yuv_blit calls util_blitter_restore_constant_buffer_state without
first calling util_blitter_save_fragment_constant_buffer_slot. This causes
subsequent crashes in vc4_write_uniforms when using fragment shaders that
reference YUV textures.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2581
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3997>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3997>
src/gallium/drivers/vc4/vc4_blit.c