From 4552fd50d959ab99546cfa994f8ba5bdf5d66bc7 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 24 Apr 2012 20:58:47 +0200 Subject: gallium: add void *user_buffer in pipe_vertex_buffer This reduces CPU overhead in st_draw_vbo and removes a lot of unnecessary code in that function which was required only to comply with the gallium interface, but wasn't any useful really. Adapted drivers: i915, llvmpipe, r300, softpipe. No changes required in: r600, radeonsi. User vertex buffers have been disabled in nv30, nv50, nvc0 and svga to keep things working. --- src/gallium/auxiliary/util/u_draw.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/auxiliary/util/u_draw.c') diff --git a/src/gallium/auxiliary/util/u_draw.c b/src/gallium/auxiliary/util/u_draw.c index d16575b7340..1f3eb887959 100644 --- a/src/gallium/auxiliary/util/u_draw.c +++ b/src/gallium/auxiliary/util/u_draw.c @@ -62,6 +62,10 @@ util_draw_max_index( const struct util_format_description *format_desc; unsigned format_size; + if (!buffer->buffer) { + continue; + } + assert(buffer->buffer->height0 == 1); assert(buffer->buffer->depth0 == 1); buffer_size = buffer->buffer->width0; -- cgit v1.2.3