projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dace607
)
cso: check count == 0 in cso_set_vertex_buffers
author
Marek Olšák
<marek.olsak@amd.com>
Tue, 15 May 2018 02:32:33 +0000
(22:32 -0400)
committer
Marek Olšák
<marek.olsak@amd.com>
Tue, 15 May 2018 16:36:27 +0000
(12:36 -0400)
The code didn't expect that, leading to crashes.
Fixes: 86d63b53a20a747e "gallium: remove aux_vertex_buffer_slot code"
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/auxiliary/cso_cache/cso_context.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/cso_cache/cso_context.c
b/src/gallium/auxiliary/cso_cache/cso_context.c
index e3d46f3c8deb3d91e9d0ac804b3c3adf426f0a36..2543c5ff61fa5f38ff585c57acbf6cbedca1bcf1 100644
(file)
--- a/
src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/
src/gallium/auxiliary/cso_cache/cso_context.c
@@
-1147,6
+1147,9
@@
void cso_set_vertex_buffers(struct cso_context *ctx,
{
struct u_vbuf *vbuf = ctx->vbuf;
+ if (!count)
+ return;
+
if (vbuf) {
u_vbuf_set_vertex_buffers(vbuf, start_slot, count, buffers);
return;