diff options
author | Kenneth Graunke <[email protected]> | 2019-01-06 20:22:15 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:11 -0800 |
commit | 732c3a90a409aa5972c70f5ea333cbecec508c41 (patch) | |
tree | 9def7d55262fc94a30aa48d39de4db0b7f0b7469 /src/gallium | |
parent | 4bfd12bbf7767d92b8679ec964542667b873711d (diff) |
iris: Fix bug in bound vertex buffer tracking
res might be NULL, at which point this is an unbind.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index b12a77885bf..e7801a698dc 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2462,13 +2462,13 @@ iris_set_vertex_buffers(struct pipe_context *ctx, assert(!buffer->is_user_buffer); - ice->state.bound_vertex_buffers |= 1ull << (start_slot + i); - pipe_resource_reference(&state->resource, buffer->buffer.resource); struct iris_resource *res = (void *) state->resource; - if (res) + if (res) { + ice->state.bound_vertex_buffers |= 1ull << (start_slot + i); res->bind_history |= PIPE_BIND_VERTEX_BUFFER; + } iris_pack_state(GENX(VERTEX_BUFFER_STATE), state->state, vb) { vb.VertexBufferIndex = start_slot + i; |