diff options
author | marha <marha@users.sourceforge.net> | 2014-10-01 23:12:13 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-10-01 23:12:13 +0200 |
commit | 88236adfe3eb41b8368b4c9ecf3e09a7199dc474 (patch) | |
tree | 6acb3f7ad3c60c4605551245df9c321b5fb22c3b /mesalib/src/mesa/vbo | |
parent | e4086b3defb6186a2fb8a5845968c97e613fb493 (diff) | |
parent | 30eb28e89e513ba7c04e8424be0cba326a01882b (diff) | |
download | vcxsrv-88236adfe3eb41b8368b4c9ecf3e09a7199dc474.tar.gz vcxsrv-88236adfe3eb41b8368b4c9ecf3e09a7199dc474.tar.bz2 vcxsrv-88236adfe3eb41b8368b4c9ecf3e09a7199dc474.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/hw/xwin/InitOutput.c
xorg-server/hw/xwin/win.h
xorg-server/hw/xwin/winclipboard/internal.h
xorg-server/hw/xwin/winclipboard/thread.c
xorg-server/hw/xwin/winclipboard/wndproc.c
xorg-server/hw/xwin/winclipboard/xevents.c
xorg-server/hw/xwin/winclipboardinit.c
xorg-server/hw/xwin/winclipboardwrappers.c
xorg-server/hw/xwin/winglobals.c
Diffstat (limited to 'mesalib/src/mesa/vbo')
-rw-r--r-- | mesalib/src/mesa/vbo/vbo_exec_api.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/vbo/vbo_exec_array.c | 46 | ||||
-rw-r--r-- | mesalib/src/mesa/vbo/vbo_primitive_restart.c | 4 |
3 files changed, 9 insertions, 43 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_exec_api.c b/mesalib/src/mesa/vbo/vbo_exec_api.c index 74aec127c..2871100ae 100644 --- a/mesalib/src/mesa/vbo/vbo_exec_api.c +++ b/mesalib/src/mesa/vbo/vbo_exec_api.c @@ -1067,7 +1067,7 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec ) struct gl_client_array *array; array = &arrays[VERT_ATTRIB_FF(i)]; array->BufferObj = NULL; - _mesa_reference_buffer_object(ctx, &arrays->BufferObj, + _mesa_reference_buffer_object(ctx, &array->BufferObj, vbo->currval[VBO_ATTRIB_POS+i].BufferObj); } diff --git a/mesalib/src/mesa/vbo/vbo_exec_array.c b/mesalib/src/mesa/vbo/vbo_exec_array.c index 111321bd7..045dbb506 100644 --- a/mesalib/src/mesa/vbo/vbo_exec_array.c +++ b/mesalib/src/mesa/vbo/vbo_exec_array.c @@ -562,38 +562,6 @@ vbo_bind_arrays(struct gl_context *ctx) } } - -/** - * Handle a draw case that potentially has primitive restart enabled. - * - * If primitive restart is enabled, and PrimitiveRestartInSoftware is - * set, then vbo_sw_primitive_restart is used to handle the primitive - * restart case in software. - */ -static void -vbo_handle_primitive_restart(struct gl_context *ctx, - const struct _mesa_prim *prim, - GLuint nr_prims, - const struct _mesa_index_buffer *ib, - GLboolean index_bounds_valid, - GLuint min_index, - GLuint max_index) -{ - struct vbo_context *vbo = vbo_context(ctx); - - if (ctx->Const.PrimitiveRestartInSoftware && - ctx->Array._PrimitiveRestart && - (ib != NULL)) { - /* Handle primitive restart in software */ - vbo_sw_primitive_restart(ctx, prim, nr_prims, ib, NULL); - } else { - /* Call driver directly for draw_prims */ - vbo->draw_prims(ctx, prim, nr_prims, ib, - index_bounds_valid, min_index, max_index, NULL, NULL); - } -} - - /** * Helper function called by the other DrawArrays() functions below. * This is where we handle primitive restart for drawing non-indexed @@ -1011,8 +979,8 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode, */ check_buffers_are_unmapped(exec->array.inputs); - vbo_handle_primitive_restart(ctx, prim, 1, &ib, - index_bounds_valid, start, end); + vbo->draw_prims(ctx, prim, 1, &ib, + index_bounds_valid, start, end, NULL, NULL); if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) { _mesa_flush(ctx); @@ -1372,8 +1340,8 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode, } check_buffers_are_unmapped(exec->array.inputs); - vbo_handle_primitive_restart(ctx, prim, primcount, &ib, - GL_FALSE, ~0, ~0); + vbo->draw_prims(ctx, prim, primcount, &ib, + false, ~0, ~0, NULL, NULL); } else { /* render one prim at a time */ for (i = 0; i < primcount; i++) { @@ -1401,8 +1369,8 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode, prim[0].basevertex = 0; check_buffers_are_unmapped(exec->array.inputs); - vbo_handle_primitive_restart(ctx, prim, 1, &ib, - GL_FALSE, ~0, ~0); + vbo->draw_prims(ctx, prim, 1, &ib, + false, ~0, ~0, NULL, NULL); } } @@ -1464,8 +1432,6 @@ vbo_draw_transform_feedback(struct gl_context *ctx, GLenum mode, if (ctx->Driver.GetTransformFeedbackVertexCount && (ctx->Const.AlwaysUseGetTransformFeedbackVertexCount || - (ctx->Const.PrimitiveRestartInSoftware && - ctx->Array._PrimitiveRestart) || !vbo_all_varyings_in_vbos(exec->array.inputs))) { GLsizei n = ctx->Driver.GetTransformFeedbackVertexCount(ctx, obj, stream); vbo_draw_arrays(ctx, mode, 0, n, numInstances, 0); diff --git a/mesalib/src/mesa/vbo/vbo_primitive_restart.c b/mesalib/src/mesa/vbo/vbo_primitive_restart.c index 25c89669c..562dedcd5 100644 --- a/mesalib/src/mesa/vbo/vbo_primitive_restart.c +++ b/mesalib/src/mesa/vbo/vbo_primitive_restart.c @@ -41,8 +41,8 @@ /* * Notes on primitive restart: - * The code below is used when the driver does not support primitive - * restart itself. (ctx->Const.PrimitiveRestartInSoftware == GL_TRUE) + * The code below is used when the driver does not fully support primitive + * restart (for example, if it only does restart index of ~0). * * We map the index buffer, find the restart indexes, unmap * the index buffer then draw the sub-primitives delineated by the restarts. |