mesa/src
Brian Paul f6d4e20d10 vbo: reduce number of vertex buffer mappings for vertex attributes
Whenever we got a glColor, glNormal, glTexCoord, etc. call outside a
glBegin/End pair, we'd immediately map a vertex buffer to begin
accumulating vertex data.  In some cases, such as with display lists,
this led to excessive vertex buffer mapping.  For example, if we have
a display list such as:

glNewList(42, GL_COMPILE);
glBegin(prim);
glVertex2f();
...
glVertex2f();
glEnd();
glEndList();

Then did:

glColor3f();
glCallList(42);

We'd map a vertex buffer as soon as we saw glColor3f but we'd never
actually write anything to it.  Note that the vertex position data
was put into a vertex buffer during display list compilation.

With this change, we delay mapping the vertex buffer until we actually
have a vertex to write to it (triggered by a glVertex() call).  In the
above case, we no longer map a vertex buffer when setting the color and
calling the list.

For drivers such as VMware's, reducing buffer mappings gives improved
performance.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-10-20 12:52:40 -06:00
..
egl egl/dri2: Properly dereference array. 2015-10-07 11:48:49 -07:00
gallium gallium: add PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT 2015-10-20 18:27:11 +02:00
gbm gbm: convert gbm bo format to fourcc format on dma-buf import 2015-09-15 12:27:45 +01:00
getopt
glsl mesa: replace UsesClipDistance with ClipDistanceArraySize 2015-10-20 12:58:25 +02:00
glx glx: Drop CRAY support. 2015-10-05 14:34:16 -07:00
gtest mesa: Enable subdir-objects globally. 2015-06-26 12:55:25 +01:00
hgl glapi/hgl: Drop extern "C" as it was added to glapi 2015-05-13 15:26:29 -04:00
loader loader: use HAVE_LIBDRM instead of ! __NOT_HAVE_DRM_H 2015-07-22 16:35:25 +01:00
mapi glapi: add function pointers for KHR_debug for gles 2015-10-07 15:07:01 +01:00
mesa vbo: reduce number of vertex buffer mappings for vertex attributes 2015-10-20 12:52:40 -06:00
util glsl: move half<->float convertion to util 2015-10-16 19:33:37 -04:00
Makefile.am glsl: move shader_enums into nir 2015-10-09 15:03:28 -04:00
SConscript scons: rework the EGL build 2015-07-22 16:35:27 +01:00