Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/stateblock.c | 13 +++++++++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 2 ++ 3 files changed, 16 insertions(+)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index fe49fd6754..41c97b5020 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1508,6 +1508,19 @@ void CDECL wined3d_stateblock_set_texture(struct wined3d_stateblock *stateblock, stateblock->changed.textures |= 1u << stage; }
+void CDECL wined3d_stateblock_set_transform(struct wined3d_stateblock *stateblock, + enum wined3d_transform_state d3dts, const struct wined3d_matrix *matrix) +{ + TRACE("stateblock %p, state %s, matrix %p.\n", stateblock, debug_d3dtstype(d3dts), matrix); + TRACE("%.8e %.8e %.8e %.8e\n", matrix->_11, matrix->_12, matrix->_13, matrix->_14); + TRACE("%.8e %.8e %.8e %.8e\n", matrix->_21, matrix->_22, matrix->_23, matrix->_24); + TRACE("%.8e %.8e %.8e %.8e\n", matrix->_31, matrix->_32, matrix->_33, matrix->_34); + TRACE("%.8e %.8e %.8e %.8e\n", matrix->_41, matrix->_42, matrix->_43, matrix->_44); + + stateblock->stateblock_state.transforms[d3dts] = *matrix; + stateblock->changed.transform[d3dts >> 5] |= 1u << (d3dts & 0x1f); +} + 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 d0ba31bf4e..297d3a0410 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -268,6 +268,7 @@ @ cdecl wined3d_stateblock_set_sampler_state(ptr long long long) @ cdecl wined3d_stateblock_set_texture(ptr long ptr) @ cdecl wined3d_stateblock_set_texture_stage_state(ptr long long long) +@ 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_vs_consts_b(ptr long long ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index a567cfd2f1..298cb3b270 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2677,6 +2677,8 @@ void __cdecl wined3d_stateblock_set_sampler_state(struct wined3d_stateblock *sta void __cdecl wined3d_stateblock_set_texture(struct wined3d_stateblock *stateblock, UINT stage, struct wined3d_texture *texture); void __cdecl wined3d_stateblock_set_texture_stage_state(struct wined3d_stateblock *stateblock, UINT stage, enum wined3d_texture_stage_state state, DWORD value); +void __cdecl wined3d_stateblock_set_transform(struct wined3d_stateblock *stateblock, + enum wined3d_transform_state state, const struct wined3d_matrix *matrix); 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);
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 cd870c90a6..aa742c8c1f 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2070,7 +2070,9 @@ static HRESULT WINAPI d3d9_device_SetTransform(IDirect3DDevice9Ex *iface,
/* Note: D3DMATRIX is compatible with struct wined3d_matrix. */ wined3d_mutex_lock(); - wined3d_device_set_transform(device->wined3d_device, state, (const struct wined3d_matrix *)matrix); + wined3d_stateblock_set_transform(device->update_state, state, (const struct wined3d_matrix *)matrix); + if (!device->recording) + wined3d_device_set_transform(device->wined3d_device, state, (const struct wined3d_matrix *)matrix); 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=58599
Your paranoid android.
=== debian10 (64 bit WoW report) ===
d3d9: d3d9ex.c:3133: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0.
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 6b6f5edfbc..90bcfae498 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1610,7 +1610,9 @@ static HRESULT WINAPI d3d8_device_SetTransform(IDirect3DDevice8 *iface,
/* Note: D3DMATRIX is compatible with struct wined3d_matrix. */ wined3d_mutex_lock(); - wined3d_device_set_transform(device->wined3d_device, state, (const struct wined3d_matrix *)matrix); + wined3d_stateblock_set_transform(device->update_state, state, (const struct wined3d_matrix *)matrix); + if (!device->recording) + wined3d_device_set_transform(device->wined3d_device, state, (const struct wined3d_matrix *)matrix); 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=58600
Your paranoid android.
=== debian10 (32 bit WoW report) ===
d3d9: d3d9ex.c:3133: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0.
=== debian10 (64 bit WoW report) ===
d3d9: d3d9ex.c:3133: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0.
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 9b7754bd8d..599e45c24f 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -3135,7 +3135,9 @@ static HRESULT d3d_device7_SetTransform(IDirect3DDevice7 *iface,
/* Note: D3DMATRIX is compatible with struct wined3d_matrix. */ wined3d_mutex_lock(); - wined3d_device_set_transform(device->wined3d_device, wined3d_state, (struct wined3d_matrix *)matrix); + wined3d_stateblock_set_transform(device->update_state, wined3d_state, (const struct wined3d_matrix *)matrix); + if (!device->recording) + wined3d_device_set_transform(device->wined3d_device, wined3d_state, (const struct wined3d_matrix *)matrix); wined3d_mutex_unlock();
return D3D_OK;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com