Signed-off-by: Zebediah Figura z.figura12@gmail.com --- Much like 2b29d02aa.
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 38f49572fe..d0967f0ac0 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 --- dlls/wined3d/stateblock.c | 10 ++++++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 1 + 3 files changed, 12 insertions(+)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 24fd551adc..453e42fb70 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1544,6 +1544,16 @@ void CDECL wined3d_stateblock_set_material(struct wined3d_stateblock *stateblock
stateblock->stateblock_state.material = *material; 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) diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 4f3cdf9b7b..48e5ea954b 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 0b535475d0..c311ded731 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: 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 7224c31e6e..b4ba9223e0 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: 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 0aa326fad5..8cd85776f1 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: 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 cef865948b..e2643e6589 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;
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=59077
Your paranoid android.
=== w1064v1809_2scr (32 bit report) ===
d3d9: d3d9ex.c:3119: Test failed: Received WM_WINDOWPOSCHANGED but did not expect it, i=0.