mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 04:10:09 +01:00
mesa: don't skip draws with count == 0 or numInstances == 0
These are checked by drivers (all gallium drivers and _mesa_draw_gallium_fallback), so they are redundant here. Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798>
This commit is contained in:
parent
4975a89f38
commit
820dec3f7c
1 changed files with 8 additions and 14 deletions
|
|
@ -798,9 +798,6 @@ validate_draw_arrays(struct gl_context *ctx, const char *func,
|
|||
xfb_obj->GlesRemainingPrims -= prim_count;
|
||||
}
|
||||
|
||||
if (count == 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -826,10 +823,9 @@ _mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint fi
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (numInstances <= 0) {
|
||||
if (numInstances < 0)
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"glDrawArraysInstanced(numInstances=%d)", numInstances);
|
||||
if (numInstances < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"glDrawArraysInstanced(numInstances=%d)", numInstances);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -898,8 +894,7 @@ _mesa_validate_DrawElementsInstanced(struct gl_context *ctx,
|
|||
}
|
||||
|
||||
return validate_DrawElements_common(ctx, mode, count, type, indices,
|
||||
"glDrawElementsInstanced")
|
||||
&& (numInstances > 0);
|
||||
"glDrawElementsInstanced");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -939,11 +934,10 @@ _mesa_validate_DrawTransformFeedback(struct gl_context *ctx,
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (numInstances <= 0) {
|
||||
if (numInstances < 0)
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"glDrawTransformFeedback*Instanced(numInstances=%d)",
|
||||
numInstances);
|
||||
if (numInstances < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"glDrawTransformFeedback*Instanced(numInstances=%d)",
|
||||
numInstances);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue