[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-patches
Subject: [PATCH 4/5] wined3d: Drop redundant check for instanced rendering from drawStridedFast.
From: Matteo Bruni <mbruni () codeweavers ! com>
Date: 2015-02-27 12:18:22
Message-ID: 1425039503-4854-4-git-send-email-mbruni () codeweavers ! com
[Download RAW message or body]
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.
---
dlls/wined3d/drawprim.c | 25 +++++++++----------------
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 98e7cf4..4916c05 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -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])
--
2.0.5
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic