diff options
author | marha <marha@users.sourceforge.net> | 2012-04-30 11:11:16 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-04-30 11:11:16 +0200 |
commit | 0f0386d4e90cb0769eddc04b18742d5a9a72ea05 (patch) | |
tree | a8a5fb11e78c4afe6637c5adfa0d2224208f7314 /mesalib/src/mesa/vbo/vbo_exec_array.c | |
parent | cd27f58626705bcb561115b8e5b0d1430df83fa6 (diff) | |
parent | 762b7fde3d57d3a151f98535fd31516b7e823bc0 (diff) | |
download | vcxsrv-0f0386d4e90cb0769eddc04b18742d5a9a72ea05.tar.gz vcxsrv-0f0386d4e90cb0769eddc04b18742d5a9a72ea05.tar.bz2 vcxsrv-0f0386d4e90cb0769eddc04b18742d5a9a72ea05.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
pixman/pixman/pixman-mmx.c
xorg-server/glx/glapi_gentable.c
Diffstat (limited to 'mesalib/src/mesa/vbo/vbo_exec_array.c')
-rw-r--r-- | mesalib/src/mesa/vbo/vbo_exec_array.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_exec_array.c b/mesalib/src/mesa/vbo/vbo_exec_array.c index f95e062fb..2dcfb8e5b 100644 --- a/mesalib/src/mesa/vbo/vbo_exec_array.c +++ b/mesalib/src/mesa/vbo/vbo_exec_array.c @@ -438,14 +438,6 @@ recalculate_input_bindings(struct gl_context *ctx) inputs[VERT_ATTRIB_GENERIC(i)] = &vbo->currval[VBO_ATTRIB_GENERIC0+i]; const_inputs |= VERT_BIT_GENERIC(i); } - - /* There is no need to make _NEW_ARRAY dirty here for the TnL program, - * because it already takes care of invalidating the state necessary - * to revalidate vertex arrays. Not marking the state as dirty also - * improves performance (quite significantly in some apps). - */ - if (!ctx->VertexProgram._MaintainTnlProgram) - ctx->NewState |= _NEW_ARRAY; break; case VP_NV: @@ -472,8 +464,6 @@ recalculate_input_bindings(struct gl_context *ctx) inputs[VERT_ATTRIB_GENERIC(i)] = &vbo->currval[VBO_ATTRIB_GENERIC0+i]; const_inputs |= VERT_BIT_GENERIC(i); } - - ctx->NewState |= _NEW_ARRAY; break; case VP_ARB: @@ -512,11 +502,11 @@ recalculate_input_bindings(struct gl_context *ctx) } inputs[VERT_ATTRIB_GENERIC0] = inputs[0]; - ctx->NewState |= _NEW_ARRAY; break; } _mesa_set_varying_vp_inputs( ctx, VERT_BIT_ALL & (~const_inputs) ); + ctx->Driver.UpdateState(ctx, _NEW_ARRAY); } @@ -640,11 +630,11 @@ vbo_exec_DrawArrays(GLenum mode, GLint start, GLsizei count) _mesa_debug(ctx, "glDrawArrays(%s, %d, %d)\n", _mesa_lookup_enum_by_nr(mode), start, count); + FLUSH_CURRENT(ctx, 0); + if (!_mesa_validate_DrawArrays( ctx, mode, start, count )) return; - FLUSH_CURRENT( ctx, 0 ); - if (0) check_draw_arrays_data(ctx, start, count); @@ -669,11 +659,11 @@ vbo_exec_DrawArraysInstanced(GLenum mode, GLint start, GLsizei count, _mesa_debug(ctx, "glDrawArraysInstanced(%s, %d, %d, %d)\n", _mesa_lookup_enum_by_nr(mode), start, count, numInstances); + FLUSH_CURRENT(ctx, 0); + if (!_mesa_validate_DrawArraysInstanced(ctx, mode, start, count, numInstances)) return; - FLUSH_CURRENT( ctx, 0 ); - if (0) check_draw_arrays_data(ctx, start, count); @@ -761,8 +751,6 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode, struct _mesa_index_buffer ib; struct _mesa_prim prim[1]; - FLUSH_CURRENT( ctx, 0 ); - vbo_bind_arrays(ctx); ib.count = count; @@ -838,6 +826,8 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, _mesa_lookup_enum_by_nr(mode), start, end, count, _mesa_lookup_enum_by_nr(type), indices, basevertex); + FLUSH_CURRENT(ctx, 0); + if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count, type, indices, basevertex )) return; @@ -936,6 +926,8 @@ vbo_exec_DrawElements(GLenum mode, GLsizei count, GLenum type, _mesa_lookup_enum_by_nr(mode), count, _mesa_lookup_enum_by_nr(type), indices); + FLUSH_CURRENT(ctx, 0); + if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices, 0 )) return; @@ -958,6 +950,8 @@ vbo_exec_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, _mesa_lookup_enum_by_nr(mode), count, _mesa_lookup_enum_by_nr(type), indices, basevertex); + FLUSH_CURRENT(ctx, 0); + if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices, basevertex )) return; @@ -981,6 +975,8 @@ vbo_exec_DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, _mesa_lookup_enum_by_nr(mode), count, _mesa_lookup_enum_by_nr(type), indices, numInstances); + FLUSH_CURRENT(ctx, 0); + if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices, numInstances, 0)) return; @@ -1005,6 +1001,8 @@ vbo_exec_DrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type _mesa_lookup_enum_by_nr(type), indices, numInstances, basevertex); + FLUSH_CURRENT(ctx, 0); + if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices, numInstances, basevertex)) return; @@ -1037,8 +1035,6 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode, if (primcount == 0) return; - FLUSH_CURRENT( ctx, 0 ); - prim = calloc(1, primcount * sizeof(*prim)); if (prim == NULL) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glMultiDrawElements"); @@ -1226,12 +1222,12 @@ vbo_exec_DrawTransformFeedback(GLenum mode, GLuint name) _mesa_debug(ctx, "glDrawTransformFeedback(%s, %d)\n", _mesa_lookup_enum_by_nr(mode), name); + FLUSH_CURRENT(ctx, 0); + if (!_mesa_validate_DrawTransformFeedback(ctx, mode, obj)) { return; } - FLUSH_CURRENT(ctx, 0); - vbo_draw_transform_feedback(ctx, mode, obj, 1); } |