diff options
author | Kenneth Graunke <[email protected]> | 2019-03-18 00:51:18 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-03-18 01:39:43 -0700 |
commit | d5974aeeae3d505114a6aa6b51b0c45c17e1baec (patch) | |
tree | 37ae6f20c091f5b7ed9a89b61c404e5ce3d607e1 /src | |
parent | 836b47ca4e867f4df80e1559b4c9be2c881356ca (diff) |
iris: Slightly better bounds on buffer sizes
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index f96c57a1e1e..eaa40d33fdf 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2623,7 +2623,7 @@ iris_set_vertex_buffers(struct pipe_context *ctx, vb.AddressModifyEnable = true; vb.BufferPitch = buffer->stride; if (res) { - vb.BufferSize = res->bo->size; + vb.BufferSize = res->bo->size - (int) buffer->buffer_offset; vb.BufferStartingAddress = ro_bo(NULL, res->bo->gtt_offset + (int) buffer->buffer_offset); vb.MOCS = mocs(res->bo); @@ -4947,7 +4947,7 @@ iris_upload_render_state(struct iris_context *ice, iris_emit_cmd(batch, GENX(3DSTATE_INDEX_BUFFER), ib) { ib.IndexFormat = draw->index_size >> 1; ib.MOCS = mocs(bo); - ib.BufferSize = bo->size; + ib.BufferSize = bo->size - offset; ib.BufferStartingAddress = ro_bo(bo, offset); } |