Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/adapter_gl.c | 2 ++ dlls/wined3d/cs.c | 5 ++--- dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 538e0c1bb0c2..086d0469551f 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -3736,6 +3736,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, d3d_info->texture_npot_conditional = gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT] || gl_info->supported[ARB_TEXTURE_RECTANGLE];
+ d3d_info->draw_base_vertex_offset = !!gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]; + TRACE("Max texture stages: %u.\n", d3d_info->limits.ffp_blend_stages);
if (!d3d_info->shader_color_key) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 3de29d5f9485..47b23de62fde 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -842,7 +842,6 @@ void wined3d_cs_emit_dispatch_indirect(struct wined3d_cs *cs, static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data) { const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info; - const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info; const struct wined3d_shader *geometry_shader; struct wined3d_device *device = cs->device; int base_vertex_idx, load_base_vertex_idx; @@ -855,14 +854,14 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data) { const struct wined3d_direct_draw_parameters *direct = &op->parameters.u.direct;
- if (op->parameters.indexed && gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]) + if (op->parameters.indexed && d3d_info->draw_base_vertex_offset) base_vertex_idx = direct->base_vertex_idx; else if (!op->parameters.indexed) base_vertex_idx = direct->start_idx; }
/* ARB_draw_indirect always supports a base vertex offset. */ - if (!op->parameters.indirect && !gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]) + if (!op->parameters.indirect && !d3d_info->draw_base_vertex_offset) load_base_vertex_idx = op->parameters.u.direct.base_vertex_idx; else load_base_vertex_idx = 0; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 125efebacf2a..25a74dce0018 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -205,6 +205,7 @@ struct wined3d_d3d_info unsigned int viewport_array_index_any_shader : 1; unsigned int texture_npot : 1; unsigned int texture_npot_conditional : 1; + unsigned int draw_base_vertex_offset : 1; enum wined3d_feature_level feature_level; };