d3d11: Implement d3d11_immediate_context_OMGetBlendState().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d8da1db891
commit
fd4f1d9c48
|
@ -359,6 +359,11 @@ struct d3d_blend_state
|
|||
ID3D11Device *device;
|
||||
};
|
||||
|
||||
static inline struct d3d_blend_state *impl_from_ID3D11BlendState(ID3D11BlendState *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct d3d_blend_state, ID3D11BlendState_iface);
|
||||
}
|
||||
|
||||
HRESULT d3d_blend_state_init(struct d3d_blend_state *state, struct d3d_device *device,
|
||||
const D3D11_BLEND_DESC *desc) DECLSPEC_HIDDEN;
|
||||
struct d3d_blend_state *unsafe_impl_from_ID3D11BlendState(ID3D11BlendState *iface) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -1655,8 +1655,17 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetRenderTargetsAndUnord
|
|||
static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetBlendState(ID3D11DeviceContext *iface,
|
||||
ID3D11BlendState **blend_state, FLOAT blend_factor[4], UINT *sample_mask)
|
||||
{
|
||||
FIXME("iface %p, blend_state %p, blend_factor %p, sample_mask %p stub!\n",
|
||||
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
|
||||
|
||||
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 ? &device->blend_state->ID3D11BlendState_iface : NULL))
|
||||
ID3D11BlendState_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();
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetDepthStencilState(ID3D11DeviceContext *iface,
|
||||
|
@ -4063,16 +4072,18 @@ 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;
|
||||
|
||||
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);
|
||||
|
||||
if (d3d11_blend_state)
|
||||
*blend_state = (ID3D10BlendState *)&impl_from_ID3D11BlendState(d3d11_blend_state)->ID3D10BlendState1_iface;
|
||||
else
|
||||
*blend_state = NULL;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d10_device_OMGetDepthStencilState(ID3D10Device1 *iface,
|
||||
|
|
|
@ -26,11 +26,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d11);
|
|||
|
||||
/* ID3D11BlendState methods */
|
||||
|
||||
static inline struct d3d_blend_state *impl_from_ID3D11BlendState(ID3D11BlendState *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct d3d_blend_state, ID3D11BlendState_iface);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_blend_state_QueryInterface(ID3D11BlendState *iface,
|
||||
REFIID riid, void **object)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue