wined3d: Fix stateblock viewports memcmp() size.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2018-04-18 01:32:15 +02:00 committed by Alexandre Julliard
parent f956200775
commit 993c85050e
1 changed files with 4 additions and 1 deletions

View File

@ -810,9 +810,12 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock)
stateblock->state.material = src_state->material; stateblock->state.material = src_state->material;
} }
assert(src_state->viewport_count <= 1);
if (stateblock->changed.viewport if (stateblock->changed.viewport
&& (src_state->viewport_count != stateblock->state.viewport_count && (src_state->viewport_count != stateblock->state.viewport_count
|| memcmp(src_state->viewports, stateblock->state.viewports, src_state->viewport_count * sizeof(stateblock->state.viewports)))) || memcmp(src_state->viewports, stateblock->state.viewports,
src_state->viewport_count * sizeof(*stateblock->state.viewports))))
{ {
TRACE("Updating viewports.\n"); TRACE("Updating viewports.\n");