wined3d: Properly preload index buffers.
This commit is contained in:
parent
5e5b435e7d
commit
aa71065d9b
|
@ -2336,6 +2336,13 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||||
device_preload_textures(device);
|
device_preload_textures(device);
|
||||||
if (isStateDirty(context, STATE_VDECL) || isStateDirty(context, STATE_STREAMSRC))
|
if (isStateDirty(context, STATE_VDECL) || isStateDirty(context, STATE_STREAMSRC))
|
||||||
device_update_stream_info(device, context->gl_info);
|
device_update_stream_info(device, context->gl_info);
|
||||||
|
if (state->index_buffer && !state->user_stream)
|
||||||
|
{
|
||||||
|
if (device->strided_streams.all_vbo)
|
||||||
|
wined3d_buffer_preload(state->index_buffer);
|
||||||
|
else
|
||||||
|
buffer_get_sysmem(state->index_buffer, context->gl_info);
|
||||||
|
}
|
||||||
|
|
||||||
ENTER_GL();
|
ENTER_GL();
|
||||||
if (context->last_was_blit)
|
if (context->last_was_blit)
|
||||||
|
|
|
@ -447,15 +447,8 @@ void device_update_stream_info(struct wined3d_device *device, const struct wined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->index_buffer && !state->user_stream)
|
|
||||||
{
|
|
||||||
if (prev_all_vbo != stream_info->all_vbo)
|
if (prev_all_vbo != stream_info->all_vbo)
|
||||||
device_invalidate_state(device, STATE_INDEXBUFFER);
|
device_invalidate_state(device, STATE_INDEXBUFFER);
|
||||||
if (stream_info->all_vbo)
|
|
||||||
wined3d_buffer_preload(state->index_buffer);
|
|
||||||
else
|
|
||||||
buffer_get_sysmem(state->index_buffer, gl_info);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void device_preload_texture(const struct wined3d_state *state, unsigned int idx)
|
static void device_preload_texture(const struct wined3d_state *state, unsigned int idx)
|
||||||
|
|
Loading…
Reference in New Issue