d3d11: Implement d3d11_immediate_context_ClearRenderTargetView().
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
acd78b54c0
commit
1b9ce7671e
|
@ -186,6 +186,7 @@ struct d3d_rendertarget_view
|
||||||
|
|
||||||
HRESULT d3d_rendertarget_view_create(struct d3d_device *device, ID3D11Resource *resource,
|
HRESULT d3d_rendertarget_view_create(struct d3d_device *device, ID3D11Resource *resource,
|
||||||
const D3D11_RENDER_TARGET_VIEW_DESC *desc, struct d3d_rendertarget_view **view) DECLSPEC_HIDDEN;
|
const D3D11_RENDER_TARGET_VIEW_DESC *desc, struct d3d_rendertarget_view **view) DECLSPEC_HIDDEN;
|
||||||
|
struct d3d_rendertarget_view *unsafe_impl_from_ID3D11RenderTargetView(ID3D11RenderTargetView *iface) DECLSPEC_HIDDEN;
|
||||||
struct d3d_rendertarget_view *unsafe_impl_from_ID3D10RenderTargetView(ID3D10RenderTargetView *iface) DECLSPEC_HIDDEN;
|
struct d3d_rendertarget_view *unsafe_impl_from_ID3D10RenderTargetView(ID3D10RenderTargetView *iface) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* ID3D11ShaderResourceView, ID3D10ShaderResourceView */
|
/* ID3D11ShaderResourceView, ID3D10ShaderResourceView */
|
||||||
|
|
|
@ -467,8 +467,18 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopyStructureCount(ID3D11D
|
||||||
static void STDMETHODCALLTYPE d3d11_immediate_context_ClearRenderTargetView(ID3D11DeviceContext *iface,
|
static void STDMETHODCALLTYPE d3d11_immediate_context_ClearRenderTargetView(ID3D11DeviceContext *iface,
|
||||||
ID3D11RenderTargetView *render_target_view, const FLOAT color_rgba[4])
|
ID3D11RenderTargetView *render_target_view, const FLOAT color_rgba[4])
|
||||||
{
|
{
|
||||||
FIXME("iface %p, render_target_view %p, color_rgba {%.8e %.8e %.8e %.8e} stub!\n",
|
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
|
||||||
|
struct d3d_rendertarget_view *view = unsafe_impl_from_ID3D11RenderTargetView(render_target_view);
|
||||||
|
const struct wined3d_color color = {color_rgba[0], color_rgba[1], color_rgba[2], color_rgba[3]};
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("iface %p, render_target_view %p, color_rgba {%.8e %.8e %.8e %.8e}.\n",
|
||||||
iface, render_target_view, color_rgba[0], color_rgba[1], color_rgba[2], color_rgba[3]);
|
iface, render_target_view, color_rgba[0], color_rgba[1], color_rgba[2], color_rgba[3]);
|
||||||
|
|
||||||
|
wined3d_mutex_lock();
|
||||||
|
if (FAILED(hr = wined3d_device_clear_rendertarget_view(device->wined3d_device, view->wined3d_view, NULL, &color)))
|
||||||
|
ERR("Failed to clear view, hr %#x.\n", hr);
|
||||||
|
wined3d_mutex_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void STDMETHODCALLTYPE d3d11_immediate_context_ClearUnorderedAccessViewUint(ID3D11DeviceContext *iface,
|
static void STDMETHODCALLTYPE d3d11_immediate_context_ClearUnorderedAccessViewUint(ID3D11DeviceContext *iface,
|
||||||
|
|
|
@ -1169,6 +1169,15 @@ HRESULT d3d_rendertarget_view_create(struct d3d_device *device, ID3D11Resource *
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct d3d_rendertarget_view *unsafe_impl_from_ID3D11RenderTargetView(ID3D11RenderTargetView *iface)
|
||||||
|
{
|
||||||
|
if (!iface)
|
||||||
|
return NULL;
|
||||||
|
assert(iface->lpVtbl == &d3d11_rendertarget_view_vtbl);
|
||||||
|
|
||||||
|
return impl_from_ID3D11RenderTargetView(iface);
|
||||||
|
}
|
||||||
|
|
||||||
struct d3d_rendertarget_view *unsafe_impl_from_ID3D10RenderTargetView(ID3D10RenderTargetView *iface)
|
struct d3d_rendertarget_view *unsafe_impl_from_ID3D10RenderTargetView(ID3D10RenderTargetView *iface)
|
||||||
{
|
{
|
||||||
if (!iface)
|
if (!iface)
|
||||||
|
|
Loading…
Reference in New Issue