wined3d: Simplify context_update_stream_sources().
Note that this slightly changes behaviour, in that no loads or unloads happen anymore when "use_immediate_mode_draw" is set. Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e93e943ba4
commit
8a1a67c431
|
@ -5479,32 +5479,22 @@ static void context_load_numbered_arrays(struct wined3d_context *context,
|
||||||
|
|
||||||
void context_update_stream_sources(struct wined3d_context *context, const struct wined3d_state *state)
|
void context_update_stream_sources(struct wined3d_context *context, const struct wined3d_state *state)
|
||||||
{
|
{
|
||||||
BOOL load_numbered = context->d3d_info->ffp_generic_attributes
|
|
||||||
|| (use_vs(state) && !context->use_immediate_mode_draw);
|
|
||||||
BOOL load_named = !context->d3d_info->ffp_generic_attributes
|
|
||||||
&& !use_vs(state) && !context->use_immediate_mode_draw;
|
|
||||||
|
|
||||||
if (context->numbered_array_mask && !load_numbered)
|
if (context->use_immediate_mode_draw)
|
||||||
{
|
return;
|
||||||
context_unload_numbered_arrays(context);
|
|
||||||
context->numbered_array_mask = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
context_unload_vertex_data(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (load_numbered)
|
context_unload_vertex_data(context);
|
||||||
|
if (context->d3d_info->ffp_generic_attributes || use_vs(state))
|
||||||
{
|
{
|
||||||
TRACE("Loading numbered arrays.\n");
|
TRACE("Loading numbered arrays.\n");
|
||||||
context_load_numbered_arrays(context, &context->stream_info, state);
|
context_load_numbered_arrays(context, &context->stream_info, state);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if (load_named)
|
|
||||||
{
|
TRACE("Loading named arrays.\n");
|
||||||
TRACE("Loading vertex data.\n");
|
context_unload_numbered_arrays(context);
|
||||||
context_load_vertex_data(context, &context->stream_info, state);
|
context_load_vertex_data(context, &context->stream_info, state);
|
||||||
context->namedArraysLoaded = TRUE;
|
context->namedArraysLoaded = TRUE;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void apply_texture_blit_state(const struct wined3d_gl_info *gl_info, struct gl_texture *texture,
|
static void apply_texture_blit_state(const struct wined3d_gl_info *gl_info, struct gl_texture *texture,
|
||||||
|
|
Loading…
Reference in New Issue