From 9ce5fa758d30ce11974547e8e88e290337f5b292 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 24 May 2023 17:44:07 +0200 Subject: [PATCH] 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 Part-of: --- src/gallium/drivers/virgl/virgl_encode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c index 363f7ad..585a954 100644 --- a/src/gallium/drivers/virgl/virgl_encode.c +++ b/src/gallium/drivers/virgl/virgl_encode.c @@ -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; -- 2.7.4