forked from Mirrors/wine-wine
d3d8: Introduce a helper to convert d3d8 transform states to wined3d states.
Signed-off-by: Chip Davis <cdavis@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>feature/deterministic
parent
9937a26b1a
commit
20a7056db1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue