From 8fcb024047d955aeed7557de353c7fae913afc17 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 17 May 2023 12:05:20 +1000 Subject: [PATCH] llvmpipe/cs: add multiple stride indirect to fill_grid_info. mesh shaders needs to iterate across multiple indirect draws Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/drivers/llvmpipe/lp_state_cs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_cs.c b/src/gallium/drivers/llvmpipe/lp_state_cs.c index 071538f..8e78386 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_cs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_cs.c @@ -1835,6 +1835,7 @@ cs_exec_fn(void *init_data, int iter_idx, struct lp_cs_local_mem *lmem) static void fill_grid_size(struct pipe_context *pipe, + int idx, const struct pipe_grid_info *info, uint32_t grid_size[3]) { @@ -1847,7 +1848,7 @@ fill_grid_size(struct pipe_context *pipe, return; } params = pipe_buffer_map_range(pipe, info->indirect, - info->indirect_offset, + (info->indirect_stride * idx) + info->indirect_offset, 3 * sizeof(uint32_t), PIPE_MAP_READ, &transfer); @@ -1877,7 +1878,7 @@ llvmpipe_launch_grid(struct pipe_context *pipe, llvmpipe_cs_update_derived(llvmpipe, info->input); - fill_grid_size(pipe, info, job_info.grid_size); + fill_grid_size(pipe, 0, info, job_info.grid_size); job_info.grid_base[0] = info->grid_base[0]; job_info.grid_base[1] = info->grid_base[1]; -- 2.7.4