wined3d: wined3d_device_get_render_state() never fails.
This commit is contained in:
parent
75cec973d5
commit
d601a0dede
|
@ -1475,7 +1475,6 @@ static HRESULT WINAPI d3d8_device_GetRenderState(IDirect3DDevice8 *iface,
|
||||||
D3DRENDERSTATETYPE state, DWORD *value)
|
D3DRENDERSTATETYPE state, DWORD *value)
|
||||||
{
|
{
|
||||||
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
|
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
|
||||||
HRESULT hr;
|
|
||||||
|
|
||||||
TRACE("iface %p, state %#x, value %p.\n", iface, state, value);
|
TRACE("iface %p, state %#x, value %p.\n", iface, state, value);
|
||||||
|
|
||||||
|
@ -1483,15 +1482,15 @@ static HRESULT WINAPI d3d8_device_GetRenderState(IDirect3DDevice8 *iface,
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case D3DRS_ZBIAS:
|
case D3DRS_ZBIAS:
|
||||||
hr = wined3d_device_get_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, value);
|
*value = wined3d_device_get_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
hr = wined3d_device_get_render_state(device->wined3d_device, state, value);
|
*value = wined3d_device_get_render_state(device->wined3d_device, state);
|
||||||
}
|
}
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return D3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI d3d8_device_BeginStateBlock(IDirect3DDevice8 *iface)
|
static HRESULT WINAPI d3d8_device_BeginStateBlock(IDirect3DDevice8 *iface)
|
||||||
|
|
|
@ -1533,15 +1533,14 @@ static HRESULT WINAPI d3d9_device_GetRenderState(IDirect3DDevice9Ex *iface,
|
||||||
D3DRENDERSTATETYPE state, DWORD *value)
|
D3DRENDERSTATETYPE state, DWORD *value)
|
||||||
{
|
{
|
||||||
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
|
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
|
||||||
HRESULT hr;
|
|
||||||
|
|
||||||
TRACE("iface %p, state %#x, value %p.\n", iface, state, value);
|
TRACE("iface %p, state %#x, value %p.\n", iface, state, value);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = wined3d_device_get_render_state(device->wined3d_device, state, value);
|
*value = wined3d_device_get_render_state(device->wined3d_device, state);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return D3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI d3d9_device_CreateStateBlock(IDirect3DDevice9Ex *iface,
|
static HRESULT WINAPI d3d9_device_CreateStateBlock(IDirect3DDevice9Ex *iface,
|
||||||
|
|
|
@ -2331,7 +2331,8 @@ static HRESULT d3d_device7_GetRenderState(IDirect3DDevice7 *iface,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D3DRENDERSTATE_ZBIAS:
|
case D3DRENDERSTATE_ZBIAS:
|
||||||
hr = wined3d_device_get_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, value);
|
*value = wined3d_device_get_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS);
|
||||||
|
hr = D3D_OK;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -2342,7 +2343,8 @@ static HRESULT d3d_device7_GetRenderState(IDirect3DDevice7 *iface,
|
||||||
hr = E_NOTIMPL;
|
hr = E_NOTIMPL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
hr = wined3d_device_get_render_state(device->wined3d_device, state, value);
|
*value = wined3d_device_get_render_state(device->wined3d_device, state);
|
||||||
|
hr = D3D_OK;
|
||||||
}
|
}
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
|
|
|
@ -339,7 +339,7 @@ static HRESULT WINAPI d3d_vertex_buffer7_ProcessVertices(IDirect3DVertexBuffer7
|
||||||
* the vertex ops
|
* the vertex ops
|
||||||
*/
|
*/
|
||||||
doClip = !!(vertex_op & D3DVOP_CLIP);
|
doClip = !!(vertex_op & D3DVOP_CLIP);
|
||||||
wined3d_device_get_render_state(device_impl->wined3d_device, WINED3D_RS_CLIPPING, (DWORD *)&oldClip);
|
oldClip = wined3d_device_get_render_state(device_impl->wined3d_device, WINED3D_RS_CLIPPING);
|
||||||
if (doClip != oldClip)
|
if (doClip != oldClip)
|
||||||
wined3d_device_set_render_state(device_impl->wined3d_device, WINED3D_RS_CLIPPING, doClip);
|
wined3d_device_set_render_state(device_impl->wined3d_device, WINED3D_RS_CLIPPING, doClip);
|
||||||
|
|
||||||
|
|
|
@ -2341,14 +2341,11 @@ void CDECL wined3d_device_set_render_state(struct wined3d_device *device,
|
||||||
device_invalidate_state(device, STATE_RENDER(state));
|
device_invalidate_state(device, STATE_RENDER(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CDECL wined3d_device_get_render_state(const struct wined3d_device *device,
|
DWORD CDECL wined3d_device_get_render_state(const struct wined3d_device *device, enum wined3d_render_state state)
|
||||||
enum wined3d_render_state state, DWORD *value)
|
|
||||||
{
|
{
|
||||||
TRACE("device %p, state %s (%#x), value %p.\n", device, debug_d3drenderstate(state), state, value);
|
TRACE("device %p, state %s (%#x).\n", device, debug_d3drenderstate(state), state);
|
||||||
|
|
||||||
*value = device->stateBlock->state.render_states[state];
|
return device->stateBlock->state.render_states[state];
|
||||||
|
|
||||||
return WINED3D_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CDECL wined3d_device_set_sampler_state(struct wined3d_device *device,
|
HRESULT CDECL wined3d_device_set_sampler_state(struct wined3d_device *device,
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
@ cdecl wined3d_device_get_ps_consts_f(ptr long ptr long)
|
@ cdecl wined3d_device_get_ps_consts_f(ptr long ptr long)
|
||||||
@ cdecl wined3d_device_get_ps_consts_i(ptr long ptr long)
|
@ cdecl wined3d_device_get_ps_consts_i(ptr long ptr long)
|
||||||
@ cdecl wined3d_device_get_raster_status(ptr long ptr)
|
@ cdecl wined3d_device_get_raster_status(ptr long ptr)
|
||||||
@ cdecl wined3d_device_get_render_state(ptr long ptr)
|
@ cdecl wined3d_device_get_render_state(ptr long)
|
||||||
@ cdecl wined3d_device_get_render_target(ptr long ptr)
|
@ cdecl wined3d_device_get_render_target(ptr long ptr)
|
||||||
@ cdecl wined3d_device_get_sampler_state(ptr long long ptr)
|
@ cdecl wined3d_device_get_sampler_state(ptr long long ptr)
|
||||||
@ cdecl wined3d_device_get_scissor_rect(ptr ptr)
|
@ cdecl wined3d_device_get_scissor_rect(ptr ptr)
|
||||||
|
|
|
@ -2142,8 +2142,7 @@ HRESULT __cdecl wined3d_device_get_ps_consts_i(const struct wined3d_device *devi
|
||||||
UINT start_register, int *constants, UINT vector4i_count);
|
UINT start_register, int *constants, UINT vector4i_count);
|
||||||
HRESULT __cdecl wined3d_device_get_raster_status(const struct wined3d_device *device,
|
HRESULT __cdecl wined3d_device_get_raster_status(const struct wined3d_device *device,
|
||||||
UINT swapchain_idx, struct wined3d_raster_status *raster_status);
|
UINT swapchain_idx, struct wined3d_raster_status *raster_status);
|
||||||
HRESULT __cdecl wined3d_device_get_render_state(const struct wined3d_device *device,
|
DWORD __cdecl wined3d_device_get_render_state(const struct wined3d_device *device, enum wined3d_render_state state);
|
||||||
enum wined3d_render_state state, DWORD *value);
|
|
||||||
HRESULT __cdecl wined3d_device_get_render_target(const struct wined3d_device *device,
|
HRESULT __cdecl wined3d_device_get_render_target(const struct wined3d_device *device,
|
||||||
UINT render_target_idx, struct wined3d_surface **render_target);
|
UINT render_target_idx, struct wined3d_surface **render_target);
|
||||||
HRESULT __cdecl wined3d_device_get_sampler_state(const struct wined3d_device *device,
|
HRESULT __cdecl wined3d_device_get_sampler_state(const struct wined3d_device *device,
|
||||||
|
|
Loading…
Reference in New Issue