mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 12:04:09 +00:00
wined3d: Pass a wined3d_stateblock_state to wined3d_device_validate_device().
Revert the use of wined3d_state_uses_depth_buffer() in this function to the
version before 8b4e07d5f3
.
This commit is contained in:
parent
d8c3b778a5
commit
3e51b67e31
|
@ -2424,8 +2424,7 @@ static HRESULT WINAPI d3d8_device_ValidateDevice(IDirect3DDevice8 *iface, DWORD
|
|||
TRACE("iface %p, pass_count %p.\n", iface, pass_count);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
wined3d_device_apply_stateblock(device->wined3d_device, device->state);
|
||||
hr = wined3d_device_validate_device(device->wined3d_device, pass_count);
|
||||
hr = wined3d_device_validate_device(device->wined3d_device, device->stateblock_state, pass_count);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
/* In d3d8, texture filters are not validated, so errors concerning
|
||||
|
|
|
@ -2899,8 +2899,7 @@ static HRESULT WINAPI d3d9_device_ValidateDevice(IDirect3DDevice9Ex *iface, DWOR
|
|||
TRACE("iface %p, pass_count %p.\n", iface, pass_count);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
wined3d_device_apply_stateblock(device->wined3d_device, device->state);
|
||||
hr = wined3d_device_validate_device(device->wined3d_device, pass_count);
|
||||
hr = wined3d_device_validate_device(device->wined3d_device, device->stateblock_state, pass_count);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
return hr;
|
||||
|
|
|
@ -5079,8 +5079,7 @@ static HRESULT d3d_device7_ValidateDevice(IDirect3DDevice7 *iface, DWORD *pass_c
|
|||
TRACE("iface %p, pass_count %p.\n", iface, pass_count);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
wined3d_device_apply_stateblock(device->wined3d_device, device->state);
|
||||
hr = wined3d_device_validate_device(device->wined3d_device, pass_count);
|
||||
hr = wined3d_device_validate_device(device->wined3d_device, device->stateblock_state, pass_count);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
return hr;
|
||||
|
|
|
@ -3701,9 +3701,9 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
|||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
|
||||
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, const struct wined3d_stateblock_state *state, DWORD *num_passes)
|
||||
{
|
||||
const struct wined3d_state *state = device->cs->c.state;
|
||||
const struct wined3d_state *device_state = device->cs->c.state;
|
||||
struct wined3d_texture *texture;
|
||||
unsigned i;
|
||||
|
||||
|
@ -3744,11 +3744,10 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
|||
}
|
||||
}
|
||||
|
||||
if (wined3d_state_uses_depth_buffer(state)
|
||||
|| (state->depth_stencil_state && state->depth_stencil_state->desc.stencil))
|
||||
if (state->rs[WINED3D_RS_ZENABLE] || state->rs[WINED3D_RS_ZWRITEENABLE] || state->rs[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
struct wined3d_rendertarget_view *rt = state->fb.render_targets[0];
|
||||
struct wined3d_rendertarget_view *ds = state->fb.depth_stencil;
|
||||
struct wined3d_rendertarget_view *rt = device_state->fb.render_targets[0];
|
||||
struct wined3d_rendertarget_view *ds = device_state->fb.depth_stencil;
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
@ cdecl wined3d_device_set_software_vertex_processing(ptr long)
|
||||
@ cdecl wined3d_device_show_cursor(ptr long)
|
||||
@ cdecl wined3d_device_update_texture(ptr ptr ptr)
|
||||
@ cdecl wined3d_device_validate_device(ptr ptr)
|
||||
@ cdecl wined3d_device_validate_device(ptr ptr ptr)
|
||||
|
||||
@ cdecl wined3d_device_context_blt(ptr ptr long ptr ptr long ptr long ptr long)
|
||||
@ cdecl wined3d_device_context_clear_rendertarget_view(ptr ptr ptr long ptr float long)
|
||||
|
|
|
@ -2419,7 +2419,8 @@ void __cdecl wined3d_device_set_software_vertex_processing(struct wined3d_device
|
|||
BOOL __cdecl wined3d_device_show_cursor(struct wined3d_device *device, BOOL show);
|
||||
HRESULT __cdecl wined3d_device_update_texture(struct wined3d_device *device,
|
||||
struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture);
|
||||
HRESULT __cdecl wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes);
|
||||
HRESULT __cdecl wined3d_device_validate_device(const struct wined3d_device *device,
|
||||
const struct wined3d_stateblock_state *state, DWORD *num_passes);
|
||||
|
||||
HRESULT __cdecl wined3d_device_context_blt(struct wined3d_device_context *context,
|
||||
struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, const RECT *dst_rect,
|
||||
|
|
Loading…
Reference in a new issue