wined3d: Remove state management methods from the IWineD3DDevice interface.
This commit is contained in:
parent
ddad22d037
commit
979e3744f7
|
@ -129,7 +129,7 @@ static void STDMETHODCALLTYPE d3d10_device_PSSetShader(ID3D10Device *iface, ID3D
|
||||||
|
|
||||||
TRACE("iface %p, shader %p\n", iface, shader);
|
TRACE("iface %p, shader %p\n", iface, shader);
|
||||||
|
|
||||||
IWineD3DDevice_SetPixelShader(This->wined3d_device, ps ? ps->wined3d_shader : NULL);
|
wined3d_device_set_pixel_shader(This->wined3d_device, ps ? ps->wined3d_shader : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void STDMETHODCALLTYPE d3d10_device_PSSetSamplers(ID3D10Device *iface,
|
static void STDMETHODCALLTYPE d3d10_device_PSSetSamplers(ID3D10Device *iface,
|
||||||
|
@ -146,7 +146,7 @@ static void STDMETHODCALLTYPE d3d10_device_VSSetShader(ID3D10Device *iface, ID3D
|
||||||
|
|
||||||
TRACE("iface %p, shader %p\n", iface, shader);
|
TRACE("iface %p, shader %p\n", iface, shader);
|
||||||
|
|
||||||
IWineD3DDevice_SetVertexShader(This->wined3d_device, vs ? vs->wined3d_shader : NULL);
|
wined3d_device_set_vertex_shader(This->wined3d_device, vs ? vs->wined3d_shader : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void STDMETHODCALLTYPE d3d10_device_DrawIndexed(ID3D10Device *iface,
|
static void STDMETHODCALLTYPE d3d10_device_DrawIndexed(ID3D10Device *iface,
|
||||||
|
@ -157,7 +157,7 @@ static void STDMETHODCALLTYPE d3d10_device_DrawIndexed(ID3D10Device *iface,
|
||||||
TRACE("iface %p, index_count %u, start_index_location %u, base_vertex_location %d.\n",
|
TRACE("iface %p, index_count %u, start_index_location %u, base_vertex_location %d.\n",
|
||||||
iface, index_count, start_index_location, base_vertex_location);
|
iface, index_count, start_index_location, base_vertex_location);
|
||||||
|
|
||||||
IWineD3DDevice_SetBaseVertexIndex(This->wined3d_device, base_vertex_location);
|
wined3d_device_set_base_vertex_index(This->wined3d_device, base_vertex_location);
|
||||||
IWineD3DDevice_DrawIndexedPrimitive(This->wined3d_device, start_index_location, index_count);
|
IWineD3DDevice_DrawIndexedPrimitive(This->wined3d_device, start_index_location, index_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ static void STDMETHODCALLTYPE d3d10_device_IASetInputLayout(ID3D10Device *iface,
|
||||||
|
|
||||||
TRACE("iface %p, input_layout %p\n", iface, input_layout);
|
TRACE("iface %p, input_layout %p\n", iface, input_layout);
|
||||||
|
|
||||||
IWineD3DDevice_SetVertexDeclaration(This->wined3d_device,
|
wined3d_device_set_vertex_declaration(This->wined3d_device,
|
||||||
input_layout ? ((struct d3d10_input_layout *)input_layout)->wined3d_decl : NULL);
|
input_layout ? ((struct d3d10_input_layout *)input_layout)->wined3d_decl : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ static void STDMETHODCALLTYPE d3d10_device_IASetVertexBuffers(ID3D10Device *ifac
|
||||||
|
|
||||||
for (i = 0; i < buffer_count; ++i)
|
for (i = 0; i < buffer_count; ++i)
|
||||||
{
|
{
|
||||||
IWineD3DDevice_SetStreamSource(This->wined3d_device, start_slot,
|
wined3d_device_set_stream_source(This->wined3d_device, start_slot,
|
||||||
buffers[i] ? ((struct d3d10_buffer *)buffers[i])->wined3d_buffer : NULL,
|
buffers[i] ? ((struct d3d10_buffer *)buffers[i])->wined3d_buffer : NULL,
|
||||||
offsets[i], strides[i]);
|
offsets[i], strides[i]);
|
||||||
}
|
}
|
||||||
|
@ -215,7 +215,8 @@ static void STDMETHODCALLTYPE d3d10_device_IASetIndexBuffer(ID3D10Device *iface,
|
||||||
TRACE("iface %p, buffer %p, format %s, offset %u.\n",
|
TRACE("iface %p, buffer %p, format %s, offset %u.\n",
|
||||||
iface, buffer, debug_dxgi_format(format), offset);
|
iface, buffer, debug_dxgi_format(format), offset);
|
||||||
|
|
||||||
IWineD3DDevice_SetIndexBuffer(This->wined3d_device, buffer ? ((struct d3d10_buffer *)buffer)->wined3d_buffer : NULL,
|
wined3d_device_set_index_buffer(This->wined3d_device,
|
||||||
|
buffer ? ((struct d3d10_buffer *)buffer)->wined3d_buffer : NULL,
|
||||||
wined3dformat_from_dxgi_format(format));
|
wined3dformat_from_dxgi_format(format));
|
||||||
if (offset) FIXME("offset %u not supported.\n", offset);
|
if (offset) FIXME("offset %u not supported.\n", offset);
|
||||||
}
|
}
|
||||||
|
|
|
@ -595,14 +595,14 @@ static HRESULT WINAPI IDirect3DDevice8Impl_Reset(IDirect3DDevice8 *iface,
|
||||||
TRACE("iface %p, present_parameters %p.\n", iface, pPresentationParameters);
|
TRACE("iface %p, present_parameters %p.\n", iface, pPresentationParameters);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DDevice_SetIndexBuffer(This->WineD3DDevice, NULL, WINED3DFMT_UNKNOWN);
|
wined3d_device_set_index_buffer(This->WineD3DDevice, NULL, WINED3DFMT_UNKNOWN);
|
||||||
for (i = 0; i < 16; ++i)
|
for (i = 0; i < 16; ++i)
|
||||||
{
|
{
|
||||||
IWineD3DDevice_SetStreamSource(This->WineD3DDevice, i, NULL, 0, 0);
|
wined3d_device_set_stream_source(This->WineD3DDevice, i, NULL, 0, 0);
|
||||||
}
|
}
|
||||||
for (i = 0; i < 16; ++i)
|
for (i = 0; i < 16; ++i)
|
||||||
{
|
{
|
||||||
IWineD3DDevice_SetTexture(This->WineD3DDevice, i, NULL);
|
wined3d_device_set_texture(This->WineD3DDevice, i, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
IWineD3DDevice_EnumResources(This->WineD3DDevice, reset_enum_callback, &resources_ok);
|
IWineD3DDevice_EnumResources(This->WineD3DDevice, reset_enum_callback, &resources_ok);
|
||||||
|
@ -634,7 +634,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_Reset(IDirect3DDevice8 *iface,
|
||||||
hr = IWineD3DDevice_Reset(This->WineD3DDevice, &localParameters);
|
hr = IWineD3DDevice_Reset(This->WineD3DDevice, &localParameters);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
hr = IWineD3DDevice_SetRenderState(This->WineD3DDevice, WINED3DRS_POINTSIZE_MIN, 0);
|
hr = wined3d_device_set_render_state(This->WineD3DDevice, WINED3DRS_POINTSIZE_MIN, 0);
|
||||||
This->lost = FALSE;
|
This->lost = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -724,7 +724,7 @@ static void WINAPI IDirect3DDevice8Impl_SetGammaRamp(IDirect3DDevice8 *iface, DW
|
||||||
|
|
||||||
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
|
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DDevice_SetGammaRamp(This->WineD3DDevice, 0, Flags, (CONST WINED3DGAMMARAMP *) pRamp);
|
wined3d_device_set_gamma_ramp(This->WineD3DDevice, 0, Flags, (const WINED3DGAMMARAMP *)pRamp);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -736,7 +736,7 @@ static void WINAPI IDirect3DDevice8Impl_GetGammaRamp(IDirect3DDevice8 *iface, D3
|
||||||
|
|
||||||
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
|
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DDevice_GetGammaRamp(This->WineD3DDevice, 0, (WINED3DGAMMARAMP *) pRamp);
|
wined3d_device_get_gamma_ramp(This->WineD3DDevice, 0, (WINED3DGAMMARAMP *)pRamp);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1137,14 +1137,15 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderTarget(IDirect3DDevice8 *ifa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice, &original_ds);
|
hr = wined3d_device_get_depth_stencil(This->WineD3DDevice, &original_ds);
|
||||||
if (hr == WINED3D_OK || hr == WINED3DERR_NOTFOUND)
|
if (hr == WINED3D_OK || hr == WINED3DERR_NOTFOUND)
|
||||||
{
|
{
|
||||||
hr = IWineD3DDevice_SetDepthStencilSurface(This->WineD3DDevice, pZSurface ? pZSurface->wined3d_surface : NULL);
|
hr = wined3d_device_set_depth_stencil(This->WineD3DDevice, pZSurface ? pZSurface->wined3d_surface : NULL);
|
||||||
if (SUCCEEDED(hr) && pRenderTarget)
|
if (SUCCEEDED(hr) && pRenderTarget)
|
||||||
{
|
{
|
||||||
hr = IWineD3DDevice_SetRenderTarget(This->WineD3DDevice, 0, pSurface->wined3d_surface, TRUE);
|
hr = wined3d_device_set_render_target(This->WineD3DDevice, 0, pSurface->wined3d_surface, TRUE);
|
||||||
if (FAILED(hr)) IWineD3DDevice_SetDepthStencilSurface(This->WineD3DDevice, original_ds);
|
if (FAILED(hr))
|
||||||
|
wined3d_device_set_depth_stencil(This->WineD3DDevice, original_ds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (original_ds)
|
if (original_ds)
|
||||||
|
@ -1169,7 +1170,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderTarget(IDirect3DDevice8 *ifa
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetRenderTarget(This->WineD3DDevice, 0, &wined3d_surface);
|
hr = wined3d_device_get_render_target(This->WineD3DDevice, 0, &wined3d_surface);
|
||||||
if (SUCCEEDED(hr) && wined3d_surface)
|
if (SUCCEEDED(hr) && wined3d_surface)
|
||||||
{
|
{
|
||||||
*ppRenderTarget = wined3d_surface_get_parent(wined3d_surface);
|
*ppRenderTarget = wined3d_surface_get_parent(wined3d_surface);
|
||||||
|
@ -1200,7 +1201,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDepthStencilSurface(IDirect3DDevic
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice, &wined3d_surface);
|
hr = wined3d_device_get_depth_stencil(This->WineD3DDevice, &wined3d_surface);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
*ppZStencilSurface = wined3d_surface_get_parent(wined3d_surface);
|
*ppZStencilSurface = wined3d_surface_get_parent(wined3d_surface);
|
||||||
|
@ -1272,7 +1273,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetTransform(IDirect3DDevice8 *iface,
|
||||||
|
|
||||||
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetTransform(This->WineD3DDevice, State, (CONST WINED3DMATRIX*) lpMatrix);
|
hr = wined3d_device_set_transform(This->WineD3DDevice, State, (const WINED3DMATRIX *)lpMatrix);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1288,7 +1289,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTransform(IDirect3DDevice8 *iface,
|
||||||
|
|
||||||
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetTransform(This->WineD3DDevice, State, (WINED3DMATRIX*) pMatrix);
|
hr = wined3d_device_get_transform(This->WineD3DDevice, State, (WINED3DMATRIX *)pMatrix);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1320,7 +1321,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetViewport(IDirect3DDevice8 *iface,
|
||||||
|
|
||||||
/* Note: D3DVIEWPORT8 is compatible with WINED3DVIEWPORT */
|
/* Note: D3DVIEWPORT8 is compatible with WINED3DVIEWPORT */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetViewport(This->WineD3DDevice, (const WINED3DVIEWPORT *)pViewport);
|
hr = wined3d_device_set_viewport(This->WineD3DDevice, (const WINED3DVIEWPORT *)pViewport);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1336,7 +1337,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetViewport(IDirect3DDevice8 *iface,
|
||||||
|
|
||||||
/* Note: D3DVIEWPORT8 is compatible with WINED3DVIEWPORT */
|
/* Note: D3DVIEWPORT8 is compatible with WINED3DVIEWPORT */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetViewport(This->WineD3DDevice, (WINED3DVIEWPORT *)pViewport);
|
hr = wined3d_device_get_viewport(This->WineD3DDevice, (WINED3DVIEWPORT *)pViewport);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1352,7 +1353,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetMaterial(IDirect3DDevice8 *iface,
|
||||||
|
|
||||||
/* Note: D3DMATERIAL8 is compatible with WINED3DMATERIAL */
|
/* Note: D3DMATERIAL8 is compatible with WINED3DMATERIAL */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetMaterial(This->WineD3DDevice, (const WINED3DMATERIAL *)pMaterial);
|
hr = wined3d_device_set_material(This->WineD3DDevice, (const WINED3DMATERIAL *)pMaterial);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1368,7 +1369,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetMaterial(IDirect3DDevice8 *iface,
|
||||||
|
|
||||||
/* Note: D3DMATERIAL8 is compatible with WINED3DMATERIAL */
|
/* Note: D3DMATERIAL8 is compatible with WINED3DMATERIAL */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetMaterial(This->WineD3DDevice, (WINED3DMATERIAL *)pMaterial);
|
hr = wined3d_device_get_material(This->WineD3DDevice, (WINED3DMATERIAL *)pMaterial);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1384,7 +1385,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetLight(IDirect3DDevice8 *iface, DWO
|
||||||
|
|
||||||
/* Note: D3DLIGHT8 is compatible with WINED3DLIGHT */
|
/* Note: D3DLIGHT8 is compatible with WINED3DLIGHT */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetLight(This->WineD3DDevice, Index, (const WINED3DLIGHT *)pLight);
|
hr = wined3d_device_set_light(This->WineD3DDevice, Index, (const WINED3DLIGHT *)pLight);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1400,7 +1401,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetLight(IDirect3DDevice8 *iface, DWO
|
||||||
|
|
||||||
/* Note: D3DLIGHT8 is compatible with WINED3DLIGHT */
|
/* Note: D3DLIGHT8 is compatible with WINED3DLIGHT */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetLight(This->WineD3DDevice, Index, (WINED3DLIGHT *)pLight);
|
hr = wined3d_device_get_light(This->WineD3DDevice, Index, (WINED3DLIGHT *)pLight);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1415,7 +1416,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_LightEnable(IDirect3DDevice8 *iface,
|
||||||
TRACE("iface %p, index %u, enable %#x.\n", iface, Index, Enable);
|
TRACE("iface %p, index %u, enable %#x.\n", iface, Index, Enable);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetLightEnable(This->WineD3DDevice, Index, Enable);
|
hr = wined3d_device_set_light_enable(This->WineD3DDevice, Index, Enable);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1430,7 +1431,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetLightEnable(IDirect3DDevice8 *ifac
|
||||||
TRACE("iface %p, index %u, enable %p.\n", iface, Index, pEnable);
|
TRACE("iface %p, index %u, enable %p.\n", iface, Index, pEnable);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetLightEnable(This->WineD3DDevice, Index, pEnable);
|
hr = wined3d_device_get_light_enable(This->WineD3DDevice, Index, pEnable);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1445,7 +1446,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetClipPlane(IDirect3DDevice8 *iface,
|
||||||
TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane);
|
TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetClipPlane(This->WineD3DDevice, Index, pPlane);
|
hr = wined3d_device_set_clip_plane(This->WineD3DDevice, Index, pPlane);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1460,7 +1461,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetClipPlane(IDirect3DDevice8 *iface,
|
||||||
TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane);
|
TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetClipPlane(This->WineD3DDevice, Index, pPlane);
|
hr = wined3d_device_get_clip_plane(This->WineD3DDevice, Index, pPlane);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1490,11 +1491,11 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(IDirect3DDevice8 *ifac
|
||||||
{
|
{
|
||||||
case D3DRS_ZBIAS:
|
case D3DRS_ZBIAS:
|
||||||
wined3d_value.f = Value * zbias_factor;
|
wined3d_value.f = Value * zbias_factor;
|
||||||
hr = IWineD3DDevice_SetRenderState(This->WineD3DDevice, WINED3DRS_DEPTHBIAS, wined3d_value.d);
|
hr = wined3d_device_set_render_state(This->WineD3DDevice, WINED3DRS_DEPTHBIAS, wined3d_value.d);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
hr = IWineD3DDevice_SetRenderState(This->WineD3DDevice, State, Value);
|
hr = wined3d_device_set_render_state(This->WineD3DDevice, State, Value);
|
||||||
}
|
}
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
|
@ -1518,12 +1519,12 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderState(IDirect3DDevice8 *ifac
|
||||||
switch (State)
|
switch (State)
|
||||||
{
|
{
|
||||||
case D3DRS_ZBIAS:
|
case D3DRS_ZBIAS:
|
||||||
hr = IWineD3DDevice_GetRenderState(This->WineD3DDevice, WINED3DRS_DEPTHBIAS, &wined3d_value.d);
|
hr = wined3d_device_get_render_state(This->WineD3DDevice, WINED3DRS_DEPTHBIAS, &wined3d_value.d);
|
||||||
if (SUCCEEDED(hr)) *pValue = wined3d_value.f / zbias_factor;
|
if (SUCCEEDED(hr)) *pValue = wined3d_value.f / zbias_factor;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
hr = IWineD3DDevice_GetRenderState(This->WineD3DDevice, State, pValue);
|
hr = wined3d_device_get_render_state(This->WineD3DDevice, State, pValue);
|
||||||
}
|
}
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
|
@ -1707,7 +1708,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetClipStatus(IDirect3DDevice8 *iface
|
||||||
/* FIXME: Verify that D3DCLIPSTATUS8 ~= WINED3DCLIPSTATUS */
|
/* FIXME: Verify that D3DCLIPSTATUS8 ~= WINED3DCLIPSTATUS */
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetClipStatus(This->WineD3DDevice, (const WINED3DCLIPSTATUS *)pClipStatus);
|
hr = wined3d_device_set_clip_status(This->WineD3DDevice, (const WINED3DCLIPSTATUS *)pClipStatus);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1722,7 +1723,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetClipStatus(IDirect3DDevice8 *iface
|
||||||
TRACE("iface %p, clip_status %p.\n", iface, pClipStatus);
|
TRACE("iface %p, clip_status %p.\n", iface, pClipStatus);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetClipStatus(This->WineD3DDevice, (WINED3DCLIPSTATUS *)pClipStatus);
|
hr = wined3d_device_get_clip_status(This->WineD3DDevice, (WINED3DCLIPSTATUS *)pClipStatus);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1742,7 +1743,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(IDirect3DDevice8 *iface,
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, &wined3d_texture);
|
hr = wined3d_device_get_texture(This->WineD3DDevice, Stage, &wined3d_texture);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
WARN("Failed to get texture for stage %u, hr %#x.\n", Stage, hr);
|
WARN("Failed to get texture for stage %u, hr %#x.\n", Stage, hr);
|
||||||
|
@ -1775,7 +1776,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(IDirect3DDevice8 *iface, D
|
||||||
TRACE("iface %p, stage %u, texture %p.\n", iface, Stage, pTexture);
|
TRACE("iface %p, stage %u, texture %p.\n", iface, Stage, pTexture);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetTexture(This->WineD3DDevice, Stage,
|
hr = wined3d_device_set_texture(This->WineD3DDevice, Stage,
|
||||||
pTexture ? ((IDirect3DBaseTexture8Impl *)pTexture)->wined3d_texture : NULL);
|
pTexture ? ((IDirect3DBaseTexture8Impl *)pTexture)->wined3d_texture : NULL);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
|
@ -1838,8 +1839,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTextureStageState(IDirect3DDevic
|
||||||
l = &tss_lookup[Type];
|
l = &tss_lookup[Type];
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
if (l->sampler_state) hr = IWineD3DDevice_GetSamplerState(This->WineD3DDevice, Stage, l->state, pValue);
|
if (l->sampler_state)
|
||||||
else hr = IWineD3DDevice_GetTextureStageState(This->WineD3DDevice, Stage, l->state, pValue);
|
hr = wined3d_device_get_sampler_state(This->WineD3DDevice, Stage, l->state, pValue);
|
||||||
|
else
|
||||||
|
hr = wined3d_device_get_texture_stage_state(This->WineD3DDevice, Stage, l->state, pValue);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1863,8 +1866,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(IDirect3DDevice8
|
||||||
l = &tss_lookup[Type];
|
l = &tss_lookup[Type];
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
if (l->sampler_state) hr = IWineD3DDevice_SetSamplerState(This->WineD3DDevice, Stage, l->state, Value);
|
if (l->sampler_state)
|
||||||
else hr = IWineD3DDevice_SetTextureStageState(This->WineD3DDevice, Stage, l->state, Value);
|
hr = wined3d_device_set_sampler_state(This->WineD3DDevice, Stage, l->state, Value);
|
||||||
|
else
|
||||||
|
hr = wined3d_device_set_texture_stage_state(This->WineD3DDevice, Stage, l->state, Value);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1902,7 +1907,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPaletteEntries(IDirect3DDevice8 *i
|
||||||
TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries);
|
TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetPaletteEntries(This->WineD3DDevice, PaletteNumber, pEntries);
|
hr = wined3d_device_set_palette_entries(This->WineD3DDevice, PaletteNumber, pEntries);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1917,7 +1922,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPaletteEntries(IDirect3DDevice8 *i
|
||||||
TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries);
|
TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetPaletteEntries(This->WineD3DDevice, PaletteNumber, pEntries);
|
hr = wined3d_device_get_palette_entries(This->WineD3DDevice, PaletteNumber, pEntries);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1932,7 +1937,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetCurrentTexturePalette(IDirect3DDev
|
||||||
TRACE("iface %p, palette_idx %u.\n", iface, PaletteNumber);
|
TRACE("iface %p, palette_idx %u.\n", iface, PaletteNumber);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetCurrentTexturePalette(This->WineD3DDevice, PaletteNumber);
|
hr = wined3d_device_set_current_texture_palette(This->WineD3DDevice, PaletteNumber);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1947,7 +1952,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetCurrentTexturePalette(IDirect3DD
|
||||||
TRACE("iface %p, palette_idx %p.\n", iface, PaletteNumber);
|
TRACE("iface %p, palette_idx %p.\n", iface, PaletteNumber);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetCurrentTexturePalette(This->WineD3DDevice, PaletteNumber);
|
hr = wined3d_device_get_current_texture_palette(This->WineD3DDevice, PaletteNumber);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2176,9 +2181,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(IDirect3DDevice8 *ifa
|
||||||
TRACE("Setting FVF, %#x\n", pShader);
|
TRACE("Setting FVF, %#x\n", pShader);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice,
|
wined3d_device_set_vertex_declaration(This->WineD3DDevice,
|
||||||
IDirect3DDevice8Impl_FindDecl(This, pShader)->wined3d_vertex_declaration);
|
IDirect3DDevice8Impl_FindDecl(This, pShader)->wined3d_vertex_declaration);
|
||||||
IWineD3DDevice_SetVertexShader(This->WineD3DDevice, NULL);
|
wined3d_device_set_vertex_shader(This->WineD3DDevice, NULL);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return D3D_OK;
|
return D3D_OK;
|
||||||
|
@ -2196,10 +2201,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(IDirect3DDevice8 *ifa
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice,
|
hr = wined3d_device_set_vertex_declaration(This->WineD3DDevice,
|
||||||
((IDirect3DVertexDeclaration8Impl *)shader->vertex_declaration)->wined3d_vertex_declaration);
|
((IDirect3DVertexDeclaration8Impl *)shader->vertex_declaration)->wined3d_vertex_declaration);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
hr = IWineD3DDevice_SetVertexShader(This->WineD3DDevice, shader->wined3d_shader);
|
hr = wined3d_device_set_vertex_shader(This->WineD3DDevice, shader->wined3d_shader);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
TRACE("Returning hr %#x\n", hr);
|
TRACE("Returning hr %#x\n", hr);
|
||||||
|
@ -2217,7 +2222,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShader(IDirect3DDevice8 *ifa
|
||||||
TRACE("iface %p, shader %p.\n", iface, ppShader);
|
TRACE("iface %p, shader %p.\n", iface, ppShader);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetVertexDeclaration(This->WineD3DDevice, &wined3d_declaration);
|
hr = wined3d_device_get_vertex_declaration(This->WineD3DDevice, &wined3d_declaration);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
@ -2261,7 +2266,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeleteVertexShader(IDirect3DDevice8 *
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur = IWineD3DDevice_GetVertexShader(This->WineD3DDevice);
|
cur = wined3d_device_get_vertex_shader(This->WineD3DDevice);
|
||||||
if (cur)
|
if (cur)
|
||||||
{
|
{
|
||||||
if (cur == shader->wined3d_shader)
|
if (cur == shader->wined3d_shader)
|
||||||
|
@ -2295,7 +2300,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShaderConstant(IDirect3DDevi
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetVertexShaderConstantF(This->WineD3DDevice, Register, pConstantData, ConstantCount);
|
hr = wined3d_device_set_vs_consts_f(This->WineD3DDevice, Register, pConstantData, ConstantCount);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2317,7 +2322,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderConstant(IDirect3DDevi
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetVertexShaderConstantF(This->WineD3DDevice, Register, pConstantData, ConstantCount);
|
hr = wined3d_device_get_vs_consts_f(This->WineD3DDevice, Register, pConstantData, ConstantCount);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2411,8 +2416,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetIndices(IDirect3DDevice8 *iface,
|
||||||
* problem)
|
* problem)
|
||||||
*/
|
*/
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DDevice_SetBaseVertexIndex(This->WineD3DDevice, baseVertexIndex);
|
wined3d_device_set_base_vertex_index(This->WineD3DDevice, baseVertexIndex);
|
||||||
hr = IWineD3DDevice_SetIndexBuffer(This->WineD3DDevice,
|
hr = wined3d_device_set_index_buffer(This->WineD3DDevice,
|
||||||
ib ? ib->wineD3DIndexBuffer : NULL,
|
ib ? ib->wineD3DIndexBuffer : NULL,
|
||||||
ib ? ib->format : WINED3DFMT_UNKNOWN);
|
ib ? ib->format : WINED3DFMT_UNKNOWN);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
@ -2435,8 +2440,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(IDirect3DDevice8 *iface,
|
||||||
|
|
||||||
/* The case from UINT to INT is safe because d3d8 will never set negative values */
|
/* The case from UINT to INT is safe because d3d8 will never set negative values */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DDevice_GetBaseVertexIndex(This->WineD3DDevice, (INT *) pBaseVertexIndex);
|
*pBaseVertexIndex = wined3d_device_get_base_vertex_index(This->WineD3DDevice);
|
||||||
hr = IWineD3DDevice_GetIndexBuffer(This->WineD3DDevice, &retIndexData);
|
hr = wined3d_device_get_index_buffer(This->WineD3DDevice, &retIndexData);
|
||||||
if (SUCCEEDED(hr) && retIndexData)
|
if (SUCCEEDED(hr) && retIndexData)
|
||||||
{
|
{
|
||||||
*ppIndexData = wined3d_buffer_get_parent(retIndexData);
|
*ppIndexData = wined3d_buffer_get_parent(retIndexData);
|
||||||
|
@ -2517,7 +2522,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(IDirect3DDevice8 *ifac
|
||||||
|
|
||||||
if (!pShader)
|
if (!pShader)
|
||||||
{
|
{
|
||||||
hr = IWineD3DDevice_SetPixelShader(This->WineD3DDevice, NULL);
|
hr = wined3d_device_set_pixel_shader(This->WineD3DDevice, NULL);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
@ -2531,7 +2536,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(IDirect3DDevice8 *ifac
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("(%p) : Setting shader %p\n", This, shader);
|
TRACE("(%p) : Setting shader %p\n", This, shader);
|
||||||
hr = IWineD3DDevice_SetPixelShader(This->WineD3DDevice, shader->wined3d_shader);
|
hr = wined3d_device_set_pixel_shader(This->WineD3DDevice, shader->wined3d_shader);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2550,7 +2555,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(IDirect3DDevice8 *ifac
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
object = IWineD3DDevice_GetPixelShader(This->WineD3DDevice);
|
object = wined3d_device_get_pixel_shader(This->WineD3DDevice);
|
||||||
if (object)
|
if (object)
|
||||||
{
|
{
|
||||||
IDirect3DPixelShader8Impl *d3d8_shader;
|
IDirect3DPixelShader8Impl *d3d8_shader;
|
||||||
|
@ -2587,7 +2592,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(IDirect3DDevice8 *i
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur = IWineD3DDevice_GetPixelShader(This->WineD3DDevice);
|
cur = wined3d_device_get_pixel_shader(This->WineD3DDevice);
|
||||||
if (cur)
|
if (cur)
|
||||||
{
|
{
|
||||||
if (cur == shader->wined3d_shader)
|
if (cur == shader->wined3d_shader)
|
||||||
|
@ -2615,7 +2620,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShaderConstant(IDirect3DDev
|
||||||
iface, Register, pConstantData, ConstantCount);
|
iface, Register, pConstantData, ConstantCount);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetPixelShaderConstantF(This->WineD3DDevice, Register, pConstantData, ConstantCount);
|
hr = wined3d_device_set_ps_consts_f(This->WineD3DDevice, Register, pConstantData, ConstantCount);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2631,7 +2636,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShaderConstant(IDirect3DDevic
|
||||||
iface, Register, pConstantData, ConstantCount);
|
iface, Register, pConstantData, ConstantCount);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetPixelShaderConstantF(This->WineD3DDevice, Register, pConstantData, ConstantCount);
|
hr = wined3d_device_get_ps_consts_f(This->WineD3DDevice, Register, pConstantData, ConstantCount);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2719,9 +2724,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetStreamSource(IDirect3DDevice8 *ifa
|
||||||
iface, StreamNumber, pStreamData, Stride);
|
iface, StreamNumber, pStreamData, Stride);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetStreamSource(This->WineD3DDevice, StreamNumber,
|
hr = wined3d_device_set_stream_source(This->WineD3DDevice, StreamNumber,
|
||||||
NULL == pStreamData ? NULL : ((IDirect3DVertexBuffer8Impl *)pStreamData)->wineD3DVertexBuffer,
|
pStreamData ? ((IDirect3DVertexBuffer8Impl *)pStreamData)->wineD3DVertexBuffer : NULL,
|
||||||
0/* Offset in bytes */, Stride);
|
0/* Offset in bytes */, Stride);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2742,7 +2747,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetStreamSource(IDirect3DDevice8 *ifa
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetStreamSource(This->WineD3DDevice, StreamNumber,
|
hr = wined3d_device_get_stream_source(This->WineD3DDevice, StreamNumber,
|
||||||
&retStream, 0 /* Offset in bytes */, pStride);
|
&retStream, 0 /* Offset in bytes */, pStride);
|
||||||
if (SUCCEEDED(hr) && retStream)
|
if (SUCCEEDED(hr) && retStream)
|
||||||
{
|
{
|
||||||
|
@ -3194,7 +3199,7 @@ HRESULT device_init(IDirect3DDevice8Impl *device, struct wined3d *wined3d, UINT
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IWineD3DDevice_SetRenderState(device->WineD3DDevice, WINED3DRS_POINTSIZE_MIN, 0);
|
hr = wined3d_device_set_render_state(device->WineD3DDevice, WINED3DRS_POINTSIZE_MIN, 0);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
|
|
|
@ -591,12 +591,14 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Reset(IDirect3DDevi
|
||||||
* below fails, the device is considered "lost", and _Reset and _Release are the only allowed calls
|
* below fails, the device is considered "lost", and _Reset and _Release are the only allowed calls
|
||||||
*/
|
*/
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DDevice_SetIndexBuffer(This->WineD3DDevice, NULL, WINED3DFMT_UNKNOWN);
|
wined3d_device_set_index_buffer(This->WineD3DDevice, NULL, WINED3DFMT_UNKNOWN);
|
||||||
for(i = 0; i < 16; i++) {
|
for (i = 0; i < 16; ++i)
|
||||||
IWineD3DDevice_SetStreamSource(This->WineD3DDevice, i, NULL, 0, 0);
|
{
|
||||||
|
wined3d_device_set_stream_source(This->WineD3DDevice, i, NULL, 0, 0);
|
||||||
}
|
}
|
||||||
for(i = 0; i < 16; i++) {
|
for (i = 0; i < 16; ++i)
|
||||||
IWineD3DDevice_SetTexture(This->WineD3DDevice, i, NULL);
|
{
|
||||||
|
wined3d_device_set_texture(This->WineD3DDevice, i, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
IWineD3DDevice_EnumResources(This->WineD3DDevice, reset_enum_callback, &resources_ok);
|
IWineD3DDevice_EnumResources(This->WineD3DDevice, reset_enum_callback, &resources_ok);
|
||||||
|
@ -730,7 +732,7 @@ static void WINAPI IDirect3DDevice9Impl_SetGammaRamp(IDirect3DDevice9Ex *iface,
|
||||||
|
|
||||||
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
|
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DDevice_SetGammaRamp(This->WineD3DDevice, iSwapChain, Flags, (CONST WINED3DGAMMARAMP *)pRamp);
|
wined3d_device_set_gamma_ramp(This->WineD3DDevice, iSwapChain, Flags, (const WINED3DGAMMARAMP *)pRamp);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -743,7 +745,7 @@ static void WINAPI IDirect3DDevice9Impl_GetGammaRamp(IDirect3DDevice9Ex *iface,
|
||||||
|
|
||||||
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
|
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DDevice_GetGammaRamp(This->WineD3DDevice, iSwapChain, (WINED3DGAMMARAMP *) pRamp);
|
wined3d_device_get_gamma_ramp(This->WineD3DDevice, iSwapChain, (WINED3DGAMMARAMP *)pRamp);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1155,7 +1157,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderTarget(IDirect3DDevice9Ex *i
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetRenderTarget(This->WineD3DDevice, RenderTargetIndex,
|
hr = wined3d_device_set_render_target(This->WineD3DDevice, RenderTargetIndex,
|
||||||
pSurface ? pSurface->wined3d_surface : NULL, TRUE);
|
pSurface ? pSurface->wined3d_surface : NULL, TRUE);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
|
@ -1183,7 +1185,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(IDirect3DDevice9Ex *i
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
|
||||||
hr = IWineD3DDevice_GetRenderTarget(This->WineD3DDevice, RenderTargetIndex, &wined3d_surface);
|
hr = wined3d_device_get_render_target(This->WineD3DDevice, RenderTargetIndex, &wined3d_surface);
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
|
@ -1217,7 +1219,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetDepthStencilSurface(IDirect3DDevic
|
||||||
pSurface = (IDirect3DSurface9Impl*)pZStencilSurface;
|
pSurface = (IDirect3DSurface9Impl*)pZStencilSurface;
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetDepthStencilSurface(This->WineD3DDevice, pSurface ? pSurface->wined3d_surface : NULL);
|
hr = wined3d_device_set_depth_stencil(This->WineD3DDevice, pSurface ? pSurface->wined3d_surface : NULL);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1237,7 +1239,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDepthStencilSurface(IDirect3DDevic
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice, &wined3d_surface);
|
hr = wined3d_device_get_depth_stencil(This->WineD3DDevice, &wined3d_surface);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
*ppZStencilSurface = wined3d_surface_get_parent(wined3d_surface);
|
*ppZStencilSurface = wined3d_surface_get_parent(wined3d_surface);
|
||||||
|
@ -1310,7 +1312,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetTransform(IDirect3DDevice9Ex *ifac
|
||||||
|
|
||||||
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetTransform(This->WineD3DDevice, State, (CONST WINED3DMATRIX*) lpMatrix);
|
hr = wined3d_device_set_transform(This->WineD3DDevice, State, (const WINED3DMATRIX *)lpMatrix);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1326,7 +1328,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTransform(IDirect3DDevice9Ex *ifac
|
||||||
|
|
||||||
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetTransform(This->WineD3DDevice, State, (WINED3DMATRIX*) pMatrix);
|
hr = wined3d_device_get_transform(This->WineD3DDevice, State, (WINED3DMATRIX *)pMatrix);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1358,7 +1360,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetViewport(IDirect3DDevice9Ex *iface
|
||||||
|
|
||||||
/* Note: D3DVIEWPORT9 is compatible with WINED3DVIEWPORT */
|
/* Note: D3DVIEWPORT9 is compatible with WINED3DVIEWPORT */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetViewport(This->WineD3DDevice, (const WINED3DVIEWPORT *)pViewport);
|
hr = wined3d_device_set_viewport(This->WineD3DDevice, (const WINED3DVIEWPORT *)pViewport);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1374,7 +1376,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetViewport(IDirect3DDevice9Ex *iface
|
||||||
|
|
||||||
/* Note: D3DVIEWPORT9 is compatible with WINED3DVIEWPORT */
|
/* Note: D3DVIEWPORT9 is compatible with WINED3DVIEWPORT */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetViewport(This->WineD3DDevice, (WINED3DVIEWPORT *)pViewport);
|
hr = wined3d_device_get_viewport(This->WineD3DDevice, (WINED3DVIEWPORT *)pViewport);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1390,7 +1392,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetMaterial(IDirect3DDevice9Ex *iface
|
||||||
|
|
||||||
/* Note: D3DMATERIAL9 is compatible with WINED3DMATERIAL */
|
/* Note: D3DMATERIAL9 is compatible with WINED3DMATERIAL */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetMaterial(This->WineD3DDevice, (const WINED3DMATERIAL *)pMaterial);
|
hr = wined3d_device_set_material(This->WineD3DDevice, (const WINED3DMATERIAL *)pMaterial);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1406,7 +1408,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetMaterial(IDirect3DDevice9Ex *iface
|
||||||
|
|
||||||
/* Note: D3DMATERIAL9 is compatible with WINED3DMATERIAL */
|
/* Note: D3DMATERIAL9 is compatible with WINED3DMATERIAL */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetMaterial(This->WineD3DDevice, (WINED3DMATERIAL *)pMaterial);
|
hr = wined3d_device_get_material(This->WineD3DDevice, (WINED3DMATERIAL *)pMaterial);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1422,7 +1424,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetLight(IDirect3DDevice9Ex *iface, D
|
||||||
|
|
||||||
/* Note: D3DLIGHT9 is compatible with WINED3DLIGHT */
|
/* Note: D3DLIGHT9 is compatible with WINED3DLIGHT */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetLight(This->WineD3DDevice, Index, (const WINED3DLIGHT *)pLight);
|
hr = wined3d_device_set_light(This->WineD3DDevice, Index, (const WINED3DLIGHT *)pLight);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1438,7 +1440,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetLight(IDirect3DDevice9Ex *iface, D
|
||||||
|
|
||||||
/* Note: D3DLIGHT9 is compatible with WINED3DLIGHT */
|
/* Note: D3DLIGHT9 is compatible with WINED3DLIGHT */
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetLight(This->WineD3DDevice, Index, (WINED3DLIGHT *)pLight);
|
hr = wined3d_device_get_light(This->WineD3DDevice, Index, (WINED3DLIGHT *)pLight);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1453,7 +1455,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_LightEnable(IDirect3DDevice9Ex *iface
|
||||||
TRACE("iface %p, index %u, enable %#x.\n", iface, Index, Enable);
|
TRACE("iface %p, index %u, enable %#x.\n", iface, Index, Enable);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetLightEnable(This->WineD3DDevice, Index, Enable);
|
hr = wined3d_device_set_light_enable(This->WineD3DDevice, Index, Enable);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1468,7 +1470,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetLightEnable(IDirect3DDevice9Ex *if
|
||||||
TRACE("iface %p, index %u, enable %p.\n", iface, Index, pEnable);
|
TRACE("iface %p, index %u, enable %p.\n", iface, Index, pEnable);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetLightEnable(This->WineD3DDevice, Index, pEnable);
|
hr = wined3d_device_get_light_enable(This->WineD3DDevice, Index, pEnable);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1483,7 +1485,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetClipPlane(IDirect3DDevice9Ex *ifac
|
||||||
TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane);
|
TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetClipPlane(This->WineD3DDevice, Index, pPlane);
|
hr = wined3d_device_set_clip_plane(This->WineD3DDevice, Index, pPlane);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1498,7 +1500,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetClipPlane(IDirect3DDevice9Ex *ifac
|
||||||
TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane);
|
TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetClipPlane(This->WineD3DDevice, Index, pPlane);
|
hr = wined3d_device_get_clip_plane(This->WineD3DDevice, Index, pPlane);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1513,7 +1515,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_SetRenderState(IDir
|
||||||
TRACE("iface %p, state %#x, value %#x.\n", iface, State, Value);
|
TRACE("iface %p, state %#x, value %#x.\n", iface, State, Value);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetRenderState(This->WineD3DDevice, State, Value);
|
hr = wined3d_device_set_render_state(This->WineD3DDevice, State, Value);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1528,7 +1530,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderState(IDirect3DDevice9Ex *if
|
||||||
TRACE("iface %p, state %#x, value %p.\n", iface, State, pValue);
|
TRACE("iface %p, state %#x, value %p.\n", iface, State, pValue);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetRenderState(This->WineD3DDevice, State, pValue);
|
hr = wined3d_device_get_render_state(This->WineD3DDevice, State, pValue);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1639,7 +1641,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetClipStatus(IDirect3DDevice9Ex *ifa
|
||||||
TRACE("iface %p, clip_status %p.\n", iface, pClipStatus);
|
TRACE("iface %p, clip_status %p.\n", iface, pClipStatus);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetClipStatus(This->WineD3DDevice, (const WINED3DCLIPSTATUS *)pClipStatus);
|
hr = wined3d_device_set_clip_status(This->WineD3DDevice, (const WINED3DCLIPSTATUS *)pClipStatus);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1654,7 +1656,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetClipStatus(IDirect3DDevice9Ex *ifa
|
||||||
TRACE("iface %p, clip_status %p.\n", iface, pClipStatus);
|
TRACE("iface %p, clip_status %p.\n", iface, pClipStatus);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetClipStatus(This->WineD3DDevice, (WINED3DCLIPSTATUS *)pClipStatus);
|
hr = wined3d_device_get_clip_status(This->WineD3DDevice, (WINED3DCLIPSTATUS *)pClipStatus);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1674,7 +1676,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(IDirect3DDevice9Ex *iface,
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, &wined3d_texture);
|
hr = wined3d_device_get_texture(This->WineD3DDevice, Stage, &wined3d_texture);
|
||||||
if (SUCCEEDED(hr) && wined3d_texture)
|
if (SUCCEEDED(hr) && wined3d_texture)
|
||||||
{
|
{
|
||||||
*ppTexture = wined3d_texture_get_parent(wined3d_texture);
|
*ppTexture = wined3d_texture_get_parent(wined3d_texture);
|
||||||
|
@ -1703,7 +1705,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetTexture(IDirect3DDevice9Ex *iface,
|
||||||
TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture);
|
TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetTexture(device->WineD3DDevice, stage,
|
hr = wined3d_device_set_texture(device->WineD3DDevice, stage,
|
||||||
texture ? ((IDirect3DBaseTexture9Impl *)texture)->wined3d_texture : NULL);
|
texture ? ((IDirect3DBaseTexture9Impl *)texture)->wined3d_texture : NULL);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
|
@ -1762,7 +1764,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTextureStageState(IDirect3DDevice9
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetTextureStageState(This->WineD3DDevice, Stage, tss_lookup[Type], pValue);
|
hr = wined3d_device_get_texture_stage_state(This->WineD3DDevice, Stage, tss_lookup[Type], pValue);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1783,7 +1785,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetTextureStageState(IDirect3DDevice9
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetTextureStageState(This->WineD3DDevice, Stage, tss_lookup[Type], Value);
|
hr = wined3d_device_set_texture_stage_state(This->WineD3DDevice, Stage, tss_lookup[Type], Value);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1798,7 +1800,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetSamplerState(IDirect3DDevice9Ex *i
|
||||||
TRACE("iface %p, sampler %u, state %#x, value %p.\n", iface, Sampler, Type, pValue);
|
TRACE("iface %p, sampler %u, state %#x, value %p.\n", iface, Sampler, Type, pValue);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetSamplerState(This->WineD3DDevice, Sampler, Type, pValue);
|
hr = wined3d_device_get_sampler_state(This->WineD3DDevice, Sampler, Type, pValue);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1813,7 +1815,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_SetSamplerState(IDi
|
||||||
TRACE("iface %p, sampler %u, state %#x, value %#x.\n", iface, Sampler, Type, Value);
|
TRACE("iface %p, sampler %u, state %#x, value %#x.\n", iface, Sampler, Type, Value);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetSamplerState(This->WineD3DDevice, Sampler, Type, Value);
|
hr = wined3d_device_set_sampler_state(This->WineD3DDevice, Sampler, Type, Value);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1843,7 +1845,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPaletteEntries(IDirect3DDevice9Ex
|
||||||
TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries);
|
TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetPaletteEntries(This->WineD3DDevice, PaletteNumber, pEntries);
|
hr = wined3d_device_set_palette_entries(This->WineD3DDevice, PaletteNumber, pEntries);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1858,7 +1860,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetPaletteEntries(IDirect3DDevice9Ex
|
||||||
TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries);
|
TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetPaletteEntries(This->WineD3DDevice, PaletteNumber, pEntries);
|
hr = wined3d_device_get_palette_entries(This->WineD3DDevice, PaletteNumber, pEntries);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1873,7 +1875,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetCurrentTexturePalette(IDirect3DDev
|
||||||
TRACE("iface %p, palette_idx %u.\n", iface, PaletteNumber);
|
TRACE("iface %p, palette_idx %u.\n", iface, PaletteNumber);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetCurrentTexturePalette(This->WineD3DDevice, PaletteNumber);
|
hr = wined3d_device_set_current_texture_palette(This->WineD3DDevice, PaletteNumber);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1888,7 +1890,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetCurrentTexturePalette(IDirect3DDev
|
||||||
TRACE("iface %p, palette_idx %p.\n", iface, PaletteNumber);
|
TRACE("iface %p, palette_idx %p.\n", iface, PaletteNumber);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetCurrentTexturePalette(This->WineD3DDevice, PaletteNumber);
|
hr = wined3d_device_get_current_texture_palette(This->WineD3DDevice, PaletteNumber);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1903,7 +1905,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetScissorRect(IDirect3DDevice9Ex *if
|
||||||
TRACE("iface %p, rect %p.\n", iface, pRect);
|
TRACE("iface %p, rect %p.\n", iface, pRect);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetScissorRect(This->WineD3DDevice, pRect);
|
hr = wined3d_device_set_scissor_rect(This->WineD3DDevice, pRect);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1917,7 +1919,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetScissorRect(IDirect3DDevice9Ex *if
|
||||||
TRACE("iface %p, rect %p.\n", iface, pRect);
|
TRACE("iface %p, rect %p.\n", iface, pRect);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetScissorRect(This->WineD3DDevice, pRect);
|
hr = wined3d_device_get_scissor_rect(This->WineD3DDevice, pRect);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1932,7 +1934,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetSoftwareVertexProcessing(IDirect3D
|
||||||
TRACE("iface %p, software %#x.\n", iface, bSoftware);
|
TRACE("iface %p, software %#x.\n", iface, bSoftware);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetSoftwareVertexProcessing(This->WineD3DDevice, bSoftware);
|
hr = wined3d_device_set_software_vertex_processing(This->WineD3DDevice, bSoftware);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1946,7 +1948,7 @@ static BOOL WINAPI IDirect3DDevice9Impl_GetSoftwareVertexProcessing(IDirect3DDev
|
||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
ret = IWineD3DDevice_GetSoftwareVertexProcessing(This->WineD3DDevice);
|
ret = wined3d_device_get_software_vertex_processing(This->WineD3DDevice);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1960,7 +1962,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetNPatchMode(IDirect3DDevice9Ex *ifa
|
||||||
TRACE("iface %p, segment_count %.8e.\n", iface, nSegments);
|
TRACE("iface %p, segment_count %.8e.\n", iface, nSegments);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetNPatchMode(This->WineD3DDevice, nSegments);
|
hr = wined3d_device_set_npatch_mode(This->WineD3DDevice, nSegments);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -1974,7 +1976,7 @@ static float WINAPI IDirect3DDevice9Impl_GetNPatchMode(IDirect3DDevice9Ex *iface
|
||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
ret = IWineD3DDevice_GetNPatchMode(This->WineD3DDevice);
|
ret = wined3d_device_get_npatch_mode(This->WineD3DDevice);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -2011,7 +2013,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitive(IDirect3DDevice9
|
||||||
NumVertices, startIndex, primCount);
|
NumVertices, startIndex, primCount);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DDevice_SetBaseVertexIndex(This->WineD3DDevice, BaseVertexIndex);
|
wined3d_device_set_base_vertex_index(This->WineD3DDevice, BaseVertexIndex);
|
||||||
IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType);
|
IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType);
|
||||||
hr = IWineD3DDevice_DrawIndexedPrimitive(This->WineD3DDevice, startIndex,
|
hr = IWineD3DDevice_DrawIndexedPrimitive(This->WineD3DDevice, startIndex,
|
||||||
vertex_count_from_primitive_count(PrimitiveType, primCount));
|
vertex_count_from_primitive_count(PrimitiveType, primCount));
|
||||||
|
@ -2127,7 +2129,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(IDirect3DDevice9
|
||||||
TRACE("iface %p, declaration %p.\n", iface, declaration);
|
TRACE("iface %p, declaration %p.\n", iface, declaration);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice,
|
hr = wined3d_device_set_vertex_declaration(This->WineD3DDevice,
|
||||||
declaration ? ((IDirect3DVertexDeclaration9Impl *)declaration)->wineD3DVertexDeclaration : NULL);
|
declaration ? ((IDirect3DVertexDeclaration9Impl *)declaration)->wineD3DVertexDeclaration : NULL);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
|
@ -2146,7 +2148,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(IDirect3DDevice9
|
||||||
if (!declaration) return D3DERR_INVALIDCALL;
|
if (!declaration) return D3DERR_INVALIDCALL;
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetVertexDeclaration(This->WineD3DDevice, &wined3d_declaration);
|
hr = wined3d_device_get_vertex_declaration(This->WineD3DDevice, &wined3d_declaration);
|
||||||
if (SUCCEEDED(hr) && wined3d_declaration)
|
if (SUCCEEDED(hr) && wined3d_declaration)
|
||||||
{
|
{
|
||||||
*declaration = wined3d_vertex_declaration_get_parent(wined3d_declaration);
|
*declaration = wined3d_vertex_declaration_get_parent(wined3d_declaration);
|
||||||
|
@ -2321,7 +2323,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShader(IDirect3DDevice9Ex *i
|
||||||
TRACE("iface %p, shader %p.\n", iface, shader);
|
TRACE("iface %p, shader %p.\n", iface, shader);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetVertexShader(This->WineD3DDevice,
|
hr = wined3d_device_set_vertex_shader(This->WineD3DDevice,
|
||||||
shader ? ((IDirect3DVertexShader9Impl *)shader)->wined3d_shader : NULL);
|
shader ? ((IDirect3DVertexShader9Impl *)shader)->wined3d_shader : NULL);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
|
@ -2337,7 +2339,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(IDirect3DDevice9Ex *i
|
||||||
TRACE("iface %p, shader %p.\n", iface, shader);
|
TRACE("iface %p, shader %p.\n", iface, shader);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
wined3d_shader = IWineD3DDevice_GetVertexShader(This->WineD3DDevice);
|
wined3d_shader = wined3d_device_get_vertex_shader(This->WineD3DDevice);
|
||||||
if (wined3d_shader)
|
if (wined3d_shader)
|
||||||
{
|
{
|
||||||
*shader = wined3d_shader_get_parent(wined3d_shader);
|
*shader = wined3d_shader_get_parent(wined3d_shader);
|
||||||
|
@ -2371,7 +2373,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(IDirect3DDev
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetVertexShaderConstantF(This->WineD3DDevice, reg_idx, data, count);
|
hr = wined3d_device_set_vs_consts_f(This->WineD3DDevice, reg_idx, data, count);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2393,7 +2395,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantF(IDirect3DDev
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetVertexShaderConstantF(This->WineD3DDevice, reg_idx, data, count);
|
hr = wined3d_device_get_vs_consts_f(This->WineD3DDevice, reg_idx, data, count);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2408,7 +2410,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantI(IDirect3DDev
|
||||||
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetVertexShaderConstantI(This->WineD3DDevice, reg_idx, data, count);
|
hr = wined3d_device_set_vs_consts_i(This->WineD3DDevice, reg_idx, data, count);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2423,7 +2425,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantI(IDirect3DDev
|
||||||
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetVertexShaderConstantI(This->WineD3DDevice, reg_idx, data, count);
|
hr = wined3d_device_get_vs_consts_i(This->WineD3DDevice, reg_idx, data, count);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2438,7 +2440,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantB(IDirect3DDev
|
||||||
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetVertexShaderConstantB(This->WineD3DDevice, reg_idx, data, count);
|
hr = wined3d_device_set_vs_consts_b(This->WineD3DDevice, reg_idx, data, count);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2453,7 +2455,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantB(IDirect3DDev
|
||||||
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetVertexShaderConstantB(This->WineD3DDevice, reg_idx, data, count);
|
hr = wined3d_device_get_vs_consts_b(This->WineD3DDevice, reg_idx, data, count);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2469,7 +2471,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSource(IDirect3DDevice9Ex *i
|
||||||
iface, StreamNumber, pStreamData, OffsetInBytes, Stride);
|
iface, StreamNumber, pStreamData, OffsetInBytes, Stride);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetStreamSource(This->WineD3DDevice, StreamNumber,
|
hr = wined3d_device_set_stream_source(This->WineD3DDevice, StreamNumber,
|
||||||
pStreamData ? ((IDirect3DVertexBuffer9Impl *)pStreamData)->wineD3DVertexBuffer : NULL,
|
pStreamData ? ((IDirect3DVertexBuffer9Impl *)pStreamData)->wineD3DVertexBuffer : NULL,
|
||||||
OffsetInBytes, Stride);
|
OffsetInBytes, Stride);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
@ -2492,7 +2494,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSource(IDirect3DDevice9Ex *i
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetStreamSource(This->WineD3DDevice, StreamNumber, &retStream, OffsetInBytes, pStride);
|
hr = wined3d_device_get_stream_source(This->WineD3DDevice, StreamNumber, &retStream, OffsetInBytes, pStride);
|
||||||
if (SUCCEEDED(hr) && retStream)
|
if (SUCCEEDED(hr) && retStream)
|
||||||
{
|
{
|
||||||
*pStream = wined3d_buffer_get_parent(retStream);
|
*pStream = wined3d_buffer_get_parent(retStream);
|
||||||
|
@ -2521,7 +2523,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSourceFreq(IDirect3DDevice9E
|
||||||
TRACE("iface %p, stream_idx %u, freq %u.\n", iface, StreamNumber, Divider);
|
TRACE("iface %p, stream_idx %u, freq %u.\n", iface, StreamNumber, Divider);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetStreamSourceFreq(This->WineD3DDevice, StreamNumber, Divider);
|
hr = wined3d_device_set_stream_source_freq(This->WineD3DDevice, StreamNumber, Divider);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2536,7 +2538,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSourceFreq(IDirect3DDevice9E
|
||||||
TRACE("iface %p, stream_idx %u, freq %p.\n", iface, StreamNumber, Divider);
|
TRACE("iface %p, stream_idx %u, freq %p.\n", iface, StreamNumber, Divider);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetStreamSourceFreq(This->WineD3DDevice, StreamNumber, Divider);
|
hr = wined3d_device_get_stream_source_freq(This->WineD3DDevice, StreamNumber, Divider);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2552,7 +2554,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetIndices(IDirect3DDevice9Ex *iface,
|
||||||
TRACE("iface %p, buffer %p.\n", iface, pIndexData);
|
TRACE("iface %p, buffer %p.\n", iface, pIndexData);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetIndexBuffer(This->WineD3DDevice,
|
hr = wined3d_device_set_index_buffer(This->WineD3DDevice,
|
||||||
ib ? ib->wineD3DIndexBuffer : NULL,
|
ib ? ib->wineD3DIndexBuffer : NULL,
|
||||||
ib ? ib->format : WINED3DFMT_UNKNOWN);
|
ib ? ib->format : WINED3DFMT_UNKNOWN);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
@ -2574,7 +2576,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(IDirect3DDevice9Ex *iface,
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetIndexBuffer(This->WineD3DDevice, &retIndexData);
|
hr = wined3d_device_get_index_buffer(This->WineD3DDevice, &retIndexData);
|
||||||
if (SUCCEEDED(hr) && retIndexData)
|
if (SUCCEEDED(hr) && retIndexData)
|
||||||
{
|
{
|
||||||
*ppIndexData = wined3d_buffer_get_parent(retIndexData);
|
*ppIndexData = wined3d_buffer_get_parent(retIndexData);
|
||||||
|
@ -2630,7 +2632,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(IDirect3DDevice9Ex *if
|
||||||
TRACE("iface %p, shader %p.\n", iface, shader);
|
TRACE("iface %p, shader %p.\n", iface, shader);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetPixelShader(This->WineD3DDevice,
|
hr = wined3d_device_set_pixel_shader(This->WineD3DDevice,
|
||||||
shader ? ((IDirect3DPixelShader9Impl *)shader)->wined3d_shader : NULL);
|
shader ? ((IDirect3DPixelShader9Impl *)shader)->wined3d_shader : NULL);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
|
@ -2648,7 +2650,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(IDirect3DDevice9Ex *if
|
||||||
if (!shader) return D3DERR_INVALIDCALL;
|
if (!shader) return D3DERR_INVALIDCALL;
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
wined3d_shader = IWineD3DDevice_GetPixelShader(This->WineD3DDevice);
|
wined3d_shader = wined3d_device_get_pixel_shader(This->WineD3DDevice);
|
||||||
if (wined3d_shader)
|
if (wined3d_shader)
|
||||||
{
|
{
|
||||||
*shader = wined3d_shader_get_parent(wined3d_shader);
|
*shader = wined3d_shader_get_parent(wined3d_shader);
|
||||||
|
@ -2675,7 +2677,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantF(IDirect3DDevi
|
||||||
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetPixelShaderConstantF(This->WineD3DDevice, reg_idx, data, count);
|
hr = wined3d_device_set_ps_consts_f(This->WineD3DDevice, reg_idx, data, count);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2690,7 +2692,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantF(IDirect3DDevi
|
||||||
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetPixelShaderConstantF(This->WineD3DDevice, reg_idx, data, count);
|
hr = wined3d_device_get_ps_consts_f(This->WineD3DDevice, reg_idx, data, count);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2705,7 +2707,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantI(IDirect3DDevi
|
||||||
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetPixelShaderConstantI(This->WineD3DDevice, reg_idx, data, count);
|
hr = wined3d_device_set_ps_consts_i(This->WineD3DDevice, reg_idx, data, count);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2720,7 +2722,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantI(IDirect3DDevi
|
||||||
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetPixelShaderConstantI(This->WineD3DDevice, reg_idx, data, count);
|
hr = wined3d_device_get_ps_consts_i(This->WineD3DDevice, reg_idx, data, count);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2735,7 +2737,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantB(IDirect3DDevi
|
||||||
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_SetPixelShaderConstantB(This->WineD3DDevice, reg_idx, data, count);
|
hr = wined3d_device_set_ps_consts_b(This->WineD3DDevice, reg_idx, data, count);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2750,7 +2752,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantB(IDirect3DDevi
|
||||||
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_GetPixelShaderConstantB(This->WineD3DDevice, reg_idx, data, count);
|
hr = wined3d_device_get_ps_consts_b(This->WineD3DDevice, reg_idx, data, count);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
|
|
|
@ -297,7 +297,7 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface)
|
||||||
|
|
||||||
/* Set the device up to render to the front buffer since the back
|
/* Set the device up to render to the front buffer since the back
|
||||||
* buffer will vanish soon. */
|
* buffer will vanish soon. */
|
||||||
IWineD3DDevice_SetRenderTarget(This->wineD3DDevice, 0,
|
wined3d_device_set_render_target(This->wineD3DDevice, 0,
|
||||||
This->ddraw->d3d_target->wined3d_surface, TRUE);
|
This->ddraw->d3d_target->wined3d_surface, TRUE);
|
||||||
|
|
||||||
/* Release the WineD3DDevice. This won't destroy it */
|
/* Release the WineD3DDevice. This won't destroy it */
|
||||||
|
@ -1373,24 +1373,14 @@ IDirect3DDeviceImpl_1_SetMatrix(IDirect3DDevice *iface,
|
||||||
|
|
||||||
*m = *D3DMatrix;
|
*m = *D3DMatrix;
|
||||||
|
|
||||||
if(This->world == D3DMatHandle)
|
if (D3DMatHandle == This->world)
|
||||||
{
|
wined3d_device_set_transform(This->wineD3DDevice, WINED3DTS_WORLDMATRIX(0), (WINED3DMATRIX *)D3DMatrix);
|
||||||
IWineD3DDevice_SetTransform(This->wineD3DDevice,
|
|
||||||
WINED3DTS_WORLDMATRIX(0),
|
if (D3DMatHandle == This->view)
|
||||||
(WINED3DMATRIX *) D3DMatrix);
|
wined3d_device_set_transform(This->wineD3DDevice, WINED3DTS_VIEW, (WINED3DMATRIX *)D3DMatrix);
|
||||||
}
|
|
||||||
if(This->view == D3DMatHandle)
|
if (D3DMatHandle == This->proj)
|
||||||
{
|
wined3d_device_set_transform(This->wineD3DDevice, WINED3DTS_PROJECTION, (WINED3DMATRIX *)D3DMatrix);
|
||||||
IWineD3DDevice_SetTransform(This->wineD3DDevice,
|
|
||||||
WINED3DTS_VIEW,
|
|
||||||
(WINED3DMATRIX *) D3DMatrix);
|
|
||||||
}
|
|
||||||
if(This->proj == D3DMatHandle)
|
|
||||||
{
|
|
||||||
IWineD3DDevice_SetTransform(This->wineD3DDevice,
|
|
||||||
WINED3DTS_PROJECTION,
|
|
||||||
(WINED3DMATRIX *) D3DMatrix);
|
|
||||||
}
|
|
||||||
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return D3D_OK;
|
return D3D_OK;
|
||||||
|
@ -1861,7 +1851,7 @@ IDirect3DDeviceImpl_7_SetRenderTarget(IDirect3DDevice7 *iface,
|
||||||
return D3D_OK;
|
return D3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IWineD3DDevice_SetRenderTarget(This->wineD3DDevice, 0,
|
hr = wined3d_device_set_render_target(This->wineD3DDevice, 0,
|
||||||
Target ? Target->wined3d_surface : NULL, FALSE);
|
Target ? Target->wined3d_surface : NULL, FALSE);
|
||||||
if(hr != D3D_OK)
|
if(hr != D3D_OK)
|
||||||
{
|
{
|
||||||
|
@ -2271,9 +2261,7 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
|
||||||
{
|
{
|
||||||
WINED3DTEXTUREFILTERTYPE tex_mag;
|
WINED3DTEXTUREFILTERTYPE tex_mag;
|
||||||
|
|
||||||
hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
|
hr = wined3d_device_get_sampler_state(This->wineD3DDevice, 0, WINED3DSAMP_MAGFILTER, &tex_mag);
|
||||||
0, WINED3DSAMP_MAGFILTER,
|
|
||||||
&tex_mag);
|
|
||||||
|
|
||||||
switch (tex_mag)
|
switch (tex_mag)
|
||||||
{
|
{
|
||||||
|
@ -2295,14 +2283,14 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
|
||||||
WINED3DTEXTUREFILTERTYPE tex_min;
|
WINED3DTEXTUREFILTERTYPE tex_min;
|
||||||
WINED3DTEXTUREFILTERTYPE tex_mip;
|
WINED3DTEXTUREFILTERTYPE tex_mip;
|
||||||
|
|
||||||
hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
|
hr = wined3d_device_get_sampler_state(This->wineD3DDevice,
|
||||||
0, WINED3DSAMP_MINFILTER, &tex_min);
|
0, WINED3DSAMP_MINFILTER, &tex_min);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
|
hr = wined3d_device_get_sampler_state(This->wineD3DDevice,
|
||||||
0, WINED3DSAMP_MIPFILTER, &tex_mip);
|
0, WINED3DSAMP_MIPFILTER, &tex_mip);
|
||||||
|
|
||||||
switch (tex_min)
|
switch (tex_min)
|
||||||
|
@ -2353,14 +2341,12 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
|
||||||
|
|
||||||
case D3DRENDERSTATE_TEXTUREADDRESS:
|
case D3DRENDERSTATE_TEXTUREADDRESS:
|
||||||
case D3DRENDERSTATE_TEXTUREADDRESSU:
|
case D3DRENDERSTATE_TEXTUREADDRESSU:
|
||||||
hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
|
hr = wined3d_device_get_sampler_state(This->wineD3DDevice,
|
||||||
0, WINED3DSAMP_ADDRESSU,
|
0, WINED3DSAMP_ADDRESSU, Value);
|
||||||
Value);
|
|
||||||
break;
|
break;
|
||||||
case D3DRENDERSTATE_TEXTUREADDRESSV:
|
case D3DRENDERSTATE_TEXTUREADDRESSV:
|
||||||
hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
|
hr = wined3d_device_get_sampler_state(This->wineD3DDevice,
|
||||||
0, WINED3DSAMP_ADDRESSV,
|
0, WINED3DSAMP_ADDRESSV, Value);
|
||||||
Value);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D3DRENDERSTATE_BORDERCOLOR:
|
case D3DRENDERSTATE_BORDERCOLOR:
|
||||||
|
@ -2382,10 +2368,9 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
|
||||||
float f;
|
float f;
|
||||||
} wined3d_value;
|
} wined3d_value;
|
||||||
|
|
||||||
hr = IWineD3DDevice_GetRenderState(This->wineD3DDevice,
|
hr = wined3d_device_get_render_state(This->wineD3DDevice, WINED3DRS_DEPTHBIAS, &wined3d_value.d);
|
||||||
WINED3DRS_DEPTHBIAS,
|
if (SUCCEEDED(hr))
|
||||||
&wined3d_value.d);
|
*Value = wined3d_value.f / zbias_factor;
|
||||||
if (SUCCEEDED(hr)) *Value = wined3d_value.f / zbias_factor;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2398,9 +2383,7 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
|
||||||
hr = E_NOTIMPL;
|
hr = E_NOTIMPL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
hr = IWineD3DDevice_GetRenderState(This->wineD3DDevice,
|
hr = wined3d_device_get_render_state(This->wineD3DDevice, RenderStateType, Value);
|
||||||
RenderStateType,
|
|
||||||
Value);
|
|
||||||
}
|
}
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -2450,7 +2433,7 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface,
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
|
|
||||||
hr = IWineD3DDevice_GetTexture(This->wineD3DDevice, 0, &tex);
|
hr = wined3d_device_get_texture(This->wineD3DDevice, 0, &tex);
|
||||||
if (SUCCEEDED(hr) && tex)
|
if (SUCCEEDED(hr) && tex)
|
||||||
{
|
{
|
||||||
/* The parent of the texture is the IDirectDrawSurface7
|
/* The parent of the texture is the IDirectDrawSurface7
|
||||||
|
@ -2476,12 +2459,12 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface,
|
||||||
|
|
||||||
This->legacyTextureBlending = TRUE;
|
This->legacyTextureBlending = TRUE;
|
||||||
|
|
||||||
IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, &colorop);
|
wined3d_device_get_texture_stage_state(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, &colorop);
|
||||||
IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, &colorarg1);
|
wined3d_device_get_texture_stage_state(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, &colorarg1);
|
||||||
IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG2, &colorarg2);
|
wined3d_device_get_texture_stage_state(This->wineD3DDevice, 0, WINED3DTSS_COLORARG2, &colorarg2);
|
||||||
IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, &alphaop);
|
wined3d_device_get_texture_stage_state(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, &alphaop);
|
||||||
IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG1, &alphaarg1);
|
wined3d_device_get_texture_stage_state(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG1, &alphaarg1);
|
||||||
IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG2, &alphaarg2);
|
wined3d_device_get_texture_stage_state(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG2, &alphaarg2);
|
||||||
|
|
||||||
if (colorop == WINED3DTOP_SELECTARG1 && colorarg1 == WINED3DTA_TEXTURE &&
|
if (colorop == WINED3DTOP_SELECTARG1 && colorarg1 == WINED3DTA_TEXTURE &&
|
||||||
alphaop == WINED3DTOP_SELECTARG1 && alphaarg1 == WINED3DTA_TEXTURE)
|
alphaop == WINED3DTOP_SELECTARG1 && alphaarg1 == WINED3DTA_TEXTURE)
|
||||||
|
@ -2505,7 +2488,7 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface,
|
||||||
BOOL tex_alpha = FALSE;
|
BOOL tex_alpha = FALSE;
|
||||||
DDPIXELFORMAT ddfmt;
|
DDPIXELFORMAT ddfmt;
|
||||||
|
|
||||||
hr = IWineD3DDevice_GetTexture(This->wineD3DDevice, 0, &tex);
|
hr = wined3d_device_get_texture(This->wineD3DDevice, 0, &tex);
|
||||||
|
|
||||||
if(hr == WINED3D_OK && tex)
|
if(hr == WINED3D_OK && tex)
|
||||||
{
|
{
|
||||||
|
@ -2621,9 +2604,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
|
hr = wined3d_device_set_sampler_state(This->wineD3DDevice, 0, WINED3DSAMP_MAGFILTER, tex_mag);
|
||||||
0, WINED3DSAMP_MAGFILTER,
|
|
||||||
tex_mag);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2666,28 +2647,24 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
|
wined3d_device_set_sampler_state(This->wineD3DDevice,
|
||||||
0, WINED3DSAMP_MIPFILTER, tex_mip);
|
0, WINED3DSAMP_MIPFILTER, tex_mip);
|
||||||
hr = IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
|
hr = wined3d_device_set_sampler_state(This->wineD3DDevice,
|
||||||
0, WINED3DSAMP_MINFILTER,
|
0, WINED3DSAMP_MINFILTER, tex_min);
|
||||||
tex_min);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case D3DRENDERSTATE_TEXTUREADDRESS:
|
case D3DRENDERSTATE_TEXTUREADDRESS:
|
||||||
IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
|
wined3d_device_set_sampler_state(This->wineD3DDevice,
|
||||||
0, WINED3DSAMP_ADDRESSV,
|
0, WINED3DSAMP_ADDRESSV, Value);
|
||||||
Value);
|
|
||||||
/* Drop through */
|
/* Drop through */
|
||||||
case D3DRENDERSTATE_TEXTUREADDRESSU:
|
case D3DRENDERSTATE_TEXTUREADDRESSU:
|
||||||
hr = IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
|
hr = wined3d_device_set_sampler_state(This->wineD3DDevice,
|
||||||
0, WINED3DSAMP_ADDRESSU,
|
0, WINED3DSAMP_ADDRESSU, Value);
|
||||||
Value);
|
|
||||||
break;
|
break;
|
||||||
case D3DRENDERSTATE_TEXTUREADDRESSV:
|
case D3DRENDERSTATE_TEXTUREADDRESSV:
|
||||||
hr = IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
|
hr = wined3d_device_set_sampler_state(This->wineD3DDevice,
|
||||||
0, WINED3DSAMP_ADDRESSV,
|
0, WINED3DSAMP_ADDRESSV, Value);
|
||||||
Value);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D3DRENDERSTATE_BORDERCOLOR:
|
case D3DRENDERSTATE_BORDERCOLOR:
|
||||||
|
@ -2711,9 +2688,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
|
||||||
float f;
|
float f;
|
||||||
} wined3d_value;
|
} wined3d_value;
|
||||||
wined3d_value.f = Value * zbias_factor;
|
wined3d_value.f = Value * zbias_factor;
|
||||||
hr = IWineD3DDevice_SetRenderState(This->wineD3DDevice,
|
hr = wined3d_device_set_render_state(This->wineD3DDevice, WINED3DRS_DEPTHBIAS, wined3d_value.d);
|
||||||
WINED3DRS_DEPTHBIAS,
|
|
||||||
wined3d_value.d);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2727,9 +2702,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IWineD3DDevice_SetRenderState(This->wineD3DDevice,
|
hr = wined3d_device_set_render_state(This->wineD3DDevice, RenderStateType, Value);
|
||||||
RenderStateType,
|
|
||||||
Value);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
|
@ -2798,9 +2771,7 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
|
||||||
|
|
||||||
if(Value == 0)
|
if(Value == 0)
|
||||||
{
|
{
|
||||||
hr = IWineD3DDevice_SetTexture(This->wineD3DDevice,
|
hr = wined3d_device_set_texture(This->wineD3DDevice, 0, NULL);
|
||||||
0,
|
|
||||||
NULL);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2828,7 +2799,7 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
|
||||||
BOOL tex_alpha = FALSE;
|
BOOL tex_alpha = FALSE;
|
||||||
DDPIXELFORMAT ddfmt;
|
DDPIXELFORMAT ddfmt;
|
||||||
|
|
||||||
hr = IWineD3DDevice_GetTexture(This->wineD3DDevice, 0, &tex);
|
hr = wined3d_device_get_texture(This->wineD3DDevice, 0, &tex);
|
||||||
|
|
||||||
if(hr == WINED3D_OK && tex)
|
if(hr == WINED3D_OK && tex)
|
||||||
{
|
{
|
||||||
|
@ -2848,49 +2819,75 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tex_alpha)
|
if (tex_alpha)
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG1);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG1);
|
||||||
else
|
else
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG1, WINED3DTA_TEXTURE);
|
0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2);
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE);
|
0, WINED3DTSS_ALPHAARG1, WINED3DTA_TEXTURE);
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, WINED3DTOP_MODULATE);
|
0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT);
|
||||||
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE);
|
||||||
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT);
|
||||||
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_COLOROP, WINED3DTOP_MODULATE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case D3DTBLEND_ADD:
|
case D3DTBLEND_ADD:
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, WINED3DTOP_ADD);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE);
|
0, WINED3DTSS_COLOROP, WINED3DTOP_ADD);
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2);
|
0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE);
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT);
|
||||||
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2);
|
||||||
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D3DTBLEND_MODULATEALPHA:
|
case D3DTBLEND_MODULATEALPHA:
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG1, WINED3DTA_TEXTURE);
|
0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE);
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT);
|
0, WINED3DTSS_ALPHAARG1, WINED3DTA_TEXTURE);
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, WINED3DTOP_MODULATE);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_MODULATE);
|
0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT);
|
||||||
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT);
|
||||||
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_COLOROP, WINED3DTOP_MODULATE);
|
||||||
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_ALPHAOP, WINED3DTOP_MODULATE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D3DTBLEND_COPY:
|
case D3DTBLEND_COPY:
|
||||||
case D3DTBLEND_DECAL:
|
case D3DTBLEND_DECAL:
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG1, WINED3DTA_TEXTURE);
|
0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE);
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, WINED3DTOP_SELECTARG1);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG1);
|
0, WINED3DTSS_ALPHAARG1, WINED3DTA_TEXTURE);
|
||||||
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_COLOROP, WINED3DTOP_SELECTARG1);
|
||||||
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D3DTBLEND_DECALALPHA:
|
case D3DTBLEND_DECALALPHA:
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, WINED3DTOP_BLENDTEXTUREALPHA);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE);
|
0, WINED3DTSS_COLOROP, WINED3DTOP_BLENDTEXTUREALPHA);
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2);
|
0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE);
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT);
|
||||||
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2);
|
||||||
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice,
|
||||||
|
0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -3171,14 +3168,12 @@ IDirect3DDeviceImpl_7_SetTransform(IDirect3DDevice7 *iface,
|
||||||
default: type = TransformStateType;
|
default: type = TransformStateType;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Matrix)
|
if (!Matrix)
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_SetTransform(This->wineD3DDevice,
|
hr = wined3d_device_set_transform(This->wineD3DDevice, type, (WINED3DMATRIX *)Matrix);
|
||||||
type,
|
|
||||||
(WINED3DMATRIX*) Matrix);
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
@ -3268,7 +3263,7 @@ IDirect3DDeviceImpl_7_GetTransform(IDirect3DDevice7 *iface,
|
||||||
|
|
||||||
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_GetTransform(This->wineD3DDevice, type, (WINED3DMATRIX*) Matrix);
|
hr = wined3d_device_get_transform(This->wineD3DDevice, type, (WINED3DMATRIX *)Matrix);
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
@ -3450,7 +3445,7 @@ IDirect3DDeviceImpl_7_DrawPrimitive(IDirect3DDevice7 *iface,
|
||||||
|
|
||||||
/* Set the FVF */
|
/* Set the FVF */
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_SetVertexDeclaration(This->wineD3DDevice, ddraw_find_decl(This->ddraw, VertexType));
|
hr = wined3d_device_set_vertex_declaration(This->wineD3DDevice, ddraw_find_decl(This->ddraw, VertexType));
|
||||||
if(hr != D3D_OK)
|
if(hr != D3D_OK)
|
||||||
{
|
{
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
|
@ -3569,7 +3564,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitive(IDirect3DDevice7 *iface,
|
||||||
|
|
||||||
/* Set the D3DDevice's FVF */
|
/* Set the D3DDevice's FVF */
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_SetVertexDeclaration(This->wineD3DDevice, ddraw_find_decl(This->ddraw, VertexType));
|
hr = wined3d_device_set_vertex_declaration(This->wineD3DDevice, ddraw_find_decl(This->ddraw, VertexType));
|
||||||
if(FAILED(hr))
|
if(FAILED(hr))
|
||||||
{
|
{
|
||||||
ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr);
|
ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr);
|
||||||
|
@ -4065,9 +4060,8 @@ IDirect3DDeviceImpl_7_DrawPrimitiveVB(IDirect3DDevice7 *iface,
|
||||||
stride = get_flexible_vertex_size(vb->fvf);
|
stride = get_flexible_vertex_size(vb->fvf);
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_SetVertexDeclaration(This->wineD3DDevice,
|
hr = wined3d_device_set_vertex_declaration(This->wineD3DDevice, vb->wineD3DVertexDeclaration);
|
||||||
vb->wineD3DVertexDeclaration);
|
if (FAILED(hr))
|
||||||
if(FAILED(hr))
|
|
||||||
{
|
{
|
||||||
ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr);
|
ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr);
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
|
@ -4075,11 +4069,7 @@ IDirect3DDeviceImpl_7_DrawPrimitiveVB(IDirect3DDevice7 *iface,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the vertex stream source */
|
/* Set the vertex stream source */
|
||||||
hr = IWineD3DDevice_SetStreamSource(This->wineD3DDevice,
|
hr = wined3d_device_set_stream_source(This->wineD3DDevice, 0, vb->wineD3DVertexBuffer, 0, stride);
|
||||||
0 /* StreamNumber */,
|
|
||||||
vb->wineD3DVertexBuffer,
|
|
||||||
0 /* StartVertex - we pass this to DrawPrimitive */,
|
|
||||||
stride);
|
|
||||||
if(hr != D3D_OK)
|
if(hr != D3D_OK)
|
||||||
{
|
{
|
||||||
ERR("(%p) IDirect3DDevice::SetStreamSource failed with hr = %08x\n", This, hr);
|
ERR("(%p) IDirect3DDevice::SetStreamSource failed with hr = %08x\n", This, hr);
|
||||||
|
@ -4184,9 +4174,8 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
|
|
||||||
hr = IWineD3DDevice_SetVertexDeclaration(This->wineD3DDevice,
|
hr = wined3d_device_set_vertex_declaration(This->wineD3DDevice, vb->wineD3DVertexDeclaration);
|
||||||
vb->wineD3DVertexDeclaration);
|
if (FAILED(hr))
|
||||||
if(FAILED(hr))
|
|
||||||
{
|
{
|
||||||
ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr);
|
ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr);
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
|
@ -4233,17 +4222,12 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
|
||||||
wined3d_buffer_unmap(This->indexbuffer);
|
wined3d_buffer_unmap(This->indexbuffer);
|
||||||
|
|
||||||
/* Set the index stream */
|
/* Set the index stream */
|
||||||
IWineD3DDevice_SetBaseVertexIndex(This->wineD3DDevice, StartVertex);
|
wined3d_device_set_base_vertex_index(This->wineD3DDevice, StartVertex);
|
||||||
hr = IWineD3DDevice_SetIndexBuffer(This->wineD3DDevice, This->indexbuffer,
|
hr = wined3d_device_set_index_buffer(This->wineD3DDevice, This->indexbuffer, WINED3DFMT_R16_UINT);
|
||||||
WINED3DFMT_R16_UINT);
|
|
||||||
|
|
||||||
/* Set the vertex stream source */
|
/* Set the vertex stream source */
|
||||||
hr = IWineD3DDevice_SetStreamSource(This->wineD3DDevice,
|
hr = wined3d_device_set_stream_source(This->wineD3DDevice, 0, vb->wineD3DVertexBuffer, 0, stride);
|
||||||
0 /* StreamNumber */,
|
if (FAILED(hr))
|
||||||
vb->wineD3DVertexBuffer,
|
|
||||||
0 /* offset, we pass this to DrawIndexedPrimitive */,
|
|
||||||
stride);
|
|
||||||
if(hr != D3D_OK)
|
|
||||||
{
|
{
|
||||||
ERR("(%p) IDirect3DDevice::SetStreamSource failed with hr = %08x\n", This, hr);
|
ERR("(%p) IDirect3DDevice::SetStreamSource failed with hr = %08x\n", This, hr);
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
|
@ -4462,7 +4446,7 @@ IDirect3DDeviceImpl_7_GetTexture(IDirect3DDevice7 *iface,
|
||||||
}
|
}
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_GetTexture(This->wineD3DDevice, Stage, &wined3d_texture);
|
hr = wined3d_device_get_texture(This->wineD3DDevice, Stage, &wined3d_texture);
|
||||||
if (FAILED(hr) || !wined3d_texture)
|
if (FAILED(hr) || !wined3d_texture)
|
||||||
{
|
{
|
||||||
*Texture = NULL;
|
*Texture = NULL;
|
||||||
|
@ -4545,7 +4529,7 @@ IDirect3DDeviceImpl_7_SetTexture(IDirect3DDevice7 *iface,
|
||||||
|
|
||||||
/* Texture may be NULL here */
|
/* Texture may be NULL here */
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_SetTexture(This->wineD3DDevice,
|
hr = wined3d_device_set_texture(This->wineD3DDevice,
|
||||||
Stage, surf ? surf->wined3d_texture : NULL);
|
Stage, surf ? surf->wined3d_texture : NULL);
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -4602,9 +4586,8 @@ IDirect3DDeviceImpl_3_SetTexture(IDirect3DDevice3 *iface,
|
||||||
DDPIXELFORMAT ddfmt;
|
DDPIXELFORMAT ddfmt;
|
||||||
HRESULT result;
|
HRESULT result;
|
||||||
|
|
||||||
result = IWineD3DDevice_GetTexture(This->wineD3DDevice, 0, &tex);
|
result = wined3d_device_get_texture(This->wineD3DDevice, 0, &tex);
|
||||||
|
if (result == WINED3D_OK && tex)
|
||||||
if(result == WINED3D_OK && tex)
|
|
||||||
{
|
{
|
||||||
struct wined3d_resource *sub_resource;
|
struct wined3d_resource *sub_resource;
|
||||||
|
|
||||||
|
@ -4623,9 +4606,9 @@ IDirect3DDeviceImpl_3_SetTexture(IDirect3DDevice3 *iface,
|
||||||
|
|
||||||
/* Arg 1/2 are already set to WINED3DTA_TEXTURE/WINED3DTA_CURRENT in case of D3DTBLEND_MODULATE */
|
/* Arg 1/2 are already set to WINED3DTA_TEXTURE/WINED3DTA_CURRENT in case of D3DTBLEND_MODULATE */
|
||||||
if (tex_alpha)
|
if (tex_alpha)
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG1);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG1);
|
||||||
else
|
else
|
||||||
IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2);
|
wined3d_device_set_texture_stage_state(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2);
|
||||||
}
|
}
|
||||||
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
|
@ -4713,7 +4696,7 @@ IDirect3DDeviceImpl_7_GetTextureStageState(IDirect3DDevice7 *iface,
|
||||||
|
|
||||||
if (l->sampler_state)
|
if (l->sampler_state)
|
||||||
{
|
{
|
||||||
hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice, Stage, l->state, State);
|
hr = wined3d_device_get_sampler_state(This->wineD3DDevice, Stage, l->state, State);
|
||||||
|
|
||||||
switch(TexStageStateType)
|
switch(TexStageStateType)
|
||||||
{
|
{
|
||||||
|
@ -4757,7 +4740,7 @@ IDirect3DDeviceImpl_7_GetTextureStageState(IDirect3DDevice7 *iface,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hr = IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, Stage, l->state, State);
|
hr = wined3d_device_get_texture_stage_state(This->wineD3DDevice, Stage, l->state, State);
|
||||||
}
|
}
|
||||||
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
|
@ -4880,18 +4863,18 @@ IDirect3DDeviceImpl_7_SetTextureStageState(IDirect3DDevice7 *iface,
|
||||||
}
|
}
|
||||||
|
|
||||||
case D3DTSS_ADDRESS:
|
case D3DTSS_ADDRESS:
|
||||||
IWineD3DDevice_SetSamplerState(This->wineD3DDevice, Stage, WINED3DSAMP_ADDRESSV, State);
|
wined3d_device_set_sampler_state(This->wineD3DDevice, Stage, WINED3DSAMP_ADDRESSV, State);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IWineD3DDevice_SetSamplerState(This->wineD3DDevice, Stage, l->state, State);
|
hr = wined3d_device_set_sampler_state(This->wineD3DDevice, Stage, l->state, State);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hr = IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, Stage, l->state, State);
|
hr = wined3d_device_set_texture_stage_state(This->wineD3DDevice, Stage, l->state, State);
|
||||||
}
|
}
|
||||||
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
|
@ -5098,8 +5081,7 @@ IDirect3DDeviceImpl_7_SetViewport(IDirect3DDevice7 *iface,
|
||||||
|
|
||||||
/* Note: D3DVIEWPORT7 is compatible with WINED3DVIEWPORT */
|
/* Note: D3DVIEWPORT7 is compatible with WINED3DVIEWPORT */
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_SetViewport(This->wineD3DDevice,
|
hr = wined3d_device_set_viewport(This->wineD3DDevice, (WINED3DVIEWPORT *)Data);
|
||||||
(WINED3DVIEWPORT*) Data);
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
@ -5155,8 +5137,7 @@ IDirect3DDeviceImpl_7_GetViewport(IDirect3DDevice7 *iface,
|
||||||
|
|
||||||
/* Note: D3DVIEWPORT7 is compatible with WINED3DVIEWPORT */
|
/* Note: D3DVIEWPORT7 is compatible with WINED3DVIEWPORT */
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_GetViewport(This->wineD3DDevice,
|
hr = wined3d_device_get_viewport(This->wineD3DDevice, (WINED3DVIEWPORT *)Data);
|
||||||
(WINED3DVIEWPORT*) Data);
|
|
||||||
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr_ddraw_from_wined3d(hr);
|
return hr_ddraw_from_wined3d(hr);
|
||||||
|
@ -5211,8 +5192,7 @@ IDirect3DDeviceImpl_7_SetMaterial(IDirect3DDevice7 *iface,
|
||||||
if (!Mat) return DDERR_INVALIDPARAMS;
|
if (!Mat) return DDERR_INVALIDPARAMS;
|
||||||
/* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */
|
/* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_SetMaterial(This->wineD3DDevice,
|
hr = wined3d_device_set_material(This->wineD3DDevice, (WINED3DMATERIAL *)Mat);
|
||||||
(WINED3DMATERIAL*) Mat);
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr_ddraw_from_wined3d(hr);
|
return hr_ddraw_from_wined3d(hr);
|
||||||
}
|
}
|
||||||
|
@ -5265,8 +5245,7 @@ IDirect3DDeviceImpl_7_GetMaterial(IDirect3DDevice7 *iface,
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
/* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */
|
/* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */
|
||||||
hr = IWineD3DDevice_GetMaterial(This->wineD3DDevice,
|
hr = wined3d_device_get_material(This->wineD3DDevice, (WINED3DMATERIAL *)Mat);
|
||||||
(WINED3DMATERIAL*) Mat);
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr_ddraw_from_wined3d(hr);
|
return hr_ddraw_from_wined3d(hr);
|
||||||
}
|
}
|
||||||
|
@ -5320,9 +5299,7 @@ IDirect3DDeviceImpl_7_SetLight(IDirect3DDevice7 *iface,
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
/* Note: D3DLIGHT7 is compatible with WINED3DLIGHT */
|
/* Note: D3DLIGHT7 is compatible with WINED3DLIGHT */
|
||||||
hr = IWineD3DDevice_SetLight(This->wineD3DDevice,
|
hr = wined3d_device_set_light(This->wineD3DDevice, LightIndex, (WINED3DLIGHT *)Light);
|
||||||
LightIndex,
|
|
||||||
(WINED3DLIGHT*) Light);
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr_ddraw_from_wined3d(hr);
|
return hr_ddraw_from_wined3d(hr);
|
||||||
}
|
}
|
||||||
|
@ -5376,9 +5353,7 @@ IDirect3DDeviceImpl_7_GetLight(IDirect3DDevice7 *iface,
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
/* Note: D3DLIGHT7 is compatible with WINED3DLIGHT */
|
/* Note: D3DLIGHT7 is compatible with WINED3DLIGHT */
|
||||||
rc = IWineD3DDevice_GetLight(This->wineD3DDevice,
|
rc = wined3d_device_get_light(This->wineD3DDevice, LightIndex, (WINED3DLIGHT *)Light);
|
||||||
LightIndex,
|
|
||||||
(WINED3DLIGHT*) Light);
|
|
||||||
|
|
||||||
/* Translate the result. WineD3D returns other values than D3D7 */
|
/* Translate the result. WineD3D returns other values than D3D7 */
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
|
@ -6273,7 +6248,7 @@ IDirect3DDeviceImpl_7_LightEnable(IDirect3DDevice7 *iface,
|
||||||
TRACE("iface %p, light_idx %u, enabled %#x.\n", iface, LightIndex, Enable);
|
TRACE("iface %p, light_idx %u, enabled %#x.\n", iface, LightIndex, Enable);
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_SetLightEnable(This->wineD3DDevice, LightIndex, Enable);
|
hr = wined3d_device_set_light_enable(This->wineD3DDevice, LightIndex, Enable);
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr_ddraw_from_wined3d(hr);
|
return hr_ddraw_from_wined3d(hr);
|
||||||
}
|
}
|
||||||
|
@ -6332,7 +6307,7 @@ IDirect3DDeviceImpl_7_GetLightEnable(IDirect3DDevice7 *iface,
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_GetLightEnable(This->wineD3DDevice, LightIndex, Enable);
|
hr = wined3d_device_get_light_enable(This->wineD3DDevice, LightIndex, Enable);
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr_ddraw_from_wined3d(hr);
|
return hr_ddraw_from_wined3d(hr);
|
||||||
}
|
}
|
||||||
|
@ -6391,7 +6366,7 @@ IDirect3DDeviceImpl_7_SetClipPlane(IDirect3DDevice7 *iface,
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_SetClipPlane(This->wineD3DDevice, Index, PlaneEquation);
|
hr = wined3d_device_set_clip_plane(This->wineD3DDevice, Index, PlaneEquation);
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
@ -6448,7 +6423,7 @@ IDirect3DDeviceImpl_7_GetClipPlane(IDirect3DDevice7 *iface,
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_GetClipPlane(This->wineD3DDevice, Index, PlaneEquation);
|
hr = wined3d_device_get_clip_plane(This->wineD3DDevice, Index, PlaneEquation);
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
@ -6772,14 +6747,13 @@ IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This)
|
||||||
if(!depthStencil)
|
if(!depthStencil)
|
||||||
{
|
{
|
||||||
TRACE("Setting wined3d depth stencil to NULL\n");
|
TRACE("Setting wined3d depth stencil to NULL\n");
|
||||||
IWineD3DDevice_SetDepthStencilSurface(This->wineD3DDevice,
|
wined3d_device_set_depth_stencil(This->wineD3DDevice, NULL);
|
||||||
NULL);
|
|
||||||
return WINED3DZB_FALSE;
|
return WINED3DZB_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
dsi = (IDirectDrawSurfaceImpl *)depthStencil;
|
dsi = (IDirectDrawSurfaceImpl *)depthStencil;
|
||||||
TRACE("Setting wined3d depth stencil to %p (wined3d %p)\n", dsi, dsi->wined3d_surface);
|
TRACE("Setting wined3d depth stencil to %p (wined3d %p)\n", dsi, dsi->wined3d_surface);
|
||||||
IWineD3DDevice_SetDepthStencilSurface(This->wineD3DDevice, dsi->wined3d_surface);
|
wined3d_device_set_depth_stencil(This->wineD3DDevice, dsi->wined3d_surface);
|
||||||
|
|
||||||
IDirectDrawSurface7_Release(depthStencil);
|
IDirectDrawSurface7_Release(depthStencil);
|
||||||
return WINED3DZB_TRUE;
|
return WINED3DZB_TRUE;
|
||||||
|
@ -6826,7 +6800,7 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi
|
||||||
IWineD3DDevice_AddRef(ddraw->wineD3DDevice);
|
IWineD3DDevice_AddRef(ddraw->wineD3DDevice);
|
||||||
|
|
||||||
/* Render to the back buffer */
|
/* Render to the back buffer */
|
||||||
hr = IWineD3DDevice_SetRenderTarget(ddraw->wineD3DDevice, 0, target->wined3d_surface, TRUE);
|
hr = wined3d_device_set_render_target(ddraw->wineD3DDevice, 0, target->wined3d_surface, TRUE);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
ERR("Failed to set render target, hr %#x.\n", hr);
|
ERR("Failed to set render target, hr %#x.\n", hr);
|
||||||
|
@ -6849,7 +6823,7 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi
|
||||||
|
|
||||||
ddraw->d3ddevice = device;
|
ddraw->d3ddevice = device;
|
||||||
|
|
||||||
IWineD3DDevice_SetRenderState(ddraw->wineD3DDevice, WINED3DRS_ZENABLE,
|
wined3d_device_set_render_state(ddraw->wineD3DDevice, WINED3DRS_ZENABLE,
|
||||||
IDirect3DDeviceImpl_UpdateDepthStencil(device));
|
IDirect3DDeviceImpl_UpdateDepthStencil(device));
|
||||||
|
|
||||||
return D3D_OK;
|
return D3D_OK;
|
||||||
|
|
|
@ -155,11 +155,8 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
|
||||||
}
|
}
|
||||||
/* IDirect3DDevices have color keying always enabled -
|
/* IDirect3DDevices have color keying always enabled -
|
||||||
* enable it before drawing. This overwrites any ALPHA*
|
* enable it before drawing. This overwrites any ALPHA*
|
||||||
* render state
|
* render state. */
|
||||||
*/
|
wined3d_device_set_render_state(lpDevice->wineD3DDevice, WINED3DRS_COLORKEYENABLE, 1);
|
||||||
IWineD3DDevice_SetRenderState(lpDevice->wineD3DDevice,
|
|
||||||
WINED3DRS_COLORKEYENABLE,
|
|
||||||
1);
|
|
||||||
IDirect3DDevice7_DrawIndexedPrimitive((IDirect3DDevice7 *)lpDevice,
|
IDirect3DDevice7_DrawIndexedPrimitive((IDirect3DDevice7 *)lpDevice,
|
||||||
D3DPT_TRIANGLELIST, D3DFVF_TLVERTEX, tl_vx, 0, This->indices, count * 3, 0);
|
D3DPT_TRIANGLELIST, D3DFVF_TLVERTEX, tl_vx, 0, This->indices, count * 3, 0);
|
||||||
} break;
|
} break;
|
||||||
|
@ -318,18 +315,12 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
|
||||||
|
|
||||||
/* Get the transform and world matrix */
|
/* Get the transform and world matrix */
|
||||||
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
|
||||||
|
wined3d_device_get_transform(lpDevice->wineD3DDevice,
|
||||||
IWineD3DDevice_GetTransform(lpDevice->wineD3DDevice,
|
D3DTRANSFORMSTATE_VIEW, (WINED3DMATRIX *)&view_mat);
|
||||||
D3DTRANSFORMSTATE_VIEW,
|
wined3d_device_get_transform(lpDevice->wineD3DDevice,
|
||||||
(WINED3DMATRIX*) &view_mat);
|
D3DTRANSFORMSTATE_PROJECTION, (WINED3DMATRIX *)&proj_mat);
|
||||||
|
wined3d_device_get_transform(lpDevice->wineD3DDevice,
|
||||||
IWineD3DDevice_GetTransform(lpDevice->wineD3DDevice,
|
WINED3DTS_WORLDMATRIX(0), (WINED3DMATRIX *)&world_mat);
|
||||||
D3DTRANSFORMSTATE_PROJECTION,
|
|
||||||
(WINED3DMATRIX*) &proj_mat);
|
|
||||||
|
|
||||||
IWineD3DDevice_GetTransform(lpDevice->wineD3DDevice,
|
|
||||||
WINED3DTS_WORLDMATRIX(0),
|
|
||||||
(WINED3DMATRIX*) &world_mat);
|
|
||||||
|
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
LPD3DPROCESSVERTICES ci = (LPD3DPROCESSVERTICES) instr;
|
LPD3DPROCESSVERTICES ci = (LPD3DPROCESSVERTICES) instr;
|
||||||
|
|
|
@ -2923,7 +2923,7 @@ static HRESULT WINAPI ddraw_gamma_control_GetGammaRamp(IDirectDrawGammaControl *
|
||||||
if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
|
if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
|
||||||
{
|
{
|
||||||
/* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP. */
|
/* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP. */
|
||||||
IWineD3DDevice_GetGammaRamp(surface->ddraw->wineD3DDevice, 0, (WINED3DGAMMARAMP *)gamma_ramp);
|
wined3d_device_get_gamma_ramp(surface->ddraw->wineD3DDevice, 0, (WINED3DGAMMARAMP *)gamma_ramp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2965,7 +2965,7 @@ static HRESULT WINAPI ddraw_gamma_control_SetGammaRamp(IDirectDrawGammaControl *
|
||||||
if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
|
if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
|
||||||
{
|
{
|
||||||
/* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP */
|
/* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP */
|
||||||
IWineD3DDevice_SetGammaRamp(surface->ddraw->wineD3DDevice, 0, flags, (WINED3DGAMMARAMP *)gamma_ramp);
|
wined3d_device_set_gamma_ramp(surface->ddraw->wineD3DDevice, 0, flags, (WINED3DGAMMARAMP *)gamma_ramp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -141,23 +141,14 @@ IDirect3DVertexBufferImpl_Release(IDirect3DVertexBuffer7 *iface)
|
||||||
UINT offset, stride;
|
UINT offset, stride;
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
/* D3D7 Vertex buffers don't stay bound in the device, they are passed as a parameter
|
/* D3D7 Vertex buffers don't stay bound in the device, they are passed
|
||||||
* to drawPrimitiveVB. DrawPrimitiveVB sets them as the stream source in wined3d,
|
* as a parameter to drawPrimitiveVB. DrawPrimitiveVB sets them as the
|
||||||
* and they should get unset there before they are destroyed
|
* stream source in wined3d, and they should get unset there before
|
||||||
*/
|
* they are destroyed. */
|
||||||
IWineD3DDevice_GetStreamSource(This->ddraw->wineD3DDevice,
|
wined3d_device_get_stream_source(This->ddraw->wineD3DDevice,
|
||||||
0 /* Stream number */,
|
0, &curVB, &offset, &stride);
|
||||||
&curVB,
|
if (curVB == This->wineD3DVertexBuffer)
|
||||||
&offset,
|
wined3d_device_set_stream_source(This->ddraw->wineD3DDevice, 0, NULL, 0, 0);
|
||||||
&stride);
|
|
||||||
if(curVB == This->wineD3DVertexBuffer)
|
|
||||||
{
|
|
||||||
IWineD3DDevice_SetStreamSource(This->ddraw->wineD3DDevice,
|
|
||||||
0 /* Steam number */,
|
|
||||||
NULL /* stream data */,
|
|
||||||
0 /* Offset */,
|
|
||||||
0 /* stride */);
|
|
||||||
}
|
|
||||||
if (curVB)
|
if (curVB)
|
||||||
wined3d_buffer_decref(curVB); /* For the GetStreamSource */
|
wined3d_buffer_decref(curVB); /* For the GetStreamSource */
|
||||||
|
|
||||||
|
@ -335,23 +326,13 @@ IDirect3DVertexBufferImpl_ProcessVertices(IDirect3DVertexBuffer7 *iface,
|
||||||
* the vertex ops
|
* the vertex ops
|
||||||
*/
|
*/
|
||||||
doClip = VertexOp & D3DVOP_CLIP ? TRUE : FALSE;
|
doClip = VertexOp & D3DVOP_CLIP ? TRUE : FALSE;
|
||||||
IWineD3DDevice_GetRenderState(D3D->wineD3DDevice,
|
wined3d_device_get_render_state(D3D->wineD3DDevice, WINED3DRS_CLIPPING, (DWORD *)&oldClip);
|
||||||
WINED3DRS_CLIPPING,
|
if (doClip != oldClip)
|
||||||
(DWORD *) &oldClip);
|
wined3d_device_set_render_state(D3D->wineD3DDevice, WINED3DRS_CLIPPING, doClip);
|
||||||
if(doClip != oldClip)
|
|
||||||
{
|
|
||||||
IWineD3DDevice_SetRenderState(D3D->wineD3DDevice,
|
|
||||||
WINED3DRS_CLIPPING,
|
|
||||||
doClip);
|
|
||||||
}
|
|
||||||
|
|
||||||
IWineD3DDevice_SetStreamSource(D3D->wineD3DDevice,
|
wined3d_device_set_stream_source(D3D->wineD3DDevice,
|
||||||
0, /* Stream No */
|
0, Src->wineD3DVertexBuffer, 0, get_flexible_vertex_size(Src->fvf));
|
||||||
Src->wineD3DVertexBuffer,
|
wined3d_device_set_vertex_declaration(D3D->wineD3DDevice, Src->wineD3DVertexDeclaration);
|
||||||
0, /* Offset */
|
|
||||||
get_flexible_vertex_size(Src->fvf));
|
|
||||||
IWineD3DDevice_SetVertexDeclaration(D3D->wineD3DDevice,
|
|
||||||
Src->wineD3DVertexDeclaration);
|
|
||||||
hr = IWineD3DDevice_ProcessVertices(D3D->wineD3DDevice,
|
hr = IWineD3DDevice_ProcessVertices(D3D->wineD3DDevice,
|
||||||
SrcIndex,
|
SrcIndex,
|
||||||
DestIndex,
|
DestIndex,
|
||||||
|
@ -362,10 +343,8 @@ IDirect3DVertexBufferImpl_ProcessVertices(IDirect3DVertexBuffer7 *iface,
|
||||||
This->fvf);
|
This->fvf);
|
||||||
|
|
||||||
/* Restore the states if needed */
|
/* Restore the states if needed */
|
||||||
if(doClip != oldClip)
|
if (doClip != oldClip)
|
||||||
IWineD3DDevice_SetRenderState(D3D->wineD3DDevice,
|
wined3d_device_set_render_state(D3D->wineD3DDevice, WINED3DRS_CLIPPING, oldClip);
|
||||||
WINED3DRS_CLIPPING,
|
|
||||||
oldClip);
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,17 +387,12 @@ IDirect3DViewportImpl_TransformVertices(IDirect3DViewport3 *iface,
|
||||||
|
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
IWineD3DDevice_GetTransform(This->active_device->wineD3DDevice,
|
wined3d_device_get_transform(This->active_device->wineD3DDevice,
|
||||||
D3DTRANSFORMSTATE_VIEW,
|
D3DTRANSFORMSTATE_VIEW, (WINED3DMATRIX *)&view_mat);
|
||||||
(WINED3DMATRIX*) &view_mat);
|
wined3d_device_get_transform(This->active_device->wineD3DDevice,
|
||||||
|
D3DTRANSFORMSTATE_PROJECTION, (WINED3DMATRIX *)&proj_mat);
|
||||||
IWineD3DDevice_GetTransform(This->active_device->wineD3DDevice,
|
wined3d_device_get_transform(This->active_device->wineD3DDevice,
|
||||||
D3DTRANSFORMSTATE_PROJECTION,
|
WINED3DTS_WORLDMATRIX(0), (WINED3DMATRIX *)&world_mat);
|
||||||
(WINED3DMATRIX*) &proj_mat);
|
|
||||||
|
|
||||||
IWineD3DDevice_GetTransform(This->active_device->wineD3DDevice,
|
|
||||||
WINED3DTS_WORLDMATRIX(0),
|
|
||||||
(WINED3DMATRIX*) &world_mat);
|
|
||||||
multiply_matrix(&mat,&view_mat,&world_mat);
|
multiply_matrix(&mat,&view_mat,&world_mat);
|
||||||
multiply_matrix(&mat,&proj_mat,&mat);
|
multiply_matrix(&mat,&proj_mat,&mat);
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -897,8 +897,8 @@ static void apply_lights(IWineD3DDevice *device, const struct wined3d_state *sta
|
||||||
{
|
{
|
||||||
const struct wined3d_light_info *light = LIST_ENTRY(e, struct wined3d_light_info, entry);
|
const struct wined3d_light_info *light = LIST_ENTRY(e, struct wined3d_light_info, entry);
|
||||||
|
|
||||||
IWineD3DDevice_SetLight(device, light->OriginalIndex, &light->OriginalParms);
|
wined3d_device_set_light(device, light->OriginalIndex, &light->OriginalParms);
|
||||||
IWineD3DDevice_SetLightEnable(device, light->OriginalIndex, light->glIndex != -1);
|
wined3d_device_set_light_enable(device, light->OriginalIndex, light->glIndex != -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -913,51 +913,51 @@ HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblo
|
||||||
TRACE("Blocktype: %#x.\n", stateblock->blockType);
|
TRACE("Blocktype: %#x.\n", stateblock->blockType);
|
||||||
|
|
||||||
if (stateblock->changed.vertexShader)
|
if (stateblock->changed.vertexShader)
|
||||||
IWineD3DDevice_SetVertexShader(device, stateblock->state.vertex_shader);
|
wined3d_device_set_vertex_shader(device, stateblock->state.vertex_shader);
|
||||||
|
|
||||||
/* Vertex Shader Constants. */
|
/* Vertex Shader Constants. */
|
||||||
for (i = 0; i < stateblock->num_contained_vs_consts_f; ++i)
|
for (i = 0; i < stateblock->num_contained_vs_consts_f; ++i)
|
||||||
{
|
{
|
||||||
IWineD3DDevice_SetVertexShaderConstantF(device, stateblock->contained_vs_consts_f[i],
|
wined3d_device_set_vs_consts_f(device, stateblock->contained_vs_consts_f[i],
|
||||||
stateblock->state.vs_consts_f + stateblock->contained_vs_consts_f[i] * 4, 1);
|
stateblock->state.vs_consts_f + stateblock->contained_vs_consts_f[i] * 4, 1);
|
||||||
}
|
}
|
||||||
for (i = 0; i < stateblock->num_contained_vs_consts_i; ++i)
|
for (i = 0; i < stateblock->num_contained_vs_consts_i; ++i)
|
||||||
{
|
{
|
||||||
IWineD3DDevice_SetVertexShaderConstantI(device, stateblock->contained_vs_consts_i[i],
|
wined3d_device_set_vs_consts_i(device, stateblock->contained_vs_consts_i[i],
|
||||||
stateblock->state.vs_consts_i + stateblock->contained_vs_consts_i[i] * 4, 1);
|
stateblock->state.vs_consts_i + stateblock->contained_vs_consts_i[i] * 4, 1);
|
||||||
}
|
}
|
||||||
for (i = 0; i < stateblock->num_contained_vs_consts_b; ++i)
|
for (i = 0; i < stateblock->num_contained_vs_consts_b; ++i)
|
||||||
{
|
{
|
||||||
IWineD3DDevice_SetVertexShaderConstantB(device, stateblock->contained_vs_consts_b[i],
|
wined3d_device_set_vs_consts_b(device, stateblock->contained_vs_consts_b[i],
|
||||||
stateblock->state.vs_consts_b + stateblock->contained_vs_consts_b[i], 1);
|
stateblock->state.vs_consts_b + stateblock->contained_vs_consts_b[i], 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_lights(device, &stateblock->state);
|
apply_lights(device, &stateblock->state);
|
||||||
|
|
||||||
if (stateblock->changed.pixelShader)
|
if (stateblock->changed.pixelShader)
|
||||||
IWineD3DDevice_SetPixelShader(device, stateblock->state.pixel_shader);
|
wined3d_device_set_pixel_shader(device, stateblock->state.pixel_shader);
|
||||||
|
|
||||||
/* Pixel Shader Constants. */
|
/* Pixel Shader Constants. */
|
||||||
for (i = 0; i < stateblock->num_contained_ps_consts_f; ++i)
|
for (i = 0; i < stateblock->num_contained_ps_consts_f; ++i)
|
||||||
{
|
{
|
||||||
IWineD3DDevice_SetPixelShaderConstantF(device, stateblock->contained_ps_consts_f[i],
|
wined3d_device_set_ps_consts_f(device, stateblock->contained_ps_consts_f[i],
|
||||||
stateblock->state.ps_consts_f + stateblock->contained_ps_consts_f[i] * 4, 1);
|
stateblock->state.ps_consts_f + stateblock->contained_ps_consts_f[i] * 4, 1);
|
||||||
}
|
}
|
||||||
for (i = 0; i < stateblock->num_contained_ps_consts_i; ++i)
|
for (i = 0; i < stateblock->num_contained_ps_consts_i; ++i)
|
||||||
{
|
{
|
||||||
IWineD3DDevice_SetPixelShaderConstantI(device, stateblock->contained_ps_consts_i[i],
|
wined3d_device_set_ps_consts_i(device, stateblock->contained_ps_consts_i[i],
|
||||||
stateblock->state.ps_consts_i + stateblock->contained_ps_consts_i[i] * 4, 1);
|
stateblock->state.ps_consts_i + stateblock->contained_ps_consts_i[i] * 4, 1);
|
||||||
}
|
}
|
||||||
for (i = 0; i < stateblock->num_contained_ps_consts_b; ++i)
|
for (i = 0; i < stateblock->num_contained_ps_consts_b; ++i)
|
||||||
{
|
{
|
||||||
IWineD3DDevice_SetPixelShaderConstantB(device, stateblock->contained_ps_consts_b[i],
|
wined3d_device_set_ps_consts_b(device, stateblock->contained_ps_consts_b[i],
|
||||||
stateblock->state.ps_consts_b + stateblock->contained_ps_consts_b[i], 1);
|
stateblock->state.ps_consts_b + stateblock->contained_ps_consts_b[i], 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Render states. */
|
/* Render states. */
|
||||||
for (i = 0; i < stateblock->num_contained_render_states; ++i)
|
for (i = 0; i < stateblock->num_contained_render_states; ++i)
|
||||||
{
|
{
|
||||||
IWineD3DDevice_SetRenderState(device, stateblock->contained_render_states[i],
|
wined3d_device_set_render_state(device, stateblock->contained_render_states[i],
|
||||||
stateblock->state.render_states[stateblock->contained_render_states[i]]);
|
stateblock->state.render_states[stateblock->contained_render_states[i]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -967,7 +967,7 @@ HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblo
|
||||||
DWORD stage = stateblock->contained_tss_states[i].stage;
|
DWORD stage = stateblock->contained_tss_states[i].stage;
|
||||||
DWORD state = stateblock->contained_tss_states[i].state;
|
DWORD state = stateblock->contained_tss_states[i].state;
|
||||||
|
|
||||||
IWineD3DDevice_SetTextureStageState(device, stage, state, stateblock->state.texture_states[stage][state]);
|
wined3d_device_set_texture_stage_state(device, stage, state, stateblock->state.texture_states[stage][state]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sampler states. */
|
/* Sampler states. */
|
||||||
|
@ -978,13 +978,13 @@ HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblo
|
||||||
DWORD value = stateblock->state.sampler_states[stage][state];
|
DWORD value = stateblock->state.sampler_states[stage][state];
|
||||||
|
|
||||||
if (stage >= MAX_FRAGMENT_SAMPLERS) stage += WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS;
|
if (stage >= MAX_FRAGMENT_SAMPLERS) stage += WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS;
|
||||||
IWineD3DDevice_SetSamplerState(device, stage, state, value);
|
wined3d_device_set_sampler_state(device, stage, state, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Transform states. */
|
/* Transform states. */
|
||||||
for (i = 0; i < stateblock->num_contained_transform_states; ++i)
|
for (i = 0; i < stateblock->num_contained_transform_states; ++i)
|
||||||
{
|
{
|
||||||
IWineD3DDevice_SetTransform(device, stateblock->contained_transform_states[i],
|
wined3d_device_set_transform(device, stateblock->contained_transform_states[i],
|
||||||
&stateblock->state.transforms[stateblock->contained_transform_states[i]]);
|
&stateblock->state.transforms[stateblock->contained_transform_states[i]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -996,35 +996,27 @@ HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblo
|
||||||
|
|
||||||
if (stateblock->changed.indices)
|
if (stateblock->changed.indices)
|
||||||
{
|
{
|
||||||
IWineD3DDevice_SetIndexBuffer(device, stateblock->state.index_buffer, stateblock->state.index_format);
|
wined3d_device_set_index_buffer(device, stateblock->state.index_buffer, stateblock->state.index_format);
|
||||||
IWineD3DDevice_SetBaseVertexIndex(device, stateblock->state.base_vertex_index);
|
wined3d_device_set_base_vertex_index(device, stateblock->state.base_vertex_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stateblock->changed.vertexDecl && stateblock->state.vertex_declaration)
|
if (stateblock->changed.vertexDecl && stateblock->state.vertex_declaration)
|
||||||
{
|
wined3d_device_set_vertex_declaration(device, stateblock->state.vertex_declaration);
|
||||||
IWineD3DDevice_SetVertexDeclaration(device, stateblock->state.vertex_declaration);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stateblock->changed.material)
|
if (stateblock->changed.material)
|
||||||
{
|
wined3d_device_set_material(device, &stateblock->state.material);
|
||||||
IWineD3DDevice_SetMaterial(device, &stateblock->state.material);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stateblock->changed.viewport)
|
if (stateblock->changed.viewport)
|
||||||
{
|
wined3d_device_set_viewport(device, &stateblock->state.viewport);
|
||||||
IWineD3DDevice_SetViewport(device, &stateblock->state.viewport);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stateblock->changed.scissorRect)
|
if (stateblock->changed.scissorRect)
|
||||||
{
|
wined3d_device_set_scissor_rect(device, &stateblock->state.scissor_rect);
|
||||||
IWineD3DDevice_SetScissorRect(device, &stateblock->state.scissor_rect);
|
|
||||||
}
|
|
||||||
|
|
||||||
map = stateblock->changed.streamSource;
|
map = stateblock->changed.streamSource;
|
||||||
for (i = 0; map; map >>= 1, ++i)
|
for (i = 0; map; map >>= 1, ++i)
|
||||||
{
|
{
|
||||||
if (map & 1)
|
if (map & 1)
|
||||||
IWineD3DDevice_SetStreamSource(device, i,
|
wined3d_device_set_stream_source(device, i,
|
||||||
stateblock->state.streams[i].buffer,
|
stateblock->state.streams[i].buffer,
|
||||||
0, stateblock->state.streams[i].stride);
|
0, stateblock->state.streams[i].stride);
|
||||||
}
|
}
|
||||||
|
@ -1033,7 +1025,7 @@ HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblo
|
||||||
for (i = 0; map; map >>= 1, ++i)
|
for (i = 0; map; map >>= 1, ++i)
|
||||||
{
|
{
|
||||||
if (map & 1)
|
if (map & 1)
|
||||||
IWineD3DDevice_SetStreamSourceFreq(device, i,
|
wined3d_device_set_stream_source_freq(device, i,
|
||||||
stateblock->state.streams[i].frequency | stateblock->state.streams[i].flags);
|
stateblock->state.streams[i].frequency | stateblock->state.streams[i].flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1045,7 +1037,7 @@ HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblo
|
||||||
if (!(map & 1)) continue;
|
if (!(map & 1)) continue;
|
||||||
|
|
||||||
stage = i < MAX_FRAGMENT_SAMPLERS ? i : WINED3DVERTEXTEXTURESAMPLER0 + i - MAX_FRAGMENT_SAMPLERS;
|
stage = i < MAX_FRAGMENT_SAMPLERS ? i : WINED3DVERTEXTEXTURESAMPLER0 + i - MAX_FRAGMENT_SAMPLERS;
|
||||||
IWineD3DDevice_SetTexture(device, stage, stateblock->state.textures[i]);
|
wined3d_device_set_texture(device, stage, stateblock->state.textures[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
map = stateblock->changed.clipplane;
|
map = stateblock->changed.clipplane;
|
||||||
|
@ -1059,7 +1051,7 @@ HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblo
|
||||||
clip[1] = (float) stateblock->state.clip_planes[i][1];
|
clip[1] = (float) stateblock->state.clip_planes[i][1];
|
||||||
clip[2] = (float) stateblock->state.clip_planes[i][2];
|
clip[2] = (float) stateblock->state.clip_planes[i][2];
|
||||||
clip[3] = (float) stateblock->state.clip_planes[i][3];
|
clip[3] = (float) stateblock->state.clip_planes[i][3];
|
||||||
IWineD3DDevice_SetClipPlane(device, i, clip);
|
wined3d_device_set_clip_plane(device, i, clip);
|
||||||
}
|
}
|
||||||
|
|
||||||
stateblock->device->stateBlock->state.lowest_disabled_stage = MAX_TEXTURES - 1;
|
stateblock->device->stateBlock->state.lowest_disabled_stage = MAX_TEXTURES - 1;
|
||||||
|
|
|
@ -45,6 +45,70 @@
|
||||||
@ cdecl wined3d_clipper_set_window(ptr long ptr)
|
@ cdecl wined3d_clipper_set_window(ptr long ptr)
|
||||||
|
|
||||||
@ cdecl wined3d_device_create(ptr long long ptr long ptr ptr)
|
@ cdecl wined3d_device_create(ptr long long ptr long ptr ptr)
|
||||||
|
@ cdecl wined3d_device_get_base_vertex_index(ptr)
|
||||||
|
@ cdecl wined3d_device_get_clip_plane(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_get_clip_status(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_get_current_texture_palette(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_get_depth_stencil(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_get_gamma_ramp(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_get_index_buffer(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_get_light(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_get_light_enable(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_get_material(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_get_npatch_mode(ptr)
|
||||||
|
@ cdecl wined3d_device_get_palette_entries(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_get_pixel_shader(ptr)
|
||||||
|
@ cdecl wined3d_device_get_ps_consts_b(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_render_state(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_scissor_rect(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_get_software_vertex_processing(ptr)
|
||||||
|
@ cdecl wined3d_device_get_stream_source(ptr long ptr ptr ptr)
|
||||||
|
@ cdecl wined3d_device_get_stream_source_freq(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_get_texture(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_get_texture_stage_state(ptr long long ptr)
|
||||||
|
@ cdecl wined3d_device_get_transform(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_get_vertex_declaration(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_get_vertex_shader(ptr)
|
||||||
|
@ cdecl wined3d_device_get_viewport(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_get_vs_consts_b(ptr long ptr long)
|
||||||
|
@ cdecl wined3d_device_get_vs_consts_f(ptr long ptr long)
|
||||||
|
@ cdecl wined3d_device_get_vs_consts_i(ptr long ptr long)
|
||||||
|
@ cdecl wined3d_device_set_base_vertex_index(ptr long)
|
||||||
|
@ cdecl wined3d_device_set_clip_plane(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_set_clip_status(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_set_current_texture_palette(ptr long)
|
||||||
|
@ cdecl wined3d_device_set_depth_stencil(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_set_gamma_ramp(ptr long long ptr)
|
||||||
|
@ cdecl wined3d_device_set_index_buffer(ptr ptr long)
|
||||||
|
@ cdecl wined3d_device_set_light(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_set_light_enable(ptr long long)
|
||||||
|
@ cdecl wined3d_device_set_material(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_set_npatch_mode(ptr float)
|
||||||
|
@ cdecl wined3d_device_set_palette_entries(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_set_pixel_shader(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_set_ps_consts_b(ptr long ptr long)
|
||||||
|
@ cdecl wined3d_device_set_ps_consts_f(ptr long ptr long)
|
||||||
|
@ cdecl wined3d_device_set_ps_consts_i(ptr long ptr long)
|
||||||
|
@ cdecl wined3d_device_set_render_state(ptr long long)
|
||||||
|
@ cdecl wined3d_device_set_render_target(ptr long ptr long)
|
||||||
|
@ cdecl wined3d_device_set_sampler_state(ptr long long long)
|
||||||
|
@ cdecl wined3d_device_set_scissor_rect(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_set_software_vertex_processing(ptr long)
|
||||||
|
@ cdecl wined3d_device_set_stream_source(ptr long ptr long long)
|
||||||
|
@ cdecl wined3d_device_set_stream_source_freq(ptr long long)
|
||||||
|
@ cdecl wined3d_device_set_texture(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_set_texture_stage_state(ptr long long long)
|
||||||
|
@ cdecl wined3d_device_set_transform(ptr long ptr)
|
||||||
|
@ cdecl wined3d_device_set_vertex_declaration(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_set_vertex_shader(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_set_viewport(ptr ptr)
|
||||||
|
@ cdecl wined3d_device_set_vs_consts_b(ptr long ptr long)
|
||||||
|
@ cdecl wined3d_device_set_vs_consts_f(ptr long ptr long)
|
||||||
|
@ cdecl wined3d_device_set_vs_consts_i(ptr long ptr long)
|
||||||
|
|
||||||
@ cdecl wined3d_palette_create(ptr long ptr ptr ptr)
|
@ cdecl wined3d_palette_create(ptr long ptr ptr ptr)
|
||||||
@ cdecl wined3d_palette_decref(ptr)
|
@ cdecl wined3d_palette_decref(ptr)
|
||||||
|
|
|
@ -2238,255 +2238,6 @@ interface IWineD3DDevice : IUnknown
|
||||||
BOOL ShowCursor(
|
BOOL ShowCursor(
|
||||||
[in] BOOL show
|
[in] BOOL show
|
||||||
);
|
);
|
||||||
HRESULT SetClipPlane(
|
|
||||||
[in] DWORD plane_idx,
|
|
||||||
[in] const float *plane
|
|
||||||
);
|
|
||||||
HRESULT GetClipPlane(
|
|
||||||
[in] DWORD plane_idx,
|
|
||||||
[out] float *plane
|
|
||||||
);
|
|
||||||
HRESULT SetClipStatus(
|
|
||||||
[in] const WINED3DCLIPSTATUS *clip_status
|
|
||||||
);
|
|
||||||
HRESULT GetClipStatus(
|
|
||||||
[out] WINED3DCLIPSTATUS *clip_status
|
|
||||||
);
|
|
||||||
HRESULT SetCurrentTexturePalette(
|
|
||||||
[in] UINT palette_number
|
|
||||||
);
|
|
||||||
HRESULT GetCurrentTexturePalette(
|
|
||||||
[out] UINT *palette_number
|
|
||||||
);
|
|
||||||
HRESULT SetDepthStencilSurface(
|
|
||||||
[in] struct wined3d_surface *depth_stencil
|
|
||||||
);
|
|
||||||
HRESULT GetDepthStencilSurface(
|
|
||||||
[out] struct wined3d_surface **depth_stencil
|
|
||||||
);
|
|
||||||
void SetGammaRamp(
|
|
||||||
[in] UINT swapchain_idx,
|
|
||||||
[in] DWORD flags,
|
|
||||||
[in] const WINED3DGAMMARAMP *ramp
|
|
||||||
);
|
|
||||||
void GetGammaRamp(
|
|
||||||
[in] UINT swapchain_idx,
|
|
||||||
[out] WINED3DGAMMARAMP *ramp
|
|
||||||
);
|
|
||||||
HRESULT SetIndexBuffer(
|
|
||||||
[in] struct wined3d_buffer *index_buffer,
|
|
||||||
[in] enum wined3d_format_id format_id
|
|
||||||
);
|
|
||||||
HRESULT GetIndexBuffer(
|
|
||||||
[out] struct wined3d_buffer **index_buffer
|
|
||||||
);
|
|
||||||
HRESULT SetBaseVertexIndex(
|
|
||||||
[in] INT base_index
|
|
||||||
);
|
|
||||||
HRESULT GetBaseVertexIndex(
|
|
||||||
[out] INT *base_index
|
|
||||||
);
|
|
||||||
HRESULT SetLight(
|
|
||||||
[in] DWORD light_idx,
|
|
||||||
[in] const WINED3DLIGHT *light
|
|
||||||
);
|
|
||||||
HRESULT GetLight(
|
|
||||||
[in] DWORD light_idx,
|
|
||||||
[out] WINED3DLIGHT *light
|
|
||||||
);
|
|
||||||
HRESULT SetLightEnable(
|
|
||||||
[in] DWORD light_idx,
|
|
||||||
[in] BOOL enable
|
|
||||||
);
|
|
||||||
HRESULT GetLightEnable(
|
|
||||||
[in] DWORD light_idx,
|
|
||||||
[out] BOOL *enable
|
|
||||||
);
|
|
||||||
HRESULT SetMaterial(
|
|
||||||
[in] const WINED3DMATERIAL *material
|
|
||||||
);
|
|
||||||
HRESULT GetMaterial(
|
|
||||||
[out] WINED3DMATERIAL *material
|
|
||||||
);
|
|
||||||
HRESULT SetNPatchMode(
|
|
||||||
[in] float segments
|
|
||||||
);
|
|
||||||
float GetNPatchMode(
|
|
||||||
);
|
|
||||||
HRESULT SetPaletteEntries(
|
|
||||||
[in] UINT palette_number,
|
|
||||||
[in] const PALETTEENTRY *entries
|
|
||||||
);
|
|
||||||
HRESULT GetPaletteEntries(
|
|
||||||
[in] UINT palette_number,
|
|
||||||
[out] PALETTEENTRY *entries
|
|
||||||
);
|
|
||||||
HRESULT SetPixelShader(
|
|
||||||
[in] struct wined3d_shader *shader
|
|
||||||
);
|
|
||||||
struct wined3d_shader *GetPixelShader(
|
|
||||||
);
|
|
||||||
HRESULT SetPixelShaderConstantB(
|
|
||||||
[in] UINT start_register,
|
|
||||||
[in] const BOOL *constants,
|
|
||||||
[in] UINT bool_count
|
|
||||||
);
|
|
||||||
HRESULT GetPixelShaderConstantB(
|
|
||||||
[in] UINT start_register,
|
|
||||||
[out] BOOL *constants,
|
|
||||||
[in] UINT bool_count
|
|
||||||
);
|
|
||||||
HRESULT SetPixelShaderConstantI(
|
|
||||||
[in] UINT start_register,
|
|
||||||
[in] const int *constants,
|
|
||||||
[in] UINT vector4i_count
|
|
||||||
);
|
|
||||||
HRESULT GetPixelShaderConstantI(
|
|
||||||
[in] UINT start_register,
|
|
||||||
[out] int *constants,
|
|
||||||
[in] UINT vector4i_count
|
|
||||||
);
|
|
||||||
HRESULT SetPixelShaderConstantF(
|
|
||||||
[in] UINT start_register,
|
|
||||||
[in] const float *constants,
|
|
||||||
[in] UINT vector4f_count
|
|
||||||
);
|
|
||||||
HRESULT GetPixelShaderConstantF(
|
|
||||||
[in] UINT start_register,
|
|
||||||
[out] float *constants,
|
|
||||||
[in] UINT vector4f_count
|
|
||||||
);
|
|
||||||
HRESULT SetRenderState(
|
|
||||||
[in] WINED3DRENDERSTATETYPE state,
|
|
||||||
[in] DWORD value
|
|
||||||
);
|
|
||||||
HRESULT GetRenderState(
|
|
||||||
[in] WINED3DRENDERSTATETYPE state,
|
|
||||||
[out] DWORD *value
|
|
||||||
);
|
|
||||||
HRESULT SetRenderTarget(
|
|
||||||
[in] DWORD render_target_idx,
|
|
||||||
[in] struct wined3d_surface *render_target,
|
|
||||||
[in] BOOL set_viewport
|
|
||||||
);
|
|
||||||
HRESULT GetRenderTarget(
|
|
||||||
[in] DWORD render_target_idx,
|
|
||||||
[out] struct wined3d_surface **render_target
|
|
||||||
);
|
|
||||||
HRESULT SetSamplerState(
|
|
||||||
[in] DWORD sampler_idx,
|
|
||||||
[in] WINED3DSAMPLERSTATETYPE state,
|
|
||||||
[in] DWORD value
|
|
||||||
);
|
|
||||||
HRESULT GetSamplerState(
|
|
||||||
[in] DWORD sampler_idx,
|
|
||||||
[in] WINED3DSAMPLERSTATETYPE state,
|
|
||||||
[out] DWORD *value
|
|
||||||
);
|
|
||||||
HRESULT SetScissorRect(
|
|
||||||
[in] const RECT *rect
|
|
||||||
);
|
|
||||||
HRESULT GetScissorRect(
|
|
||||||
[out] RECT *rect
|
|
||||||
);
|
|
||||||
HRESULT SetSoftwareVertexProcessing(
|
|
||||||
[in] BOOL software
|
|
||||||
);
|
|
||||||
BOOL GetSoftwareVertexProcessing(
|
|
||||||
);
|
|
||||||
HRESULT SetStreamSource(
|
|
||||||
[in] UINT stream_idx,
|
|
||||||
[in] struct wined3d_buffer *buffer,
|
|
||||||
[in] UINT offset,
|
|
||||||
[in] UINT stride
|
|
||||||
);
|
|
||||||
HRESULT GetStreamSource(
|
|
||||||
[in] UINT stream_idx,
|
|
||||||
[out] struct wined3d_buffer **buffer,
|
|
||||||
[out] UINT *offset,
|
|
||||||
[out] UINT *stride
|
|
||||||
);
|
|
||||||
HRESULT SetStreamSourceFreq(
|
|
||||||
[in] UINT stream_idx,
|
|
||||||
[in] UINT divider
|
|
||||||
);
|
|
||||||
HRESULT GetStreamSourceFreq(
|
|
||||||
[in] UINT stream_idx,
|
|
||||||
[out] UINT *divider
|
|
||||||
);
|
|
||||||
HRESULT SetTexture(
|
|
||||||
[in] DWORD stage,
|
|
||||||
[in] struct wined3d_texture *texture
|
|
||||||
);
|
|
||||||
HRESULT GetTexture(
|
|
||||||
[in] DWORD stage,
|
|
||||||
[out] struct wined3d_texture **texture
|
|
||||||
);
|
|
||||||
HRESULT SetTextureStageState(
|
|
||||||
[in] DWORD stage,
|
|
||||||
[in] WINED3DTEXTURESTAGESTATETYPE state,
|
|
||||||
[in] DWORD value
|
|
||||||
);
|
|
||||||
HRESULT GetTextureStageState(
|
|
||||||
[in] DWORD stage,
|
|
||||||
[in] WINED3DTEXTURESTAGESTATETYPE state,
|
|
||||||
[out] DWORD *value
|
|
||||||
);
|
|
||||||
HRESULT SetTransform(
|
|
||||||
[in] WINED3DTRANSFORMSTATETYPE state,
|
|
||||||
[in] const WINED3DMATRIX *matrix
|
|
||||||
);
|
|
||||||
HRESULT GetTransform(
|
|
||||||
[in] WINED3DTRANSFORMSTATETYPE state,
|
|
||||||
[out] WINED3DMATRIX *matrix
|
|
||||||
);
|
|
||||||
HRESULT SetVertexDeclaration(
|
|
||||||
[in] struct wined3d_vertex_declaration *declaration
|
|
||||||
);
|
|
||||||
HRESULT GetVertexDeclaration(
|
|
||||||
[out] struct wined3d_vertex_declaration **declaration
|
|
||||||
);
|
|
||||||
HRESULT SetVertexShader(
|
|
||||||
[in] struct wined3d_shader *shader
|
|
||||||
);
|
|
||||||
struct wined3d_shader *GetVertexShader(
|
|
||||||
);
|
|
||||||
HRESULT SetVertexShaderConstantB(
|
|
||||||
[in] UINT start_register,
|
|
||||||
[in] const BOOL *constants,
|
|
||||||
[in] UINT bool_count
|
|
||||||
);
|
|
||||||
HRESULT GetVertexShaderConstantB(
|
|
||||||
[in] UINT start_register,
|
|
||||||
[out] BOOL *constants,
|
|
||||||
[in] UINT bool_count
|
|
||||||
);
|
|
||||||
HRESULT SetVertexShaderConstantI(
|
|
||||||
[in] UINT start_register,
|
|
||||||
[in] const int *constants,
|
|
||||||
[in] UINT vector4i_count
|
|
||||||
);
|
|
||||||
HRESULT GetVertexShaderConstantI(
|
|
||||||
[in] UINT start_register,
|
|
||||||
[out] int *constants,
|
|
||||||
[in] UINT vector4i_count
|
|
||||||
);
|
|
||||||
HRESULT SetVertexShaderConstantF(
|
|
||||||
[in] UINT start_register,
|
|
||||||
[in] const float *constants,
|
|
||||||
[in] UINT vector4f_count
|
|
||||||
);
|
|
||||||
HRESULT GetVertexShaderConstantF(
|
|
||||||
[in] UINT start_register,
|
|
||||||
[out] float *constants,
|
|
||||||
[in] UINT vector4f_count
|
|
||||||
);
|
|
||||||
HRESULT SetViewport(
|
|
||||||
[in] const WINED3DVIEWPORT *viewport
|
|
||||||
);
|
|
||||||
HRESULT GetViewport(
|
|
||||||
[out] WINED3DVIEWPORT *viewport
|
|
||||||
);
|
|
||||||
HRESULT MultiplyTransform(
|
HRESULT MultiplyTransform(
|
||||||
[in] WINED3DTRANSFORMSTATETYPE state,
|
[in] WINED3DTRANSFORMSTATETYPE state,
|
||||||
[in] const WINED3DMATRIX *matrix
|
[in] const WINED3DMATRIX *matrix
|
||||||
|
@ -2693,6 +2444,97 @@ HRESULT __cdecl wined3d_clipper_set_window(struct wined3d_clipper *clipper, DWOR
|
||||||
HRESULT __cdecl wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx,
|
HRESULT __cdecl wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx,
|
||||||
WINED3DDEVTYPE device_type, HWND focus_window, DWORD behaviour_flags,
|
WINED3DDEVTYPE device_type, HWND focus_window, DWORD behaviour_flags,
|
||||||
IWineD3DDeviceParent *device_parent, IWineD3DDevice **device);
|
IWineD3DDeviceParent *device_parent, IWineD3DDevice **device);
|
||||||
|
INT __cdecl wined3d_device_get_base_vertex_index(IWineD3DDevice *device);
|
||||||
|
HRESULT __cdecl wined3d_device_get_clip_plane(IWineD3DDevice *device, UINT plane_idx, float *plane);
|
||||||
|
HRESULT __cdecl wined3d_device_get_clip_status(IWineD3DDevice *device, WINED3DCLIPSTATUS *clip_status);
|
||||||
|
HRESULT __cdecl wined3d_device_get_current_texture_palette(IWineD3DDevice *device, UINT *palette_idx);
|
||||||
|
HRESULT __cdecl wined3d_device_get_depth_stencil(IWineD3DDevice *device, struct wined3d_surface **depth_stencil);
|
||||||
|
void __cdecl wined3d_device_get_gamma_ramp(IWineD3DDevice *device, UINT swapchain_idx, WINED3DGAMMARAMP *ramp);
|
||||||
|
HRESULT __cdecl wined3d_device_get_index_buffer(IWineD3DDevice *device, struct wined3d_buffer **index_buffer);
|
||||||
|
HRESULT __cdecl wined3d_device_get_light(IWineD3DDevice *device, UINT light_idx, WINED3DLIGHT *light);
|
||||||
|
HRESULT __cdecl wined3d_device_get_light_enable(IWineD3DDevice *device, UINT light_idx, BOOL *enable);
|
||||||
|
HRESULT __cdecl wined3d_device_get_material(IWineD3DDevice *device, WINED3DMATERIAL *material);
|
||||||
|
float __cdecl wined3d_device_get_npatch_mode(IWineD3DDevice *device);
|
||||||
|
HRESULT __cdecl wined3d_device_get_palette_entries(IWineD3DDevice *device, UINT palette_idx, PALETTEENTRY *entries);
|
||||||
|
struct wined3d_shader * __cdecl wined3d_device_get_pixel_shader(IWineD3DDevice *device);
|
||||||
|
HRESULT __cdecl wined3d_device_get_ps_consts_b(IWineD3DDevice *device,
|
||||||
|
UINT start_register, BOOL *constants, UINT bool_count);
|
||||||
|
HRESULT __cdecl wined3d_device_get_ps_consts_f(IWineD3DDevice *device,
|
||||||
|
UINT start_register, float *constants, UINT vector4f_count);
|
||||||
|
HRESULT __cdecl wined3d_device_get_ps_consts_i(IWineD3DDevice *device,
|
||||||
|
UINT start_register, int *constants, UINT vector4i_count);
|
||||||
|
HRESULT __cdecl wined3d_device_get_render_state(IWineD3DDevice *device, WINED3DRENDERSTATETYPE state, DWORD *value);
|
||||||
|
HRESULT __cdecl wined3d_device_get_render_target(IWineD3DDevice *device,
|
||||||
|
UINT render_target_idx, struct wined3d_surface **render_target);
|
||||||
|
HRESULT __cdecl wined3d_device_get_sampler_state(IWineD3DDevice *device,
|
||||||
|
UINT sampler_idx, WINED3DSAMPLERSTATETYPE state, DWORD *value);
|
||||||
|
HRESULT __cdecl wined3d_device_get_scissor_rect(IWineD3DDevice *device, RECT *rect);
|
||||||
|
BOOL __cdecl wined3d_device_get_software_vertex_processing(IWineD3DDevice *device);
|
||||||
|
HRESULT __cdecl wined3d_device_get_stream_source(IWineD3DDevice *device,
|
||||||
|
UINT stream_idx, struct wined3d_buffer **buffer, UINT *offset, UINT *stride);
|
||||||
|
HRESULT __cdecl wined3d_device_get_stream_source_freq(IWineD3DDevice *device, UINT stream_idx, UINT *divider);
|
||||||
|
HRESULT __cdecl wined3d_device_get_texture(IWineD3DDevice *device, UINT stage, struct wined3d_texture **texture);
|
||||||
|
HRESULT __cdecl wined3d_device_get_texture_stage_state(IWineD3DDevice *device,
|
||||||
|
UINT stage, WINED3DTEXTURESTAGESTATETYPE state, DWORD *value);
|
||||||
|
HRESULT __cdecl wined3d_device_get_transform(IWineD3DDevice *device,
|
||||||
|
WINED3DTRANSFORMSTATETYPE state, WINED3DMATRIX *matrix);
|
||||||
|
HRESULT __cdecl wined3d_device_get_vertex_declaration(IWineD3DDevice *device,
|
||||||
|
struct wined3d_vertex_declaration **declaration);
|
||||||
|
struct wined3d_shader * __cdecl wined3d_device_get_vertex_shader(IWineD3DDevice *device);
|
||||||
|
HRESULT __cdecl wined3d_device_get_viewport(IWineD3DDevice *device, WINED3DVIEWPORT *viewport);
|
||||||
|
HRESULT __cdecl wined3d_device_get_vs_consts_b(IWineD3DDevice *device,
|
||||||
|
UINT start_register, BOOL *constants, UINT bool_count);
|
||||||
|
HRESULT __cdecl wined3d_device_get_vs_consts_f(IWineD3DDevice *device,
|
||||||
|
UINT start_register, float *constants, UINT vector4f_count);
|
||||||
|
HRESULT __cdecl wined3d_device_get_vs_consts_i(IWineD3DDevice *device,
|
||||||
|
UINT start_register, int *constants, UINT vector4i_count);
|
||||||
|
HRESULT __cdecl wined3d_device_set_base_vertex_index(IWineD3DDevice *device, INT base_index);
|
||||||
|
HRESULT __cdecl wined3d_device_set_clip_plane(IWineD3DDevice *device, UINT plane_idx, const float *plane);
|
||||||
|
HRESULT __cdecl wined3d_device_set_clip_status(IWineD3DDevice *device, const WINED3DCLIPSTATUS *clip_status);
|
||||||
|
HRESULT __cdecl wined3d_device_set_current_texture_palette(IWineD3DDevice *device, UINT palette_idx);
|
||||||
|
HRESULT __cdecl wined3d_device_set_depth_stencil(IWineD3DDevice *device, struct wined3d_surface *depth_stencil);
|
||||||
|
void __cdecl wined3d_device_set_gamma_ramp(IWineD3DDevice *device,
|
||||||
|
UINT swapchain_idx, DWORD flags, const WINED3DGAMMARAMP *ramp);
|
||||||
|
HRESULT __cdecl wined3d_device_set_index_buffer(IWineD3DDevice *device,
|
||||||
|
struct wined3d_buffer *index_buffer, enum wined3d_format_id format_id);
|
||||||
|
HRESULT __cdecl wined3d_device_set_light(IWineD3DDevice *device, UINT light_idx, const WINED3DLIGHT *light);
|
||||||
|
HRESULT __cdecl wined3d_device_set_light_enable(IWineD3DDevice *device, UINT light_idx, BOOL enable);
|
||||||
|
HRESULT __cdecl wined3d_device_set_material(IWineD3DDevice *device, const WINED3DMATERIAL *material);
|
||||||
|
HRESULT __cdecl wined3d_device_set_npatch_mode(IWineD3DDevice *device, float segments);
|
||||||
|
HRESULT __cdecl wined3d_device_set_palette_entries(IWineD3DDevice *device,
|
||||||
|
UINT palette_idx, const PALETTEENTRY *entries);
|
||||||
|
HRESULT __cdecl wined3d_device_set_pixel_shader(IWineD3DDevice *device, struct wined3d_shader *shader);
|
||||||
|
HRESULT __cdecl wined3d_device_set_ps_consts_b(IWineD3DDevice *device,
|
||||||
|
UINT start_register, const BOOL *constants, UINT bool_count);
|
||||||
|
HRESULT __cdecl wined3d_device_set_ps_consts_f(IWineD3DDevice *device,
|
||||||
|
UINT start_register, const float *constants, UINT vector4f_count);
|
||||||
|
HRESULT __cdecl wined3d_device_set_ps_consts_i(IWineD3DDevice *device,
|
||||||
|
UINT start_register, const int *constants, UINT vector4i_count);
|
||||||
|
HRESULT __cdecl wined3d_device_set_render_state(IWineD3DDevice *device, WINED3DRENDERSTATETYPE state, DWORD value);
|
||||||
|
HRESULT __cdecl wined3d_device_set_render_target(IWineD3DDevice *device,
|
||||||
|
UINT render_target_idx, struct wined3d_surface *render_target, BOOL set_viewport);
|
||||||
|
HRESULT __cdecl wined3d_device_set_sampler_state(IWineD3DDevice *device,
|
||||||
|
UINT sampler_idx, WINED3DSAMPLERSTATETYPE state, DWORD value);
|
||||||
|
HRESULT __cdecl wined3d_device_set_scissor_rect(IWineD3DDevice *device, const RECT *rect);
|
||||||
|
HRESULT __cdecl wined3d_device_set_software_vertex_processing(IWineD3DDevice *device, BOOL software);
|
||||||
|
HRESULT __cdecl wined3d_device_set_stream_source(IWineD3DDevice *device,
|
||||||
|
UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride);
|
||||||
|
HRESULT __cdecl wined3d_device_set_stream_source_freq(IWineD3DDevice *device, UINT stream_idx, UINT divider);
|
||||||
|
HRESULT __cdecl wined3d_device_set_texture(IWineD3DDevice *device, UINT stage, struct wined3d_texture *texture);
|
||||||
|
HRESULT __cdecl wined3d_device_set_texture_stage_state(IWineD3DDevice *device,
|
||||||
|
UINT stage, WINED3DTEXTURESTAGESTATETYPE state, DWORD value);
|
||||||
|
HRESULT __cdecl wined3d_device_set_transform(IWineD3DDevice *device,
|
||||||
|
WINED3DTRANSFORMSTATETYPE state, const WINED3DMATRIX *matrix);
|
||||||
|
HRESULT __cdecl wined3d_device_set_vertex_declaration(IWineD3DDevice *device,
|
||||||
|
struct wined3d_vertex_declaration *declaration);
|
||||||
|
HRESULT __cdecl wined3d_device_set_vertex_shader(IWineD3DDevice *device, struct wined3d_shader *shader);
|
||||||
|
HRESULT __cdecl wined3d_device_set_viewport(IWineD3DDevice *device, const WINED3DVIEWPORT *viewport);
|
||||||
|
HRESULT __cdecl wined3d_device_set_vs_consts_b(IWineD3DDevice *device,
|
||||||
|
UINT start_register, const BOOL *constants, UINT bool_count);
|
||||||
|
HRESULT __cdecl wined3d_device_set_vs_consts_f(IWineD3DDevice *device,
|
||||||
|
UINT start_register, const float *constants, UINT vector4f_count);
|
||||||
|
HRESULT __cdecl wined3d_device_set_vs_consts_i(IWineD3DDevice *device,
|
||||||
|
UINT start_register, const int *constants, UINT vector4i_count);
|
||||||
|
|
||||||
HRESULT __cdecl wined3d_palette_create(IWineD3DDevice *device, DWORD flags,
|
HRESULT __cdecl wined3d_palette_create(IWineD3DDevice *device, DWORD flags,
|
||||||
const PALETTEENTRY *entries, void *parent, struct wined3d_palette **palette);
|
const PALETTEENTRY *entries, void *parent, struct wined3d_palette **palette);
|
||||||
|
|
Loading…
Reference in New Issue