On Thu, 18 Feb 2021 at 13:31, RĂ©mi Bernon rbernon@codeweavers.com wrote:
static void wined3d_device_get_transform(const struct wined3d_device *device,
enum wined3d_transform_state state, struct wined3d_matrix *matrix)
enum wined3d_transform_state transform_state, struct wined3d_matrix *matrix)
{
- TRACE("device %p, state %s, matrix %p.\n", device, debug_d3dtstype(state), matrix);
- TRACE("device %p, transform_state %s, matrix %p.\n", device, debug_d3dtstype(transform_state), matrix);
- *matrix = device->state.transforms[state];
- *matrix = device->state.transforms[transform_state];
}
That seems a bit gratuitous. In most of the cases you're changing here, there are very few actual uses of "device->state". E.g., in the code above, you may just as well simply do
- *matrix = device->state.transforms[state]; + *matrix = device->state->transforms[state];
in patch 3/4, and skip the changes in patches 1/2 and 2/2.