nvfx: fix incorrect assert

This commit is contained in:
Luca Barbieri
2010-08-21 23:33:51 +02:00
parent 4a6eb492e8
commit 251e48c64a

View File

@@ -431,10 +431,13 @@ nvfx_vtxelts_state_create(struct pipe_context *pipe,
unsigned per_vertex_size[16]; unsigned per_vertex_size[16];
unsigned vb_compacted_index[16]; unsigned vb_compacted_index[16];
if(num_elements > 16)
{
_debug_printf("Error: application attempted to use %u vertex elements, but only 16 are supported: ignoring the rest\n");
num_elements = 16;
}
memset(per_vertex_size, 0, sizeof(per_vertex_size)); memset(per_vertex_size, 0, sizeof(per_vertex_size));
assert(num_elements < 16); /* not doing fallbacks yet */
memcpy(cso->pipe, elements, num_elements * sizeof(elements[0])); memcpy(cso->pipe, elements, num_elements * sizeof(elements[0]));
cso->num_elements = num_elements; cso->num_elements = num_elements;
cso->needs_translate = FALSE; cso->needs_translate = FALSE;