From a640b7233c10e256f0e1e5ee9ef605b8bc0837cb Mon Sep 17 00:00:00 2001 From: Patrick Lerda Date: Fri, 20 Dec 2024 18:39:36 +0100 Subject: [PATCH] r600: index_bias should be forced to zero for all indirect draw calls The previous fix 0cae8d372e64 is the right way to proceed, but it should also apply when index_size is non-zero. This change was tested on palm and cayman. Here is the test fixed: spec/arb_multi_draw_indirect/arb_draw_elements_base_vertex-multidrawelements -indirect: fail pass Fixes: 0cae8d372e64 ("r600: don't set an index_bias for indirect draw calls") Signed-off-by: Patrick Lerda Reviewed-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/r600_state_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 2d6a13e0a90..e458cd0c803 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -2277,7 +2277,7 @@ static void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info index_offset -= start_offset; has_user_indices = false; } - index_bias = draws->index_bias; + index_bias = unlikely(indirect) ? 0 : draws->index_bias; } else { index_bias = indirect ? 0 : draws[0].start; }