d3d11: Implement d3d11_immediate_context_OMSetRenderTargets().
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
c390d78618
commit
fa05d30dc5
|
@ -169,6 +169,7 @@ struct d3d_depthstencil_view
|
|||
|
||||
HRESULT d3d_depthstencil_view_create(struct d3d_device *device, ID3D11Resource *resource,
|
||||
const D3D11_DEPTH_STENCIL_VIEW_DESC *desc, struct d3d_depthstencil_view **view) DECLSPEC_HIDDEN;
|
||||
struct d3d_depthstencil_view *unsafe_impl_from_ID3D11DepthStencilView(ID3D11DepthStencilView *iface) DECLSPEC_HIDDEN;
|
||||
struct d3d_depthstencil_view *unsafe_impl_from_ID3D10DepthStencilView(ID3D10DepthStencilView *iface) DECLSPEC_HIDDEN;
|
||||
|
||||
/* ID3D11RenderTargetView, ID3D10RenderTargetView */
|
||||
|
|
|
@ -406,8 +406,27 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetRenderTargets(ID3D11D
|
|||
UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views,
|
||||
ID3D11DepthStencilView *depth_stencil_view)
|
||||
{
|
||||
FIXME("iface %p, render_target_view_count %u, render_target_views %p, depth_stencil_view %p stub!\n",
|
||||
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
|
||||
struct d3d_depthstencil_view *dsv;
|
||||
unsigned int i;
|
||||
|
||||
TRACE("iface %p, render_target_view_count %u, render_target_views %p, depth_stencil_view %p.\n",
|
||||
iface, render_target_view_count, render_target_views, depth_stencil_view);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
for (i = 0; i < render_target_view_count; ++i)
|
||||
{
|
||||
struct d3d_rendertarget_view *rtv = unsafe_impl_from_ID3D11RenderTargetView(render_target_views[i]);
|
||||
wined3d_device_set_rendertarget_view(device->wined3d_device, i, rtv ? rtv->wined3d_view : NULL, FALSE);
|
||||
}
|
||||
for (; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i)
|
||||
{
|
||||
wined3d_device_set_rendertarget_view(device->wined3d_device, i, NULL, FALSE);
|
||||
}
|
||||
|
||||
dsv = unsafe_impl_from_ID3D11DepthStencilView(depth_stencil_view);
|
||||
wined3d_device_set_depth_stencil_view(device->wined3d_device, dsv ? dsv->wined3d_view : NULL);
|
||||
wined3d_mutex_unlock();
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetRenderTargetsAndUnorderedAccessViews(
|
||||
|
|
|
@ -757,6 +757,15 @@ HRESULT d3d_depthstencil_view_create(struct d3d_device *device, ID3D11Resource *
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
struct d3d_depthstencil_view *unsafe_impl_from_ID3D11DepthStencilView(ID3D11DepthStencilView *iface)
|
||||
{
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == &d3d11_depthstencil_view_vtbl);
|
||||
|
||||
return impl_from_ID3D11DepthStencilView(iface);
|
||||
}
|
||||
|
||||
struct d3d_depthstencil_view *unsafe_impl_from_ID3D10DepthStencilView(ID3D10DepthStencilView *iface)
|
||||
{
|
||||
if (!iface)
|
||||
|
|
Loading…
Reference in New Issue