diff options
author | Kenneth Graunke <[email protected]> | 2018-11-02 14:54:35 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:09 -0800 |
commit | 317ba8796f5572e657c0bfae643c2e2917157c7c (patch) | |
tree | 77c5bb39f3e3ff0931a0840a5cd01035e6103416 /src/gallium | |
parent | aef1ba5ce4fe2c2359d2927f209107853440bb5a (diff) |
iris: allow binding a null vertex buffer
PBO upload apparently does this...
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 859c96717bc..12741c7a899 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2259,9 +2259,13 @@ iris_set_vertex_buffers(struct pipe_context *ctx, vb.MOCS = MOCS_WB; vb.AddressModifyEnable = true; vb.BufferPitch = buffers[i].stride; - vb.BufferSize = res->bo->size; - vb.BufferStartingAddress = - ro_bo(NULL, res->bo->gtt_offset + buffers[i].buffer_offset); + if (res) { + vb.BufferSize = res->bo->size; + vb.BufferStartingAddress = + ro_bo(NULL, res->bo->gtt_offset + buffers[i].buffer_offset); + } else { + vb.NullVertexBuffer = true; + } } vb_pack_dest += GENX(VERTEX_BUFFER_STATE_length); |