Commit 243f2891 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Store base vertex draw capabilities in struct wined3d_d3d_info.

parent dc2233ab
......@@ -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)
......
......@@ -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;
......
......@@ -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;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment