Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d9/tests/d3d9ex.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 38f49572fe4..d0967f0ac05 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -3124,6 +3124,7 @@ static void test_wndproc(void) "Expected IsIconic %u, got %u, i=%u.\n", tests[i].iconic, IsIconic(focus_window), i);
ShowWindow(focus_window, SW_SHOWNOACTIVATE); + flush_events(); ShowWindow(focus_window, SW_SHOWMINNOACTIVE); flush_events();
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- v2: rm stray space (thanks Henri)
dlls/wined3d/stateblock.c | 9 +++++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 1 + 3 files changed, 11 insertions(+)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 24fd551adcc..1d522ad89b8 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1546,6 +1546,15 @@ void CDECL wined3d_stateblock_set_material(struct wined3d_stateblock *stateblock stateblock->changed.material = TRUE; }
+void CDECL wined3d_stateblock_set_viewport(struct wined3d_stateblock *stateblock, + const struct wined3d_viewport *viewport) +{ + TRACE("stateblock %p, viewport %p.\n", stateblock, viewport); + + stateblock->stateblock_state.viewport = *viewport; + stateblock->changed.viewport = TRUE; +} + static void init_default_render_states(DWORD rs[WINEHIGHEST_RENDER_STATE + 1], const struct wined3d_d3d_info *d3d_info) { union diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 4f3cdf9b7b2..48e5ea954bc 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -277,6 +277,7 @@ @ cdecl wined3d_stateblock_set_transform(ptr long ptr) @ cdecl wined3d_stateblock_set_vertex_declaration(ptr ptr) @ cdecl wined3d_stateblock_set_vertex_shader(ptr ptr) +@ cdecl wined3d_stateblock_set_viewport(ptr ptr) @ cdecl wined3d_stateblock_set_vs_consts_b(ptr long long ptr) @ cdecl wined3d_stateblock_set_vs_consts_f(ptr long long ptr) @ cdecl wined3d_stateblock_set_vs_consts_i(ptr long long ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 0b535475d0d..c311ded731e 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2692,6 +2692,7 @@ void __cdecl wined3d_stateblock_set_transform(struct wined3d_stateblock *statebl void __cdecl wined3d_stateblock_set_vertex_declaration(struct wined3d_stateblock *stateblock, struct wined3d_vertex_declaration *declaration); void __cdecl wined3d_stateblock_set_vertex_shader(struct wined3d_stateblock *stateblock, struct wined3d_shader *shader); +void __cdecl wined3d_stateblock_set_viewport(struct wined3d_stateblock *stateblock, const struct wined3d_viewport *viewport); HRESULT __cdecl wined3d_stateblock_set_vs_consts_b(struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const BOOL *constants); HRESULT __cdecl wined3d_stateblock_set_vs_consts_f(struct wined3d_stateblock *stateblock,
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d9/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 7224c31e6e6..b4ba9223e09 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2123,7 +2123,9 @@ static HRESULT WINAPI d3d9_device_SetViewport(IDirect3DDevice9Ex *iface, const D vp.max_z = viewport->MaxZ;
wined3d_mutex_lock(); - wined3d_device_set_viewports(device->wined3d_device, 1, &vp); + wined3d_stateblock_set_viewport(device->update_state, &vp); + if (!device->recording) + wined3d_device_set_viewports(device->wined3d_device, 1, &vp); wined3d_mutex_unlock();
return D3D_OK;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d8/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 0aa326fad56..8cd85776f14 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1682,7 +1682,9 @@ static HRESULT WINAPI d3d8_device_SetViewport(IDirect3DDevice8 *iface, const D3D vp.min_z = viewport->MinZ; vp.max_z = viewport->MaxZ;
- wined3d_device_set_viewports(device->wined3d_device, 1, &vp); + wined3d_stateblock_set_viewport(device->update_state, &vp); + if (!device->recording) + wined3d_device_set_viewports(device->wined3d_device, 1, &vp); wined3d_mutex_unlock();
return D3D_OK;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index cef865948b6..e2643e6589d 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5358,7 +5358,9 @@ static HRESULT d3d_device7_SetViewport(IDirect3DDevice7 *iface, D3DVIEWPORT7 *vi vp.min_z = viewport->dvMinZ; vp.max_z = viewport->dvMaxZ;
- wined3d_device_set_viewports(device->wined3d_device, 1, &vp); + wined3d_stateblock_set_viewport(device->update_state, &vp); + if (!device->recording) + wined3d_device_set_viewports(device->wined3d_device, 1, &vp); wined3d_mutex_unlock();
return D3D_OK;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=59316
Your paranoid android.
=== w1064v1809_2scr (32 bit report) ===
d3d9: d3d9ex.c:3119: Test failed: Received WM_WINDOWPOSCHANGED but did not expect it, i=0.
=== debian10 (32 bit report) ===
d3d9: d3d9ex.c:3195: Test failed: Expected message 0x5 for window 0, but didn't receive it, i=0. d3d9ex.c:3214: Test failed: Expected message 0x5 for window 0, but didn't receive it, i=0. d3d9ex.c:3219: Test failed: Got unexpected WINDOWPOS hwnd=00000000, x=0, y=0, cx=0, cy=0, flags=0