wined3d: wined3d_device_set_depth_stencil() never fails.
This commit is contained in:
parent
c7caabb864
commit
6e5cf8c698
|
@ -1085,7 +1085,7 @@ static HRESULT WINAPI d3d8_device_SetRenderTarget(IDirect3DDevice8 *iface,
|
|||
struct d3d8_surface *rt_impl = unsafe_impl_from_IDirect3DSurface8(render_target);
|
||||
struct d3d8_surface *ds_impl = unsafe_impl_from_IDirect3DSurface8(depth_stencil);
|
||||
struct wined3d_surface *original_ds = NULL;
|
||||
HRESULT hr;
|
||||
HRESULT hr = D3D_OK;
|
||||
|
||||
TRACE("iface %p, render_target %p, depth_stencil %p.\n", iface, render_target, depth_stencil);
|
||||
|
||||
|
@ -1123,8 +1123,8 @@ static HRESULT WINAPI d3d8_device_SetRenderTarget(IDirect3DDevice8 *iface,
|
|||
}
|
||||
|
||||
original_ds = wined3d_device_get_depth_stencil(device->wined3d_device);
|
||||
hr = wined3d_device_set_depth_stencil(device->wined3d_device, ds_impl ? ds_impl->wined3d_surface : NULL);
|
||||
if (SUCCEEDED(hr) && render_target)
|
||||
wined3d_device_set_depth_stencil(device->wined3d_device, ds_impl ? ds_impl->wined3d_surface : NULL);
|
||||
if (render_target)
|
||||
{
|
||||
hr = wined3d_device_set_render_target(device->wined3d_device, 0, rt_impl->wined3d_surface, TRUE);
|
||||
if (FAILED(hr))
|
||||
|
|
|
@ -1224,15 +1224,14 @@ static HRESULT WINAPI d3d9_device_SetDepthStencilSurface(IDirect3DDevice9Ex *ifa
|
|||
{
|
||||
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
|
||||
struct d3d9_surface *ds_impl = unsafe_impl_from_IDirect3DSurface9(depth_stencil);
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, depth_stencil %p.\n", iface, depth_stencil);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
hr = wined3d_device_set_depth_stencil(device->wined3d_device, ds_impl ? ds_impl->wined3d_surface : NULL);
|
||||
wined3d_device_set_depth_stencil(device->wined3d_device, ds_impl ? ds_impl->wined3d_surface : NULL);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
return hr;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3d9_device_GetDepthStencilSurface(IDirect3DDevice9Ex *iface, IDirect3DSurface9 **depth_stencil)
|
||||
|
|
|
@ -4568,7 +4568,7 @@ HRESULT CDECL wined3d_device_set_render_target(struct wined3d_device *device,
|
|||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_set_depth_stencil(struct wined3d_device *device, struct wined3d_surface *depth_stencil)
|
||||
void CDECL wined3d_device_set_depth_stencil(struct wined3d_device *device, struct wined3d_surface *depth_stencil)
|
||||
{
|
||||
struct wined3d_surface *prev = device->fb.depth_stencil;
|
||||
|
||||
|
@ -4578,7 +4578,7 @@ HRESULT CDECL wined3d_device_set_depth_stencil(struct wined3d_device *device, st
|
|||
if (prev == depth_stencil)
|
||||
{
|
||||
TRACE("Trying to do a NOP SetRenderTarget operation.\n");
|
||||
return WINED3D_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
if (prev)
|
||||
|
@ -4617,7 +4617,7 @@ HRESULT CDECL wined3d_device_set_depth_stencil(struct wined3d_device *device, st
|
|||
|
||||
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||
|
||||
return WINED3D_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device,
|
||||
|
|
|
@ -2195,7 +2195,7 @@ void __cdecl wined3d_device_set_cursor_position(struct wined3d_device *device,
|
|||
int x_screen_space, int y_screen_space, DWORD flags);
|
||||
HRESULT __cdecl wined3d_device_set_cursor_properties(struct wined3d_device *device,
|
||||
UINT x_hotspot, UINT y_hotspot, struct wined3d_surface *cursor_surface);
|
||||
HRESULT __cdecl wined3d_device_set_depth_stencil(struct wined3d_device *device, struct wined3d_surface *depth_stencil);
|
||||
void __cdecl wined3d_device_set_depth_stencil(struct wined3d_device *device, struct wined3d_surface *depth_stencil);
|
||||
HRESULT __cdecl wined3d_device_set_dialog_box_mode(struct wined3d_device *device, BOOL enable_dialogs);
|
||||
void __cdecl wined3d_device_set_gamma_ramp(const struct wined3d_device *device,
|
||||
UINT swapchain_idx, DWORD flags, const struct wined3d_gamma_ramp *ramp);
|
||||
|
|
Loading…
Reference in New Issue