xa: add missing stride setup in renderer_draw_yuv

This fixes a problem observed in VMware VMs where Xv playback results in
a black screen instead of the actual video.

Signed-off-by: Doug Brown <doug@schmorgal.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11490
Fixes: 7672545223 ("gallium: move vertex stride to CSO")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30116>
This commit is contained in:
Doug Brown
2024-07-10 19:19:10 -07:00
committed by Marge Bot
parent 1ced840632
commit 60488d6213
+2
View File
@@ -529,6 +529,8 @@ renderer_draw_yuv(struct xa_context *r,
struct cso_velems_state velems;
velems.count = num_attribs;
memcpy(velems.velems, r->velems, sizeof(r->velems[0]) * velems.count);
for (unsigned i = 0; i < velems.count; i++)
velems.velems[i].src_stride = velems.count * 4 * sizeof(float);
cso_set_vertex_elements(r->cso, &velems);
util_draw_user_vertex_buffer(r->cso, r->buffer, MESA_PRIM_QUADS,