mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 13:09:57 +00:00
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
1 changed files with 10 additions and 20 deletions
|
@ -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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
context_unload_numbered_arrays(context);
|
||||
context->numbered_array_mask = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
context_unload_vertex_data(context);
|
||||
}
|
||||
if (context->use_immediate_mode_draw)
|
||||
return;
|
||||
|
||||
if (load_numbered)
|
||||
context_unload_vertex_data(context);
|
||||
if (context->d3d_info->ffp_generic_attributes || use_vs(state))
|
||||
{
|
||||
TRACE("Loading numbered arrays.\n");
|
||||
context_load_numbered_arrays(context, &context->stream_info, state);
|
||||
return;
|
||||
}
|
||||
else if (load_named)
|
||||
{
|
||||
TRACE("Loading vertex data.\n");
|
||||
context_load_vertex_data(context, &context->stream_info, state);
|
||||
context->namedArraysLoaded = TRUE;
|
||||
}
|
||||
|
||||
TRACE("Loading named arrays.\n");
|
||||
context_unload_numbered_arrays(context);
|
||||
context_load_vertex_data(context, &context->stream_info, state);
|
||||
context->namedArraysLoaded = TRUE;
|
||||
}
|
||||
|
||||
static void apply_texture_blit_state(const struct wined3d_gl_info *gl_info, struct gl_texture *texture,
|
||||
|
|
Loading…
Reference in a new issue