st/mesa: don't crash when draw indirect buffer has no storage

Fixes: 22f6624ed3 - gallium: separate indirect stuff from pipe_draw_info

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13471>
This commit is contained in:
Marek Olšák 2021-10-21 15:40:20 -04:00 committed by Marge Bot
parent 2822b1345c
commit 520300ad22
1 changed files with 4 additions and 0 deletions

View File

@ -262,6 +262,10 @@ st_indirect_draw_vbo(struct gl_context *ctx,
indirect.buffer = st_buffer_object(indirect_data)->buffer;
indirect.offset = indirect_offset;
/* Viewperf2020/Maya draws with a buffer that has no storage. */
if (!indirect.buffer)
return;
if (!st->has_multi_draw_indirect) {
int i;