projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bad107f
)
nv30: allow vertex state creation with 0 elements
author
Ilia Mirkin
<imirkin@alum.mit.edu>
Tue, 30 Jun 2015 01:58:11 +0000
(21:58 -0400)
committer
Ilia Mirkin
<imirkin@alum.mit.edu>
Tue, 30 Jun 2015 03:03:27 +0000
(23:03 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv30/nv30_vbo.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/nouveau/nv30/nv30_vbo.c
b/src/gallium/drivers/nouveau/nv30/nv30_vbo.c
index faa8812528ad65997755b44543361c0120b117d1..adea1dcb77cc66051220f2dd0ad7c5d56760fec6 100644
(file)
--- a/
src/gallium/drivers/nouveau/nv30/nv30_vbo.c
+++ b/
src/gallium/drivers/nouveau/nv30/nv30_vbo.c
@@
-202,6
+202,9
@@
nv30_vbo_validate(struct nv30_context *nv30)
return;
redefine = MAX2(vertex->num_elements, nv30->state.num_vtxelts);
+ if (redefine == 0)
+ return;
+
BEGIN_NV04(push, NV30_3D(VTXFMT(0)), redefine);
for (i = 0; i < vertex->num_elements; i++) {
@@
-254,8
+257,6
@@
nv30_vertex_state_create(struct pipe_context *pipe, unsigned num_elements,
struct translate_key transkey;
unsigned i;
- assert(num_elements);
-
so = MALLOC(sizeof(*so) + sizeof(*so->element) * num_elements);
if (!so)
return NULL;