Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d8/tests/device.c | 1 - dlls/d3d9/tests/device.c | 1 - dlls/ddraw/tests/ddraw7.c | 1 - dlls/wined3d/device.c | 17 ++++++----------- 4 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 99f9ae1575..5f8c0eb794 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -9295,7 +9295,6 @@ static void test_multiply_transform(void)
hr = IDirect3DDevice8_GetTransform(device, tests[i], &ret_mat); ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); -todo_wine ok(!memcmp(&ret_mat, &mat2, sizeof(mat2)), "Test %u: Got unexpected transform matrix.\n", i);
hr = IDirect3DDevice8_CaptureStateBlock(device, stateblock); diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 37cf8d9a66..896a7308ea 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -13129,7 +13129,6 @@ static void test_multiply_transform(void)
hr = IDirect3DDevice9_GetTransform(device, tests[i], &ret_mat); ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); -todo_wine ok(!memcmp(&ret_mat, &mat2, sizeof(mat2)), "Test %u: Got unexpected transform matrix.\n", i);
hr = IDirect3DStateBlock9_Capture(stateblock); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 3c81846752..9374edb785 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -15397,7 +15397,6 @@ static void test_multiply_transform(void)
hr = IDirect3DDevice7_GetTransform(device, tests[i], &ret_mat); ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); -todo_wine ok(!memcmp(&ret_mat, &mat2, sizeof(mat2)), "Test %u: Got unexpected transform matrix.\n", i);
hr = IDirect3DDevice7_CaptureStateBlock(device, stateblock); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index d03a982e74..b5460c9e16 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1529,26 +1529,21 @@ void CDECL wined3d_device_get_transform(const struct wined3d_device *device, void CDECL wined3d_device_multiply_transform(struct wined3d_device *device, enum wined3d_transform_state state, const struct wined3d_matrix *matrix) { - const struct wined3d_matrix *mat; - struct wined3d_matrix temp; + struct wined3d_matrix *mat;
TRACE("device %p, state %s, matrix %p.\n", device, debug_d3dtstype(state), matrix);
- /* Note: Using 'updateStateBlock' rather than 'stateblock' in the code - * below means it will be recorded in a state block change, but it - * works regardless where it is recorded. - * If this is found to be wrong, change to StateBlock. */ if (state > HIGHEST_TRANSFORMSTATE) { WARN("Unhandled transform state %#x.\n", state); return; }
- mat = &device->update_state->transforms[state]; - multiply_matrix(&temp, mat, matrix); - - /* Apply change via set transform - will reapply to eg. lights this way. */ - wined3d_device_set_transform(device, state, &temp); + /* Tests show that stateblock recording is ignored; the change goes directly + * into the primary stateblock. */ + mat = &device->state.transforms[state]; + multiply_matrix(mat, mat, matrix); + wined3d_cs_emit_set_transform(device->cs, state, matrix); }
/* Note lights are real special cases. Although the device caps state only