wined3d: Initialise stream frequency to 1.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39080
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2019-02-08 19:34:13 +03:00 committed by Alexandre Julliard
parent f7b3120991
commit 53b6e77a5d
2 changed files with 7 additions and 1 deletions

View File

@ -5388,7 +5388,7 @@ static void context_load_numbered_arrays(struct wined3d_context *context,
stream = &state->streams[element->stream_idx];
if ((stream->flags & WINED3DSTREAMSOURCE_INSTANCEDATA) && !context->instance_count)
context->instance_count = state->streams[0].frequency ? state->streams[0].frequency : 1;
context->instance_count = state->streams[0].frequency;
if (gl_info->supported[ARB_INSTANCED_ARRAYS])
{

View File

@ -1448,6 +1448,9 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
state->blend_factor.g = 1.0f;
state->blend_factor.b = 1.0f;
state->blend_factor.a = 1.0f;
for (i = 0; i < MAX_STREAMS; ++i)
state->streams[i].frequency = 1;
}
void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
@ -1496,6 +1499,9 @@ static void stateblock_state_init_default(struct wined3d_stateblock_state *state
state->blend_factor.g = 1.0f;
state->blend_factor.b = 1.0f;
state->blend_factor.a = 1.0f;
for (i = 0; i < MAX_STREAMS; ++i)
state->streams[i].frequency = 1;
}
void wined3d_stateblock_state_init(struct wined3d_stateblock_state *state,