From: Dave Airlie Date: Wed, 7 Nov 2018 01:49:04 +0000 (+1000) Subject: iris: fix crash in sparse vertex array X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ed016b2a0b77a3fa36735c693108cadba07d8917;p=mesa.git iris: fix crash in sparse vertex array this fixes crash in array-stride piglit. --- diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 06e3e8eacc5..c0173e45d96 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -4208,7 +4208,8 @@ iris_upload_dirty_render_state(struct iris_context *ice, for (unsigned i = 0; i < cso->num_buffers; i++) { struct iris_resource *res = (void *) cso->resources[i]; - iris_use_pinned_bo(batch, res->bo, false); + if (res) + iris_use_pinned_bo(batch, res->bo, false); } } }