diff options
author | marha <marha@users.sourceforge.net> | 2013-08-30 15:35:17 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-08-30 15:35:17 +0200 |
commit | 5ebbc3a366287b631775ed3e17537580d380db8a (patch) | |
tree | f43c3d54e7c0e161c83288d83b22cbd7da49cc96 /mesalib/src/mesa | |
parent | 84e570d071a041f85e2e8b92963d3390d14af5fc (diff) | |
download | vcxsrv-5ebbc3a366287b631775ed3e17537580d380db8a.tar.gz vcxsrv-5ebbc3a366287b631775ed3e17537580d380db8a.tar.bz2 vcxsrv-5ebbc3a366287b631775ed3e17537580d380db8a.zip |
fontconfig mesa xserver xkeyboard-config xkbcomp git update 30 aug 2013
xserver commit 94d4e29aedc69431fa9b299ca1b67947173d7a24
xkeyboard-config commit fcb91cb1013cbdd87a6f77533f188d5934f24046
xkbcomp commit 24d18e0a844041ef82441adb16aa18cc4b4814ae
fontconfig commit 071ce44c35733e54cb477cc75810cbe55025b619
mesa commit f7217b99f243738f941a5d009c68387dfadcb50a
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r-- | mesalib/src/mesa/main/api_validate.c | 51 | ||||
-rw-r--r-- | mesalib/src/mesa/program/ir_to_mesa.cpp | 1 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 | ||||
-rw-r--r-- | mesalib/src/mesa/vbo/vbo_exec_array.c | 12 |
4 files changed, 44 insertions, 21 deletions
diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c index 243bb89d1..002992186 100644 --- a/mesalib/src/mesa/main/api_validate.c +++ b/mesalib/src/mesa/main/api_validate.c @@ -402,9 +402,8 @@ _mesa_validate_DrawElements(struct gl_context *ctx, return GL_FALSE; } - if (count <= 0) { - if (count < 0) - _mesa_error(ctx, GL_INVALID_VALUE, "glDrawElements(count)" ); + if (count < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glDrawElements(count)" ); return GL_FALSE; } @@ -436,6 +435,9 @@ _mesa_validate_DrawElements(struct gl_context *ctx, if (!check_index_bounds(ctx, count, type, indices, basevertex)) return GL_FALSE; + if (count == 0) + return GL_FALSE; + return GL_TRUE; } @@ -456,10 +458,9 @@ _mesa_validate_MultiDrawElements(struct gl_context *ctx, FLUSH_CURRENT(ctx, 0); for (i = 0; i < primcount; i++) { - if (count[i] <= 0) { - if (count[i] < 0) - _mesa_error(ctx, GL_INVALID_VALUE, - "glMultiDrawElements(count)" ); + if (count[i] < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glMultiDrawElements(count)" ); return GL_FALSE; } } @@ -531,9 +532,8 @@ _mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode, return GL_FALSE; } - if (count <= 0) { - if (count < 0) - _mesa_error(ctx, GL_INVALID_VALUE, "glDrawRangeElements(count)" ); + if (count < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glDrawRangeElements(count)" ); return GL_FALSE; } @@ -570,6 +570,9 @@ _mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode, if (!check_index_bounds(ctx, count, type, indices, basevertex)) return GL_FALSE; + if (count == 0) + return GL_FALSE; + return GL_TRUE; } @@ -587,9 +590,8 @@ _mesa_validate_DrawArrays(struct gl_context *ctx, = ctx->TransformFeedback.CurrentObject; FLUSH_CURRENT(ctx, 0); - if (count <= 0) { - if (count < 0) - _mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" ); + if (count < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" ); return GL_FALSE; } @@ -628,6 +630,9 @@ _mesa_validate_DrawArrays(struct gl_context *ctx, xfb_obj->GlesRemainingPrims -= prim_count; } + if (count == 0) + return GL_FALSE; + return GL_TRUE; } @@ -640,10 +645,9 @@ _mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint fi = ctx->TransformFeedback.CurrentObject; FLUSH_CURRENT(ctx, 0); - if (count <= 0) { - if (count < 0) - _mesa_error(ctx, GL_INVALID_VALUE, - "glDrawArraysInstanced(count=%d)", count); + if (count < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glDrawArraysInstanced(count=%d)", count); return GL_FALSE; } @@ -696,6 +700,9 @@ _mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint fi xfb_obj->GlesRemainingPrims -= prim_count; } + if (count == 0) + return GL_FALSE; + return GL_TRUE; } @@ -721,10 +728,9 @@ _mesa_validate_DrawElementsInstanced(struct gl_context *ctx, return GL_FALSE; } - if (count <= 0) { - if (count < 0) - _mesa_error(ctx, GL_INVALID_VALUE, - "glDrawElementsInstanced(count=%d)", count); + if (count < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glDrawElementsInstanced(count=%d)", count); return GL_FALSE; } @@ -761,6 +767,9 @@ _mesa_validate_DrawElementsInstanced(struct gl_context *ctx, return GL_FALSE; } + if (count == 0) + return GL_FALSE; + if (!check_index_bounds(ctx, count, type, indices, basevertex)) return GL_FALSE; diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp index f612f41ba..340a4497f 100644 --- a/mesalib/src/mesa/program/ir_to_mesa.cpp +++ b/mesalib/src/mesa/program/ir_to_mesa.cpp @@ -1492,6 +1492,7 @@ ir_to_mesa_visitor::visit(ir_expression *ir) case ir_binop_vector_extract: case ir_binop_bfm: + case ir_triop_fma: case ir_triop_bfi: case ir_triop_bitfield_extract: case ir_triop_vector_insert: diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 4e29e4500..37779d4e5 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -1972,6 +1972,7 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) case ir_unop_find_msb: case ir_unop_find_lsb: case ir_binop_bfm: + case ir_triop_fma: case ir_triop_bfi: case ir_triop_bitfield_extract: case ir_quadop_bitfield_insert: diff --git a/mesalib/src/mesa/vbo/vbo_exec_array.c b/mesalib/src/mesa/vbo/vbo_exec_array.c index bd05cd0c3..1670409d4 100644 --- a/mesalib/src/mesa/vbo/vbo_exec_array.c +++ b/mesalib/src/mesa/vbo/vbo_exec_array.c @@ -1334,6 +1334,16 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode, } } + /* Draw primitives individually if one count is zero, so we can easily skip + * that primitive. + */ + for (i = 0; i < primcount; i++) { + if (count[i] == 0) { + fallback = GL_TRUE; + break; + } + } + /* If the index buffer isn't in a VBO, then treating the application's * subranges of the index buffer as one large index buffer may lead to * us reading unmapped memory. @@ -1370,6 +1380,8 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode, } else { /* render one prim at a time */ for (i = 0; i < primcount; i++) { + if (count[i] == 0) + continue; ib.count = count[i]; ib.type = type; ib.obj = ctx->Array.ArrayObj->ElementArrayBufferObj; |