projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3188107
)
st/mesa: don't draw if the bound element array buffer is not allocated
author
Marek Olšák
<marek.olsak@amd.com>
Mon, 19 Mar 2018 20:51:21 +0000
(16:51 -0400)
committer
Marek Olšák
<marek.olsak@amd.com>
Mon, 2 Apr 2018 17:10:36 +0000
(13:10 -0400)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/mesa/state_tracker/st_draw.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_draw.c
b/src/mesa/state_tracker/st_draw.c
index e9ffc18d915220b9cc4af306296c6d61b542ba5a..8011d0f25ca1c2a9a80252b135992ff83b08a665 100644
(file)
--- a/
src/mesa/state_tracker/st_draw.c
+++ b/
src/mesa/state_tracker/st_draw.c
@@
-177,6
+177,13
@@
st_draw_vbo(struct gl_context *ctx,
/* indices are in a real VBO */
info.has_user_indices = false;
info.index.resource = st_buffer_object(bufobj)->buffer;
+
+ /* Return if the bound element array buffer doesn't have any backing
+ * storage. (nothing to do)
+ */
+ if (!info.index.resource)
+ return;
+
start = pointer_to_offset(ib->ptr) / info.index_size;
} else {
/* indices are in user space memory */