On 28.02.2017 06:11, Henri Verbeet wrote:
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
dlls/wined3d/cs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
This patch causes corrupted graphics in multiple games. The problem is caused by uninitialized memory in the wined3d_state structs. Currently the struct is only cleared in wined3d_cs_exec_reset_state, but it probably should be cleared always when WINED3D_STATE_INIT_DEFAULT is passed, otherwise the CS and the main state can go out of sync. Could you please take a look?
Example app (~40 MB): https://archive.org/download/MotoRacer2Demo/MotoRacer2Demo.zip (sha256: 02c8523d61619b9f65d874e15af9838ebf78938a720c5b61504d97c0b7cc68c9)
Best regards, Sebastian
On 28 February 2017 at 14:52, Sebastian Lackner sebastian@fds-team.de wrote:
This patch causes corrupted graphics in multiple games. The problem is caused by uninitialized memory in the wined3d_state structs. Currently the struct is only cleared in wined3d_cs_exec_reset_state, but it probably should be cleared always when WINED3D_STATE_INIT_DEFAULT is passed, otherwise the CS and the main state can go out of sync. Could you please take a look?
It does look like we forget to clear the state structure in wined3d_device_reset(). Is fixing that not enough?
On 28.02.2017 15:06, Henri Verbeet wrote:
On 28 February 2017 at 14:52, Sebastian Lackner sebastian@fds-team.de wrote:
This patch causes corrupted graphics in multiple games. The problem is caused by uninitialized memory in the wined3d_state structs. Currently the struct is only cleared in wined3d_cs_exec_reset_state, but it probably should be cleared always when WINED3D_STATE_INIT_DEFAULT is passed, otherwise the CS and the main state can go out of sync. Could you please take a look?
It does look like we forget to clear the state structure in wined3d_device_reset(). Is fixing that not enough?
Yes, it seems to be sufficient (at least for all games I am aware of). I have sent the patch used for testing to the ML.
Best regards, Sebastian