From ed016b2a0b77a3fa36735c693108cadba07d8917 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 7 Nov 2018 11:49:04 +1000 Subject: [PATCH] iris: fix crash in sparse vertex array this fixes crash in array-stride piglit. --- src/gallium/drivers/iris/iris_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } } -- 2.30.2