virgl: make alignment smaller when uploading index user buffers
authorGurchetan Singh <gurchetansingh@chromium.org>
Thu, 3 Jan 2019 00:27:56 +0000 (16:27 -0800)
committerGert Wollny <gert.wollny@collabora.com>
Fri, 15 Feb 2019 10:19:04 +0000 (11:19 +0100)
Since we're just uploading to guest memory, let's just align to dword
size.

Fixes: e0f932 ("u_upload_mgr: pass alignment to u_upload_data manually")
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
src/gallium/drivers/virgl/virgl_context.c

index b924aa759d776f9d0d466b40a85bd49718b0297e..9a91df49fe80831e23a422c9c162d049eeb7537d 100644 (file)
@@ -724,7 +724,7 @@ static void virgl_draw_vbo(struct pipe_context *ctx,
            ib.offset = info.start * ib.index_size;
 
            if (ib.user_buffer) {
-                   u_upload_data(vctx->uploader, 0, info.count * ib.index_size, 256,
+                   u_upload_data(vctx->uploader, 0, info.count * ib.index_size, 4,
                                  ib.user_buffer, &ib.offset, &ib.buffer);
                    ib.user_buffer = NULL;
            }