Commit 20a7056d authored by Chip Davis's avatar Chip Davis Committed by Alexandre Julliard

d3d8: Introduce a helper to convert d3d8 transform states to wined3d states.

parent 9937a26b
......@@ -437,6 +437,11 @@ void d3dcaps_from_wined3dcaps(D3DCAPS8 *caps, const struct wined3d_caps *wined3d
caps->MaxVertexShaderConst = min(D3D8_MAX_VERTEX_SHADER_CONSTANTF, caps->MaxVertexShaderConst);
}
static enum wined3d_transform_state wined3d_transform_state_from_d3d(D3DTRANSFORMSTATETYPE state)
{
return (enum wined3d_transform_state)state;
}
/* Handle table functions */
static DWORD d3d8_allocate_handle(struct d3d8_handle_table *t, void *object, enum d3d8_handle_type type)
{
......@@ -1649,7 +1654,8 @@ static HRESULT WINAPI d3d8_device_SetTransform(IDirect3DDevice8 *iface,
/* Note: D3DMATRIX is compatible with struct wined3d_matrix. */
wined3d_mutex_lock();
wined3d_stateblock_set_transform(device->update_state, state, (const struct wined3d_matrix *)matrix);
wined3d_stateblock_set_transform(device->update_state,
wined3d_transform_state_from_d3d(state), (const struct wined3d_matrix *)matrix);
wined3d_mutex_unlock();
return D3D_OK;
......@@ -1679,7 +1685,8 @@ static HRESULT WINAPI d3d8_device_MultiplyTransform(IDirect3DDevice8 *iface,
/* Note: D3DMATRIX is compatible with struct wined3d_matrix. */
wined3d_mutex_lock();
wined3d_stateblock_multiply_transform(device->state, state, (const struct wined3d_matrix *)matrix);
wined3d_stateblock_multiply_transform(device->state,
wined3d_transform_state_from_d3d(state), (const struct wined3d_matrix *)matrix);
wined3d_mutex_unlock();
return D3D_OK;
......
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