Module: wine Branch: master Commit: 993c85050e7830cedf8512e143b554d1107a85e9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=993c85050e7830cedf8512e14...
Author: Matteo Bruni mbruni@codeweavers.com Date: Wed Apr 18 01:32:15 2018 +0200
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
---
dlls/wined3d/stateblock.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 23a615f..4ad0331 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -810,9 +810,12 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock) stateblock->state.material = src_state->material; }
+ assert(src_state->viewport_count <= 1); + if (stateblock->changed.viewport && (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");