projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aef1ba5
)
iris: allow binding a null vertex buffer
author
Kenneth Graunke
<kenneth@whitecape.org>
Fri, 2 Nov 2018 21:54:35 +0000
(14:54 -0700)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:09 +0000
(10:26 -0800)
PBO upload apparently does this...
src/gallium/drivers/iris/iris_state.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/iris/iris_state.c
b/src/gallium/drivers/iris/iris_state.c
index 859c96717bcddc650e0c38c7b21addf06c44f4c9..12741c7a899dd484e1f637efa9e552519dd25e50 100644
(file)
--- 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);