It's legal to have a stride less than the num of parameters,
in this case no need to try and over map the buffer which asserts
Fixes:
GTF-GL45.gtf43.GL3Tests.multi_draw_indirect.multi_draw_indirect_stride
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
struct pipe_draw_info info;
struct pipe_transfer *transfer;
uint32_t *params;
- const unsigned num_params = info_in->index_size ? 5 : 4;
+ unsigned num_params = info_in->index_size ? 5 : 4;
assert(info_in->indirect);
assert(!info_in->count_from_stream_output);
pipe_buffer_unmap(pipe, dc_transfer);
}
+ if (info_in->indirect->stride)
+ num_params = MIN2(info_in->indirect->stride / 4, num_params);
params = (uint32_t *)
pipe_buffer_map_range(pipe,
info_in->indirect->buffer,