On 24 June 2016 at 11:45, Józef Kucia <jkucia(a)codeweavers.com> wrote:
@@ -4044,16 +4053,17 @@ static void STDMETHODCALLTYPE d3d10_device_OMGetBlendState(ID3D10Device1 *iface, ID3D10BlendState **blend_state, FLOAT blend_factor[4], UINT *sample_mask) { struct d3d_device *device = impl_from_ID3D10Device(iface); + ID3D11BlendState *d3d11_blend_state; + struct d3d_blend_state *object;
TRACE("iface %p, blend_state %p, blend_factor %p, sample_mask %p.\n", iface, blend_state, blend_factor, sample_mask);
- if ((*blend_state = device->blend_state ? (ID3D10BlendState *)&device->blend_state->ID3D10BlendState1_iface : NULL)) - ID3D10BlendState_AddRef(*blend_state); - wined3d_mutex_lock(); - memcpy(blend_factor, device->blend_factor, 4 * sizeof(*blend_factor)); - *sample_mask = wined3d_device_get_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEMASK); - wined3d_mutex_unlock(); + d3d11_immediate_context_OMGetBlendState(&device->immediate_context.ID3D11DeviceContext_iface, + &d3d11_blend_state, blend_factor, sample_mask); + + object = unsafe_impl_from_ID3D11BlendState(d3d11_blend_state); Why not just impl_from_ID3D11BlendState() here?