aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_blit.c
diff options
context:
space:
mode:
authorChris Lord <[email protected]>2020-02-28 15:18:14 +0000
committerMarge Bot <[email protected]>2020-03-03 19:06:03 +0000
commit291f40a4991a7fe6d6091051421290c585bb63a8 (patch)
tree67123f58f11089d02287acafc3d63708f884290a /src/gallium/drivers/vc4/vc4_blit.c
parent2d1ba8638219c6c9b0aa370b12ca91c6e4b7844d (diff)
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 <[email protected]> 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>
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_blit.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_blit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_blit.c b/src/gallium/drivers/vc4/vc4_blit.c
index 93b1478ddd1..4e4c4898ea8 100644
--- a/src/gallium/drivers/vc4/vc4_blit.c
+++ b/src/gallium/drivers/vc4/vc4_blit.c
@@ -165,6 +165,8 @@ vc4_tile_blit(struct pipe_context *pctx, const struct pipe_blit_info *info)
void
vc4_blitter_save(struct vc4_context *vc4)
{
+ util_blitter_save_fragment_constant_buffer_slot(vc4->blitter,
+ vc4->constbuf[PIPE_SHADER_FRAGMENT].cb);
util_blitter_save_vertex_buffer_slot(vc4->blitter, vc4->vertexbuf.vb);
util_blitter_save_vertex_elements(vc4->blitter, vc4->vtx);
util_blitter_save_vertex_shader(vc4->blitter, vc4->prog.bind_vs);