wined3d: Drop redundant check for instanced rendering from drawStridedFast.

We need GL_ARB_instanced_arrays to be able to take the fastest path and
that's already checked in draw_primitive.  Note that
GL_ARB_instanced_arrays provides glDrawElementsInstanced if
GL_ARB_draw_instanced is not supported so we don't need to explicitly
check for the latter.
This commit is contained in:
Matteo Bruni 2015-02-27 13:18:22 +01:00 committed by Alexandre Julliard
parent 8ed9c2a11b
commit db80aba5ad
1 changed files with 9 additions and 16 deletions

View File

@ -44,26 +44,19 @@ static void drawStridedFast(const struct wined3d_gl_info *gl_info, GLenum primit
GLenum idxtype = idx_size == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT;
if (instance_count)
{
if (!gl_info->supported[ARB_DRAW_INSTANCED] && !gl_info->supported[ARB_INSTANCED_ARRAYS])
if (start_instance)
FIXME("Start instance (%u) not supported.\n", start_instance);
if (gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX])
{
FIXME("Instanced drawing not supported.\n");
GL_EXTCALL(glDrawElementsInstancedBaseVertex(primitive_type, count, idxtype,
(const char *)idx_data + (idx_size * start_idx), instance_count, base_vertex_index));
checkGLcall("glDrawElementsInstancedBaseVertex");
}
else
{
if (start_instance)
FIXME("Start instance (%u) not supported.\n", start_instance);
if (gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX])
{
GL_EXTCALL(glDrawElementsInstancedBaseVertex(primitive_type, count, idxtype,
(const char *)idx_data + (idx_size * start_idx), instance_count, base_vertex_index));
checkGLcall("glDrawElementsInstancedBaseVertex");
}
else
{
GL_EXTCALL(glDrawElementsInstanced(primitive_type, count, idxtype,
(const char *)idx_data + (idx_size * start_idx), instance_count));
checkGLcall("glDrawElementsInstanced");
}
GL_EXTCALL(glDrawElementsInstanced(primitive_type, count, idxtype,
(const char *)idx_data + (idx_size * start_idx), instance_count));
checkGLcall("glDrawElementsInstanced");
}
}
else if (gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX])