Commit 7163fbba authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Remove stateblock handling from wined3d_device_multiply_transform().

parent 110929a6
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment