virgl: Submit drawid_offset if is not zero

This is needed in the case of multi-draw to evaluate the right gl_DrawID
in the shader.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23196>
This commit is contained in:
Gert Wollny
2023-05-24 17:44:07 +02:00
committed by Marge Bot
parent d4fc359748
commit 9ce5fa758d

View File

@@ -786,7 +786,7 @@ int virgl_encoder_draw_vbo(struct virgl_context *ctx,
const struct pipe_draw_start_count_bias *draw)
{
uint32_t length = VIRGL_DRAW_VBO_SIZE;
if (info->mode == PIPE_PRIM_PATCHES)
if (info->mode == PIPE_PRIM_PATCHES || drawid_offset > 0)
length = VIRGL_DRAW_VBO_SIZE_TESS;
if (indirect && indirect->buffer)
length = VIRGL_DRAW_VBO_SIZE_INDIRECT;