Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
979e3744
Commit
979e3744
authored
May 16, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
May 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove state management methods from the IWineD3DDevice interface.
parent
ddad22d0
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
493 additions
and
648 deletions
+493
-648
device.c
dlls/d3d10core/device.c
+7
-6
device.c
dlls/d3d8/device.c
+68
-63
device.c
dlls/d3d9/device.c
+70
-68
device.c
dlls/ddraw/device.c
+137
-163
executebuffer.c
dlls/ddraw/executebuffer.c
+8
-17
surface.c
dlls/ddraw/surface.c
+2
-2
vertexbuffer.c
dlls/ddraw/vertexbuffer.c
+16
-37
viewport.c
dlls/ddraw/viewport.c
+6
-11
device.c
dlls/wined3d/device.c
+0
-0
stateblock.c
dlls/wined3d/stateblock.c
+24
-32
wined3d.spec
dlls/wined3d/wined3d.spec
+64
-0
wined3d.idl
include/wine/wined3d.idl
+91
-249
No files found.
dlls/d3d10core/device.c
View file @
979e3744
...
...
@@ -129,7 +129,7 @@ static void STDMETHODCALLTYPE d3d10_device_PSSetShader(ID3D10Device *iface, ID3D
TRACE
(
"iface %p, shader %p
\n
"
,
iface
,
shader
);
IWineD3DDevice_SetPixelS
hader
(
This
->
wined3d_device
,
ps
?
ps
->
wined3d_shader
:
NULL
);
wined3d_device_set_pixel_s
hader
(
This
->
wined3d_device
,
ps
?
ps
->
wined3d_shader
:
NULL
);
}
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
);
IWineD3DDevice_SetVertexS
hader
(
This
->
wined3d_device
,
vs
?
vs
->
wined3d_shader
:
NULL
);
wined3d_device_set_vertex_s
hader
(
This
->
wined3d_device
,
vs
?
vs
->
wined3d_shader
:
NULL
);
}
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
"
,
iface
,
index_count
,
start_index_location
,
base_vertex_location
);
IWineD3DDevice_SetBaseVertexI
ndex
(
This
->
wined3d_device
,
base_vertex_location
);
wined3d_device_set_base_vertex_i
ndex
(
This
->
wined3d_device
,
base_vertex_location
);
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
);
IWineD3DDevice_SetVertexD
eclaration
(
This
->
wined3d_device
,
wined3d_device_set_vertex_d
eclaration
(
This
->
wined3d_device
,
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
)
{
IWineD3DDevice_SetStreamS
ource
(
This
->
wined3d_device
,
start_slot
,
wined3d_device_set_stream_s
ource
(
This
->
wined3d_device
,
start_slot
,
buffers
[
i
]
?
((
struct
d3d10_buffer
*
)
buffers
[
i
])
->
wined3d_buffer
:
NULL
,
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
"
,
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
));
if
(
offset
)
FIXME
(
"offset %u not supported.
\n
"
,
offset
);
}
...
...
dlls/d3d8/device.c
View file @
979e3744
...
...
@@ -595,14 +595,14 @@ static HRESULT WINAPI IDirect3DDevice8Impl_Reset(IDirect3DDevice8 *iface,
TRACE
(
"iface %p, present_parameters %p.
\n
"
,
iface
,
pPresentationParameters
);
wined3d_mutex_lock
();
IWineD3DDevice_SetIndexB
uffer
(
This
->
WineD3DDevice
,
NULL
,
WINED3DFMT_UNKNOWN
);
wined3d_device_set_index_b
uffer
(
This
->
WineD3DDevice
,
NULL
,
WINED3DFMT_UNKNOWN
);
for
(
i
=
0
;
i
<
16
;
++
i
)
{
IWineD3DDevice_SetStreamS
ource
(
This
->
WineD3DDevice
,
i
,
NULL
,
0
,
0
);
wined3d_device_set_stream_s
ource
(
This
->
WineD3DDevice
,
i
,
NULL
,
0
,
0
);
}
for
(
i
=
0
;
i
<
16
;
++
i
)
{
IWineD3DDevice_SetT
exture
(
This
->
WineD3DDevice
,
i
,
NULL
);
wined3d_device_set_t
exture
(
This
->
WineD3DDevice
,
i
,
NULL
);
}
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
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IWineD3DDevice_SetRenderS
tate
(
This
->
WineD3DDevice
,
WINED3DRS_POINTSIZE_MIN
,
0
);
hr
=
wined3d_device_set_render_s
tate
(
This
->
WineD3DDevice
,
WINED3DRS_POINTSIZE_MIN
,
0
);
This
->
lost
=
FALSE
;
}
else
...
...
@@ -724,7 +724,7 @@ static void WINAPI IDirect3DDevice8Impl_SetGammaRamp(IDirect3DDevice8 *iface, DW
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
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
();
}
...
...
@@ -736,7 +736,7 @@ static void WINAPI IDirect3DDevice8Impl_GetGammaRamp(IDirect3DDevice8 *iface, D3
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
wined3d_mutex_lock
();
IWineD3DDevice_GetGammaRamp
(
This
->
WineD3DDevice
,
0
,
(
WINED3DGAMMARAMP
*
)
pRamp
);
wined3d_device_get_gamma_ramp
(
This
->
WineD3DDevice
,
0
,
(
WINED3DGAMMARAMP
*
)
pRamp
);
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
)
{
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
)
{
hr
=
IWineD3DDevice_SetRenderTarget
(
This
->
WineD3DDevice
,
0
,
pSurface
->
wined3d_surface
,
TRUE
);
if
(
FAILED
(
hr
))
IWineD3DDevice_SetDepthStencilSurface
(
This
->
WineD3DDevice
,
original_ds
);
hr
=
wined3d_device_set_render_target
(
This
->
WineD3DDevice
,
0
,
pSurface
->
wined3d_surface
,
TRUE
);
if
(
FAILED
(
hr
))
wined3d_device_set_depth_stencil
(
This
->
WineD3DDevice
,
original_ds
);
}
}
if
(
original_ds
)
...
...
@@ -1169,7 +1170,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderTarget(IDirect3DDevice8 *ifa
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetRenderT
arget
(
This
->
WineD3DDevice
,
0
,
&
wined3d_surface
);
hr
=
wined3d_device_get_render_t
arget
(
This
->
WineD3DDevice
,
0
,
&
wined3d_surface
);
if
(
SUCCEEDED
(
hr
)
&&
wined3d_surface
)
{
*
ppRenderTarget
=
wined3d_surface_get_parent
(
wined3d_surface
);
...
...
@@ -1200,7 +1201,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDepthStencilSurface(IDirect3DDevic
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetDepthStencilSurface
(
This
->
WineD3DDevice
,
&
wined3d_surface
);
hr
=
wined3d_device_get_depth_stencil
(
This
->
WineD3DDevice
,
&
wined3d_surface
);
if
(
SUCCEEDED
(
hr
))
{
*
ppZStencilSurface
=
wined3d_surface_get_parent
(
wined3d_surface
);
...
...
@@ -1272,7 +1273,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetTransform(IDirect3DDevice8 *iface,
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
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
();
return
hr
;
...
...
@@ -1288,7 +1289,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTransform(IDirect3DDevice8 *iface,
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetTransform
(
This
->
WineD3DDevice
,
State
,
(
WINED3DMATRIX
*
)
pMatrix
);
hr
=
wined3d_device_get_transform
(
This
->
WineD3DDevice
,
State
,
(
WINED3DMATRIX
*
)
pMatrix
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1320,7 +1321,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetViewport(IDirect3DDevice8 *iface,
/* Note: D3DVIEWPORT8 is compatible with WINED3DVIEWPORT */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetV
iewport
(
This
->
WineD3DDevice
,
(
const
WINED3DVIEWPORT
*
)
pViewport
);
hr
=
wined3d_device_set_v
iewport
(
This
->
WineD3DDevice
,
(
const
WINED3DVIEWPORT
*
)
pViewport
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1336,7 +1337,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetViewport(IDirect3DDevice8 *iface,
/* Note: D3DVIEWPORT8 is compatible with WINED3DVIEWPORT */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetV
iewport
(
This
->
WineD3DDevice
,
(
WINED3DVIEWPORT
*
)
pViewport
);
hr
=
wined3d_device_get_v
iewport
(
This
->
WineD3DDevice
,
(
WINED3DVIEWPORT
*
)
pViewport
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1352,7 +1353,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetMaterial(IDirect3DDevice8 *iface,
/* Note: D3DMATERIAL8 is compatible with WINED3DMATERIAL */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetM
aterial
(
This
->
WineD3DDevice
,
(
const
WINED3DMATERIAL
*
)
pMaterial
);
hr
=
wined3d_device_set_m
aterial
(
This
->
WineD3DDevice
,
(
const
WINED3DMATERIAL
*
)
pMaterial
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1368,7 +1369,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetMaterial(IDirect3DDevice8 *iface,
/* Note: D3DMATERIAL8 is compatible with WINED3DMATERIAL */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetM
aterial
(
This
->
WineD3DDevice
,
(
WINED3DMATERIAL
*
)
pMaterial
);
hr
=
wined3d_device_get_m
aterial
(
This
->
WineD3DDevice
,
(
WINED3DMATERIAL
*
)
pMaterial
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1384,7 +1385,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetLight(IDirect3DDevice8 *iface, DWO
/* Note: D3DLIGHT8 is compatible with WINED3DLIGHT */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetL
ight
(
This
->
WineD3DDevice
,
Index
,
(
const
WINED3DLIGHT
*
)
pLight
);
hr
=
wined3d_device_set_l
ight
(
This
->
WineD3DDevice
,
Index
,
(
const
WINED3DLIGHT
*
)
pLight
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1400,7 +1401,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetLight(IDirect3DDevice8 *iface, DWO
/* Note: D3DLIGHT8 is compatible with WINED3DLIGHT */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetL
ight
(
This
->
WineD3DDevice
,
Index
,
(
WINED3DLIGHT
*
)
pLight
);
hr
=
wined3d_device_get_l
ight
(
This
->
WineD3DDevice
,
Index
,
(
WINED3DLIGHT
*
)
pLight
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1415,7 +1416,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_LightEnable(IDirect3DDevice8 *iface,
TRACE
(
"iface %p, index %u, enable %#x.
\n
"
,
iface
,
Index
,
Enable
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetLightE
nable
(
This
->
WineD3DDevice
,
Index
,
Enable
);
hr
=
wined3d_device_set_light_e
nable
(
This
->
WineD3DDevice
,
Index
,
Enable
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1430,7 +1431,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetLightEnable(IDirect3DDevice8 *ifac
TRACE
(
"iface %p, index %u, enable %p.
\n
"
,
iface
,
Index
,
pEnable
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetLightE
nable
(
This
->
WineD3DDevice
,
Index
,
pEnable
);
hr
=
wined3d_device_get_light_e
nable
(
This
->
WineD3DDevice
,
Index
,
pEnable
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1445,7 +1446,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetClipPlane(IDirect3DDevice8 *iface,
TRACE
(
"iface %p, index %u, plane %p.
\n
"
,
iface
,
Index
,
pPlane
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetClipP
lane
(
This
->
WineD3DDevice
,
Index
,
pPlane
);
hr
=
wined3d_device_set_clip_p
lane
(
This
->
WineD3DDevice
,
Index
,
pPlane
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1460,7 +1461,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetClipPlane(IDirect3DDevice8 *iface,
TRACE
(
"iface %p, index %u, plane %p.
\n
"
,
iface
,
Index
,
pPlane
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetClipP
lane
(
This
->
WineD3DDevice
,
Index
,
pPlane
);
hr
=
wined3d_device_get_clip_p
lane
(
This
->
WineD3DDevice
,
Index
,
pPlane
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1490,11 +1491,11 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(IDirect3DDevice8 *ifac
{
case
D3DRS_ZBIAS
:
wined3d_value
.
f
=
Value
*
zbias_factor
;
hr
=
IWineD3DDevice_SetRenderS
tate
(
This
->
WineD3DDevice
,
WINED3DRS_DEPTHBIAS
,
wined3d_value
.
d
);
hr
=
wined3d_device_set_render_s
tate
(
This
->
WineD3DDevice
,
WINED3DRS_DEPTHBIAS
,
wined3d_value
.
d
);
break
;
default:
hr
=
IWineD3DDevice_SetRenderS
tate
(
This
->
WineD3DDevice
,
State
,
Value
);
hr
=
wined3d_device_set_render_s
tate
(
This
->
WineD3DDevice
,
State
,
Value
);
}
wined3d_mutex_unlock
();
...
...
@@ -1518,12 +1519,12 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderState(IDirect3DDevice8 *ifac
switch
(
State
)
{
case
D3DRS_ZBIAS
:
hr
=
IWineD3DDevice_GetRenderS
tate
(
This
->
WineD3DDevice
,
WINED3DRS_DEPTHBIAS
,
&
wined3d_value
.
d
);
hr
=
wined3d_device_get_render_s
tate
(
This
->
WineD3DDevice
,
WINED3DRS_DEPTHBIAS
,
&
wined3d_value
.
d
);
if
(
SUCCEEDED
(
hr
))
*
pValue
=
wined3d_value
.
f
/
zbias_factor
;
break
;
default:
hr
=
IWineD3DDevice_GetRenderS
tate
(
This
->
WineD3DDevice
,
State
,
pValue
);
hr
=
wined3d_device_get_render_s
tate
(
This
->
WineD3DDevice
,
State
,
pValue
);
}
wined3d_mutex_unlock
();
...
...
@@ -1707,7 +1708,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetClipStatus(IDirect3DDevice8 *iface
/* FIXME: Verify that D3DCLIPSTATUS8 ~= WINED3DCLIPSTATUS */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetClipS
tatus
(
This
->
WineD3DDevice
,
(
const
WINED3DCLIPSTATUS
*
)
pClipStatus
);
hr
=
wined3d_device_set_clip_s
tatus
(
This
->
WineD3DDevice
,
(
const
WINED3DCLIPSTATUS
*
)
pClipStatus
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1722,7 +1723,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetClipStatus(IDirect3DDevice8 *iface
TRACE
(
"iface %p, clip_status %p.
\n
"
,
iface
,
pClipStatus
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetClipS
tatus
(
This
->
WineD3DDevice
,
(
WINED3DCLIPSTATUS
*
)
pClipStatus
);
hr
=
wined3d_device_get_clip_s
tatus
(
This
->
WineD3DDevice
,
(
WINED3DCLIPSTATUS
*
)
pClipStatus
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1742,7 +1743,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(IDirect3DDevice8 *iface,
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetT
exture
(
This
->
WineD3DDevice
,
Stage
,
&
wined3d_texture
);
hr
=
wined3d_device_get_t
exture
(
This
->
WineD3DDevice
,
Stage
,
&
wined3d_texture
);
if
(
FAILED
(
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
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetT
exture
(
This
->
WineD3DDevice
,
Stage
,
hr
=
wined3d_device_set_t
exture
(
This
->
WineD3DDevice
,
Stage
,
pTexture
?
((
IDirect3DBaseTexture8Impl
*
)
pTexture
)
->
wined3d_texture
:
NULL
);
wined3d_mutex_unlock
();
...
...
@@ -1838,8 +1839,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTextureStageState(IDirect3DDevic
l
=
&
tss_lookup
[
Type
];
wined3d_mutex_lock
();
if
(
l
->
sampler_state
)
hr
=
IWineD3DDevice_GetSamplerState
(
This
->
WineD3DDevice
,
Stage
,
l
->
state
,
pValue
);
else
hr
=
IWineD3DDevice_GetTextureStageState
(
This
->
WineD3DDevice
,
Stage
,
l
->
state
,
pValue
);
if
(
l
->
sampler_state
)
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
();
return
hr
;
...
...
@@ -1863,8 +1866,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(IDirect3DDevice8
l
=
&
tss_lookup
[
Type
];
wined3d_mutex_lock
();
if
(
l
->
sampler_state
)
hr
=
IWineD3DDevice_SetSamplerState
(
This
->
WineD3DDevice
,
Stage
,
l
->
state
,
Value
);
else
hr
=
IWineD3DDevice_SetTextureStageState
(
This
->
WineD3DDevice
,
Stage
,
l
->
state
,
Value
);
if
(
l
->
sampler_state
)
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
();
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
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetPaletteE
ntries
(
This
->
WineD3DDevice
,
PaletteNumber
,
pEntries
);
hr
=
wined3d_device_set_palette_e
ntries
(
This
->
WineD3DDevice
,
PaletteNumber
,
pEntries
);
wined3d_mutex_unlock
();
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
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetPaletteE
ntries
(
This
->
WineD3DDevice
,
PaletteNumber
,
pEntries
);
hr
=
wined3d_device_get_palette_e
ntries
(
This
->
WineD3DDevice
,
PaletteNumber
,
pEntries
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1932,7 +1937,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetCurrentTexturePalette(IDirect3DDev
TRACE
(
"iface %p, palette_idx %u.
\n
"
,
iface
,
PaletteNumber
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetCurrentTextureP
alette
(
This
->
WineD3DDevice
,
PaletteNumber
);
hr
=
wined3d_device_set_current_texture_p
alette
(
This
->
WineD3DDevice
,
PaletteNumber
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1947,7 +1952,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetCurrentTexturePalette(IDirect3DD
TRACE
(
"iface %p, palette_idx %p.
\n
"
,
iface
,
PaletteNumber
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetCurrentTextureP
alette
(
This
->
WineD3DDevice
,
PaletteNumber
);
hr
=
wined3d_device_get_current_texture_p
alette
(
This
->
WineD3DDevice
,
PaletteNumber
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -2176,9 +2181,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(IDirect3DDevice8 *ifa
TRACE
(
"Setting FVF, %#x
\n
"
,
pShader
);
wined3d_mutex_lock
();
IWineD3DDevice_SetVertexD
eclaration
(
This
->
WineD3DDevice
,
wined3d_device_set_vertex_d
eclaration
(
This
->
WineD3DDevice
,
IDirect3DDevice8Impl_FindDecl
(
This
,
pShader
)
->
wined3d_vertex_declaration
);
IWineD3DDevice_SetVertexS
hader
(
This
->
WineD3DDevice
,
NULL
);
wined3d_device_set_vertex_s
hader
(
This
->
WineD3DDevice
,
NULL
);
wined3d_mutex_unlock
();
return
D3D_OK
;
...
...
@@ -2196,10 +2201,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(IDirect3DDevice8 *ifa
return
D3DERR_INVALIDCALL
;
}
hr
=
IWineD3DDevice_SetVertexD
eclaration
(
This
->
WineD3DDevice
,
hr
=
wined3d_device_set_vertex_d
eclaration
(
This
->
WineD3DDevice
,
((
IDirect3DVertexDeclaration8Impl
*
)
shader
->
vertex_declaration
)
->
wined3d_vertex_declaration
);
if
(
SUCCEEDED
(
hr
))
hr
=
IWineD3DDevice_SetVertexS
hader
(
This
->
WineD3DDevice
,
shader
->
wined3d_shader
);
hr
=
wined3d_device_set_vertex_s
hader
(
This
->
WineD3DDevice
,
shader
->
wined3d_shader
);
wined3d_mutex_unlock
();
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
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetVertexD
eclaration
(
This
->
WineD3DDevice
,
&
wined3d_declaration
);
hr
=
wined3d_device_get_vertex_d
eclaration
(
This
->
WineD3DDevice
,
&
wined3d_declaration
);
if
(
FAILED
(
hr
))
{
wined3d_mutex_unlock
();
...
...
@@ -2261,7 +2266,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeleteVertexShader(IDirect3DDevice8 *
return
D3DERR_INVALIDCALL
;
}
cur
=
IWineD3DDevice_GetVertexS
hader
(
This
->
WineD3DDevice
);
cur
=
wined3d_device_get_vertex_s
hader
(
This
->
WineD3DDevice
);
if
(
cur
)
{
if
(
cur
==
shader
->
wined3d_shader
)
...
...
@@ -2295,7 +2300,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShaderConstant(IDirect3DDevi
}
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
();
return
hr
;
...
...
@@ -2317,7 +2322,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderConstant(IDirect3DDevi
}
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
();
return
hr
;
...
...
@@ -2411,8 +2416,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetIndices(IDirect3DDevice8 *iface,
* problem)
*/
wined3d_mutex_lock
();
IWineD3DDevice_SetBaseVertexI
ndex
(
This
->
WineD3DDevice
,
baseVertexIndex
);
hr
=
IWineD3DDevice_SetIndexB
uffer
(
This
->
WineD3DDevice
,
wined3d_device_set_base_vertex_i
ndex
(
This
->
WineD3DDevice
,
baseVertexIndex
);
hr
=
wined3d_device_set_index_b
uffer
(
This
->
WineD3DDevice
,
ib
?
ib
->
wineD3DIndexBuffer
:
NULL
,
ib
?
ib
->
format
:
WINED3DFMT_UNKNOWN
);
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 */
wined3d_mutex_lock
();
IWineD3DDevice_GetBaseVertexIndex
(
This
->
WineD3DDevice
,
(
INT
*
)
pBaseVertexIndex
);
hr
=
IWineD3DDevice_GetIndexB
uffer
(
This
->
WineD3DDevice
,
&
retIndexData
);
*
pBaseVertexIndex
=
wined3d_device_get_base_vertex_index
(
This
->
WineD3DDevice
);
hr
=
wined3d_device_get_index_b
uffer
(
This
->
WineD3DDevice
,
&
retIndexData
);
if
(
SUCCEEDED
(
hr
)
&&
retIndexData
)
{
*
ppIndexData
=
wined3d_buffer_get_parent
(
retIndexData
);
...
...
@@ -2517,7 +2522,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(IDirect3DDevice8 *ifac
if
(
!
pShader
)
{
hr
=
IWineD3DDevice_SetPixelS
hader
(
This
->
WineD3DDevice
,
NULL
);
hr
=
wined3d_device_set_pixel_s
hader
(
This
->
WineD3DDevice
,
NULL
);
wined3d_mutex_unlock
();
return
hr
;
}
...
...
@@ -2531,7 +2536,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(IDirect3DDevice8 *ifac
}
TRACE
(
"(%p) : Setting shader %p
\n
"
,
This
,
shader
);
hr
=
IWineD3DDevice_SetPixelS
hader
(
This
->
WineD3DDevice
,
shader
->
wined3d_shader
);
hr
=
wined3d_device_set_pixel_s
hader
(
This
->
WineD3DDevice
,
shader
->
wined3d_shader
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -2550,7 +2555,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(IDirect3DDevice8 *ifac
}
wined3d_mutex_lock
();
object
=
IWineD3DDevice_GetPixelS
hader
(
This
->
WineD3DDevice
);
object
=
wined3d_device_get_pixel_s
hader
(
This
->
WineD3DDevice
);
if
(
object
)
{
IDirect3DPixelShader8Impl
*
d3d8_shader
;
...
...
@@ -2587,7 +2592,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(IDirect3DDevice8 *i
return
D3DERR_INVALIDCALL
;
}
cur
=
IWineD3DDevice_GetPixelS
hader
(
This
->
WineD3DDevice
);
cur
=
wined3d_device_get_pixel_s
hader
(
This
->
WineD3DDevice
);
if
(
cur
)
{
if
(
cur
==
shader
->
wined3d_shader
)
...
...
@@ -2615,7 +2620,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShaderConstant(IDirect3DDev
iface
,
Register
,
pConstantData
,
ConstantCount
);
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
();
return
hr
;
...
...
@@ -2631,7 +2636,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShaderConstant(IDirect3DDevic
iface
,
Register
,
pConstantData
,
ConstantCount
);
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
();
return
hr
;
...
...
@@ -2719,9 +2724,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetStreamSource(IDirect3DDevice8 *ifa
iface
,
StreamNumber
,
pStreamData
,
Stride
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetStreamS
ource
(
This
->
WineD3DDevice
,
StreamNumber
,
NULL
==
pStreamData
?
NULL
:
((
IDirect3DVertexBuffer8Impl
*
)
pStreamData
)
->
wineD3DVertexBuffer
,
0
/* Offset in bytes */
,
Stride
);
hr
=
wined3d_device_set_stream_s
ource
(
This
->
WineD3DDevice
,
StreamNumber
,
pStreamData
?
((
IDirect3DVertexBuffer8Impl
*
)
pStreamData
)
->
wineD3DVertexBuffer
:
NULL
,
0
/* Offset in bytes */
,
Stride
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -2742,7 +2747,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetStreamSource(IDirect3DDevice8 *ifa
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetStreamS
ource
(
This
->
WineD3DDevice
,
StreamNumber
,
hr
=
wined3d_device_get_stream_s
ource
(
This
->
WineD3DDevice
,
StreamNumber
,
&
retStream
,
0
/* Offset in bytes */
,
pStride
);
if
(
SUCCEEDED
(
hr
)
&&
retStream
)
{
...
...
@@ -3194,7 +3199,7 @@ HRESULT device_init(IDirect3DDevice8Impl *device, struct wined3d *wined3d, UINT
return
hr
;
}
hr
=
IWineD3DDevice_SetRenderS
tate
(
device
->
WineD3DDevice
,
WINED3DRS_POINTSIZE_MIN
,
0
);
hr
=
wined3d_device_set_render_s
tate
(
device
->
WineD3DDevice
,
WINED3DRS_POINTSIZE_MIN
,
0
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d9/device.c
View file @
979e3744
...
...
@@ -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
*/
wined3d_mutex_lock
();
IWineD3DDevice_SetIndexBuffer
(
This
->
WineD3DDevice
,
NULL
,
WINED3DFMT_UNKNOWN
);
for
(
i
=
0
;
i
<
16
;
i
++
)
{
IWineD3DDevice_SetStreamSource
(
This
->
WineD3DDevice
,
i
,
NULL
,
0
,
0
);
wined3d_device_set_index_buffer
(
This
->
WineD3DDevice
,
NULL
,
WINED3DFMT_UNKNOWN
);
for
(
i
=
0
;
i
<
16
;
++
i
)
{
wined3d_device_set_stream_source
(
This
->
WineD3DDevice
,
i
,
NULL
,
0
,
0
);
}
for
(
i
=
0
;
i
<
16
;
i
++
)
{
IWineD3DDevice_SetTexture
(
This
->
WineD3DDevice
,
i
,
NULL
);
for
(
i
=
0
;
i
<
16
;
++
i
)
{
wined3d_device_set_texture
(
This
->
WineD3DDevice
,
i
,
NULL
);
}
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 */
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
();
}
...
...
@@ -743,7 +745,7 @@ static void WINAPI IDirect3DDevice9Impl_GetGammaRamp(IDirect3DDevice9Ex *iface,
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
wined3d_mutex_lock
();
IWineD3DDevice_GetGammaRamp
(
This
->
WineD3DDevice
,
iSwapChain
,
(
WINED3DGAMMARAMP
*
)
pRamp
);
wined3d_device_get_gamma_ramp
(
This
->
WineD3DDevice
,
iSwapChain
,
(
WINED3DGAMMARAMP
*
)
pRamp
);
wined3d_mutex_unlock
();
}
...
...
@@ -1155,7 +1157,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderTarget(IDirect3DDevice9Ex *i
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetRenderT
arget
(
This
->
WineD3DDevice
,
RenderTargetIndex
,
hr
=
wined3d_device_set_render_t
arget
(
This
->
WineD3DDevice
,
RenderTargetIndex
,
pSurface
?
pSurface
->
wined3d_surface
:
NULL
,
TRUE
);
wined3d_mutex_unlock
();
...
...
@@ -1183,7 +1185,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(IDirect3DDevice9Ex *i
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetRenderT
arget
(
This
->
WineD3DDevice
,
RenderTargetIndex
,
&
wined3d_surface
);
hr
=
wined3d_device_get_render_t
arget
(
This
->
WineD3DDevice
,
RenderTargetIndex
,
&
wined3d_surface
);
if
(
FAILED
(
hr
))
{
...
...
@@ -1217,7 +1219,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetDepthStencilSurface(IDirect3DDevic
pSurface
=
(
IDirect3DSurface9Impl
*
)
pZStencilSurface
;
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
();
return
hr
;
...
...
@@ -1237,7 +1239,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDepthStencilSurface(IDirect3DDevic
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetDepthStencilSurface
(
This
->
WineD3DDevice
,
&
wined3d_surface
);
hr
=
wined3d_device_get_depth_stencil
(
This
->
WineD3DDevice
,
&
wined3d_surface
);
if
(
SUCCEEDED
(
hr
))
{
*
ppZStencilSurface
=
wined3d_surface_get_parent
(
wined3d_surface
);
...
...
@@ -1310,7 +1312,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetTransform(IDirect3DDevice9Ex *ifac
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
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
();
return
hr
;
...
...
@@ -1326,7 +1328,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTransform(IDirect3DDevice9Ex *ifac
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetTransform
(
This
->
WineD3DDevice
,
State
,
(
WINED3DMATRIX
*
)
pMatrix
);
hr
=
wined3d_device_get_transform
(
This
->
WineD3DDevice
,
State
,
(
WINED3DMATRIX
*
)
pMatrix
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1358,7 +1360,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetViewport(IDirect3DDevice9Ex *iface
/* Note: D3DVIEWPORT9 is compatible with WINED3DVIEWPORT */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetV
iewport
(
This
->
WineD3DDevice
,
(
const
WINED3DVIEWPORT
*
)
pViewport
);
hr
=
wined3d_device_set_v
iewport
(
This
->
WineD3DDevice
,
(
const
WINED3DVIEWPORT
*
)
pViewport
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1374,7 +1376,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetViewport(IDirect3DDevice9Ex *iface
/* Note: D3DVIEWPORT9 is compatible with WINED3DVIEWPORT */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetV
iewport
(
This
->
WineD3DDevice
,
(
WINED3DVIEWPORT
*
)
pViewport
);
hr
=
wined3d_device_get_v
iewport
(
This
->
WineD3DDevice
,
(
WINED3DVIEWPORT
*
)
pViewport
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1390,7 +1392,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetMaterial(IDirect3DDevice9Ex *iface
/* Note: D3DMATERIAL9 is compatible with WINED3DMATERIAL */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetM
aterial
(
This
->
WineD3DDevice
,
(
const
WINED3DMATERIAL
*
)
pMaterial
);
hr
=
wined3d_device_set_m
aterial
(
This
->
WineD3DDevice
,
(
const
WINED3DMATERIAL
*
)
pMaterial
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1406,7 +1408,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetMaterial(IDirect3DDevice9Ex *iface
/* Note: D3DMATERIAL9 is compatible with WINED3DMATERIAL */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetM
aterial
(
This
->
WineD3DDevice
,
(
WINED3DMATERIAL
*
)
pMaterial
);
hr
=
wined3d_device_get_m
aterial
(
This
->
WineD3DDevice
,
(
WINED3DMATERIAL
*
)
pMaterial
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1422,7 +1424,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetLight(IDirect3DDevice9Ex *iface, D
/* Note: D3DLIGHT9 is compatible with WINED3DLIGHT */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetL
ight
(
This
->
WineD3DDevice
,
Index
,
(
const
WINED3DLIGHT
*
)
pLight
);
hr
=
wined3d_device_set_l
ight
(
This
->
WineD3DDevice
,
Index
,
(
const
WINED3DLIGHT
*
)
pLight
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1438,7 +1440,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetLight(IDirect3DDevice9Ex *iface, D
/* Note: D3DLIGHT9 is compatible with WINED3DLIGHT */
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetL
ight
(
This
->
WineD3DDevice
,
Index
,
(
WINED3DLIGHT
*
)
pLight
);
hr
=
wined3d_device_get_l
ight
(
This
->
WineD3DDevice
,
Index
,
(
WINED3DLIGHT
*
)
pLight
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1453,7 +1455,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_LightEnable(IDirect3DDevice9Ex *iface
TRACE
(
"iface %p, index %u, enable %#x.
\n
"
,
iface
,
Index
,
Enable
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetLightE
nable
(
This
->
WineD3DDevice
,
Index
,
Enable
);
hr
=
wined3d_device_set_light_e
nable
(
This
->
WineD3DDevice
,
Index
,
Enable
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1468,7 +1470,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetLightEnable(IDirect3DDevice9Ex *if
TRACE
(
"iface %p, index %u, enable %p.
\n
"
,
iface
,
Index
,
pEnable
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetLightE
nable
(
This
->
WineD3DDevice
,
Index
,
pEnable
);
hr
=
wined3d_device_get_light_e
nable
(
This
->
WineD3DDevice
,
Index
,
pEnable
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1483,7 +1485,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetClipPlane(IDirect3DDevice9Ex *ifac
TRACE
(
"iface %p, index %u, plane %p.
\n
"
,
iface
,
Index
,
pPlane
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetClipP
lane
(
This
->
WineD3DDevice
,
Index
,
pPlane
);
hr
=
wined3d_device_set_clip_p
lane
(
This
->
WineD3DDevice
,
Index
,
pPlane
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1498,7 +1500,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetClipPlane(IDirect3DDevice9Ex *ifac
TRACE
(
"iface %p, index %u, plane %p.
\n
"
,
iface
,
Index
,
pPlane
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetClipP
lane
(
This
->
WineD3DDevice
,
Index
,
pPlane
);
hr
=
wined3d_device_get_clip_p
lane
(
This
->
WineD3DDevice
,
Index
,
pPlane
);
wined3d_mutex_unlock
();
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
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetRenderS
tate
(
This
->
WineD3DDevice
,
State
,
Value
);
hr
=
wined3d_device_set_render_s
tate
(
This
->
WineD3DDevice
,
State
,
Value
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1528,7 +1530,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderState(IDirect3DDevice9Ex *if
TRACE
(
"iface %p, state %#x, value %p.
\n
"
,
iface
,
State
,
pValue
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetRenderS
tate
(
This
->
WineD3DDevice
,
State
,
pValue
);
hr
=
wined3d_device_get_render_s
tate
(
This
->
WineD3DDevice
,
State
,
pValue
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1639,7 +1641,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetClipStatus(IDirect3DDevice9Ex *ifa
TRACE
(
"iface %p, clip_status %p.
\n
"
,
iface
,
pClipStatus
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetClipS
tatus
(
This
->
WineD3DDevice
,
(
const
WINED3DCLIPSTATUS
*
)
pClipStatus
);
hr
=
wined3d_device_set_clip_s
tatus
(
This
->
WineD3DDevice
,
(
const
WINED3DCLIPSTATUS
*
)
pClipStatus
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1654,7 +1656,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetClipStatus(IDirect3DDevice9Ex *ifa
TRACE
(
"iface %p, clip_status %p.
\n
"
,
iface
,
pClipStatus
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetClipS
tatus
(
This
->
WineD3DDevice
,
(
WINED3DCLIPSTATUS
*
)
pClipStatus
);
hr
=
wined3d_device_get_clip_s
tatus
(
This
->
WineD3DDevice
,
(
WINED3DCLIPSTATUS
*
)
pClipStatus
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1674,7 +1676,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(IDirect3DDevice9Ex *iface,
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetT
exture
(
This
->
WineD3DDevice
,
Stage
,
&
wined3d_texture
);
hr
=
wined3d_device_get_t
exture
(
This
->
WineD3DDevice
,
Stage
,
&
wined3d_texture
);
if
(
SUCCEEDED
(
hr
)
&&
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
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetT
exture
(
device
->
WineD3DDevice
,
stage
,
hr
=
wined3d_device_set_t
exture
(
device
->
WineD3DDevice
,
stage
,
texture
?
((
IDirect3DBaseTexture9Impl
*
)
texture
)
->
wined3d_texture
:
NULL
);
wined3d_mutex_unlock
();
...
...
@@ -1762,7 +1764,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTextureStageState(IDirect3DDevice9
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetTextureStageS
tate
(
This
->
WineD3DDevice
,
Stage
,
tss_lookup
[
Type
],
pValue
);
hr
=
wined3d_device_get_texture_stage_s
tate
(
This
->
WineD3DDevice
,
Stage
,
tss_lookup
[
Type
],
pValue
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1783,7 +1785,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetTextureStageState(IDirect3DDevice9
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetTextureStageS
tate
(
This
->
WineD3DDevice
,
Stage
,
tss_lookup
[
Type
],
Value
);
hr
=
wined3d_device_set_texture_stage_s
tate
(
This
->
WineD3DDevice
,
Stage
,
tss_lookup
[
Type
],
Value
);
wined3d_mutex_unlock
();
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
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetSamplerS
tate
(
This
->
WineD3DDevice
,
Sampler
,
Type
,
pValue
);
hr
=
wined3d_device_get_sampler_s
tate
(
This
->
WineD3DDevice
,
Sampler
,
Type
,
pValue
);
wined3d_mutex_unlock
();
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
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetSamplerS
tate
(
This
->
WineD3DDevice
,
Sampler
,
Type
,
Value
);
hr
=
wined3d_device_set_sampler_s
tate
(
This
->
WineD3DDevice
,
Sampler
,
Type
,
Value
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1843,7 +1845,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPaletteEntries(IDirect3DDevice9Ex
TRACE
(
"iface %p, palette_idx %u, entries %p.
\n
"
,
iface
,
PaletteNumber
,
pEntries
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetPaletteE
ntries
(
This
->
WineD3DDevice
,
PaletteNumber
,
pEntries
);
hr
=
wined3d_device_set_palette_e
ntries
(
This
->
WineD3DDevice
,
PaletteNumber
,
pEntries
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1858,7 +1860,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetPaletteEntries(IDirect3DDevice9Ex
TRACE
(
"iface %p, palette_idx %u, entries %p.
\n
"
,
iface
,
PaletteNumber
,
pEntries
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetPaletteE
ntries
(
This
->
WineD3DDevice
,
PaletteNumber
,
pEntries
);
hr
=
wined3d_device_get_palette_e
ntries
(
This
->
WineD3DDevice
,
PaletteNumber
,
pEntries
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1873,7 +1875,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetCurrentTexturePalette(IDirect3DDev
TRACE
(
"iface %p, palette_idx %u.
\n
"
,
iface
,
PaletteNumber
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetCurrentTextureP
alette
(
This
->
WineD3DDevice
,
PaletteNumber
);
hr
=
wined3d_device_set_current_texture_p
alette
(
This
->
WineD3DDevice
,
PaletteNumber
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1888,7 +1890,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetCurrentTexturePalette(IDirect3DDev
TRACE
(
"iface %p, palette_idx %p.
\n
"
,
iface
,
PaletteNumber
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetCurrentTextureP
alette
(
This
->
WineD3DDevice
,
PaletteNumber
);
hr
=
wined3d_device_get_current_texture_p
alette
(
This
->
WineD3DDevice
,
PaletteNumber
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1903,7 +1905,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetScissorRect(IDirect3DDevice9Ex *if
TRACE
(
"iface %p, rect %p.
\n
"
,
iface
,
pRect
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetScissorR
ect
(
This
->
WineD3DDevice
,
pRect
);
hr
=
wined3d_device_set_scissor_r
ect
(
This
->
WineD3DDevice
,
pRect
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1917,7 +1919,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetScissorRect(IDirect3DDevice9Ex *if
TRACE
(
"iface %p, rect %p.
\n
"
,
iface
,
pRect
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetScissorR
ect
(
This
->
WineD3DDevice
,
pRect
);
hr
=
wined3d_device_get_scissor_r
ect
(
This
->
WineD3DDevice
,
pRect
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1932,7 +1934,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetSoftwareVertexProcessing(IDirect3D
TRACE
(
"iface %p, software %#x.
\n
"
,
iface
,
bSoftware
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetSoftwareVertexP
rocessing
(
This
->
WineD3DDevice
,
bSoftware
);
hr
=
wined3d_device_set_software_vertex_p
rocessing
(
This
->
WineD3DDevice
,
bSoftware
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1946,7 +1948,7 @@ static BOOL WINAPI IDirect3DDevice9Impl_GetSoftwareVertexProcessing(IDirect3DDev
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
ret
=
IWineD3DDevice_GetSoftwareVertexP
rocessing
(
This
->
WineD3DDevice
);
ret
=
wined3d_device_get_software_vertex_p
rocessing
(
This
->
WineD3DDevice
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -1960,7 +1962,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetNPatchMode(IDirect3DDevice9Ex *ifa
TRACE
(
"iface %p, segment_count %.8e.
\n
"
,
iface
,
nSegments
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetNPatchM
ode
(
This
->
WineD3DDevice
,
nSegments
);
hr
=
wined3d_device_set_npatch_m
ode
(
This
->
WineD3DDevice
,
nSegments
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1974,7 +1976,7 @@ static float WINAPI IDirect3DDevice9Impl_GetNPatchMode(IDirect3DDevice9Ex *iface
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
ret
=
IWineD3DDevice_GetNPatchM
ode
(
This
->
WineD3DDevice
);
ret
=
wined3d_device_get_npatch_m
ode
(
This
->
WineD3DDevice
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -2011,7 +2013,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitive(IDirect3DDevice9
NumVertices
,
startIndex
,
primCount
);
wined3d_mutex_lock
();
IWineD3DDevice_SetBaseVertexI
ndex
(
This
->
WineD3DDevice
,
BaseVertexIndex
);
wined3d_device_set_base_vertex_i
ndex
(
This
->
WineD3DDevice
,
BaseVertexIndex
);
IWineD3DDevice_SetPrimitiveType
(
This
->
WineD3DDevice
,
PrimitiveType
);
hr
=
IWineD3DDevice_DrawIndexedPrimitive
(
This
->
WineD3DDevice
,
startIndex
,
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
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetVertexD
eclaration
(
This
->
WineD3DDevice
,
hr
=
wined3d_device_set_vertex_d
eclaration
(
This
->
WineD3DDevice
,
declaration
?
((
IDirect3DVertexDeclaration9Impl
*
)
declaration
)
->
wineD3DVertexDeclaration
:
NULL
);
wined3d_mutex_unlock
();
...
...
@@ -2146,7 +2148,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(IDirect3DDevice9
if
(
!
declaration
)
return
D3DERR_INVALIDCALL
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetVertexD
eclaration
(
This
->
WineD3DDevice
,
&
wined3d_declaration
);
hr
=
wined3d_device_get_vertex_d
eclaration
(
This
->
WineD3DDevice
,
&
wined3d_declaration
);
if
(
SUCCEEDED
(
hr
)
&&
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
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetVertexS
hader
(
This
->
WineD3DDevice
,
hr
=
wined3d_device_set_vertex_s
hader
(
This
->
WineD3DDevice
,
shader
?
((
IDirect3DVertexShader9Impl
*
)
shader
)
->
wined3d_shader
:
NULL
);
wined3d_mutex_unlock
();
...
...
@@ -2337,7 +2339,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(IDirect3DDevice9Ex *i
TRACE
(
"iface %p, shader %p.
\n
"
,
iface
,
shader
);
wined3d_mutex_lock
();
wined3d_shader
=
IWineD3DDevice_GetVertexS
hader
(
This
->
WineD3DDevice
);
wined3d_shader
=
wined3d_device_get_vertex_s
hader
(
This
->
WineD3DDevice
);
if
(
wined3d_shader
)
{
*
shader
=
wined3d_shader_get_parent
(
wined3d_shader
);
...
...
@@ -2371,7 +2373,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(IDirect3DDev
}
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
();
return
hr
;
...
...
@@ -2393,7 +2395,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantF(IDirect3DDev
}
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
();
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
);
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
();
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
);
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
();
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
);
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
();
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
);
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
();
return
hr
;
...
...
@@ -2469,7 +2471,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSource(IDirect3DDevice9Ex *i
iface
,
StreamNumber
,
pStreamData
,
OffsetInBytes
,
Stride
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetStreamS
ource
(
This
->
WineD3DDevice
,
StreamNumber
,
hr
=
wined3d_device_set_stream_s
ource
(
This
->
WineD3DDevice
,
StreamNumber
,
pStreamData
?
((
IDirect3DVertexBuffer9Impl
*
)
pStreamData
)
->
wineD3DVertexBuffer
:
NULL
,
OffsetInBytes
,
Stride
);
wined3d_mutex_unlock
();
...
...
@@ -2492,7 +2494,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSource(IDirect3DDevice9Ex *i
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetStreamS
ource
(
This
->
WineD3DDevice
,
StreamNumber
,
&
retStream
,
OffsetInBytes
,
pStride
);
hr
=
wined3d_device_get_stream_s
ource
(
This
->
WineD3DDevice
,
StreamNumber
,
&
retStream
,
OffsetInBytes
,
pStride
);
if
(
SUCCEEDED
(
hr
)
&&
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
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetStreamSourceF
req
(
This
->
WineD3DDevice
,
StreamNumber
,
Divider
);
hr
=
wined3d_device_set_stream_source_f
req
(
This
->
WineD3DDevice
,
StreamNumber
,
Divider
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -2536,7 +2538,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSourceFreq(IDirect3DDevice9E
TRACE
(
"iface %p, stream_idx %u, freq %p.
\n
"
,
iface
,
StreamNumber
,
Divider
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetStreamSourceF
req
(
This
->
WineD3DDevice
,
StreamNumber
,
Divider
);
hr
=
wined3d_device_get_stream_source_f
req
(
This
->
WineD3DDevice
,
StreamNumber
,
Divider
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -2552,7 +2554,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetIndices(IDirect3DDevice9Ex *iface,
TRACE
(
"iface %p, buffer %p.
\n
"
,
iface
,
pIndexData
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetIndexB
uffer
(
This
->
WineD3DDevice
,
hr
=
wined3d_device_set_index_b
uffer
(
This
->
WineD3DDevice
,
ib
?
ib
->
wineD3DIndexBuffer
:
NULL
,
ib
?
ib
->
format
:
WINED3DFMT_UNKNOWN
);
wined3d_mutex_unlock
();
...
...
@@ -2574,7 +2576,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(IDirect3DDevice9Ex *iface,
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetIndexB
uffer
(
This
->
WineD3DDevice
,
&
retIndexData
);
hr
=
wined3d_device_get_index_b
uffer
(
This
->
WineD3DDevice
,
&
retIndexData
);
if
(
SUCCEEDED
(
hr
)
&&
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
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetPixelS
hader
(
This
->
WineD3DDevice
,
hr
=
wined3d_device_set_pixel_s
hader
(
This
->
WineD3DDevice
,
shader
?
((
IDirect3DPixelShader9Impl
*
)
shader
)
->
wined3d_shader
:
NULL
);
wined3d_mutex_unlock
();
...
...
@@ -2648,7 +2650,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(IDirect3DDevice9Ex *if
if
(
!
shader
)
return
D3DERR_INVALIDCALL
;
wined3d_mutex_lock
();
wined3d_shader
=
IWineD3DDevice_GetPixelS
hader
(
This
->
WineD3DDevice
);
wined3d_shader
=
wined3d_device_get_pixel_s
hader
(
This
->
WineD3DDevice
);
if
(
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
);
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
();
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
);
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
();
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
);
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
();
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
);
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
();
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
);
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
();
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
);
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
();
return
hr
;
...
...
dlls/ddraw/device.c
View file @
979e3744
...
...
@@ -297,7 +297,7 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface)
/* Set the device up to render to the front buffer since the back
* buffer will vanish soon. */
IWineD3DDevice_SetRenderT
arget
(
This
->
wineD3DDevice
,
0
,
wined3d_device_set_render_t
arget
(
This
->
wineD3DDevice
,
0
,
This
->
ddraw
->
d3d_target
->
wined3d_surface
,
TRUE
);
/* Release the WineD3DDevice. This won't destroy it */
...
...
@@ -1373,24 +1373,14 @@ IDirect3DDeviceImpl_1_SetMatrix(IDirect3DDevice *iface,
*
m
=
*
D3DMatrix
;
if
(
This
->
world
==
D3DMatHandle
)
{
IWineD3DDevice_SetTransform
(
This
->
wineD3DDevice
,
WINED3DTS_WORLDMATRIX
(
0
),
(
WINED3DMATRIX
*
)
D3DMatrix
);
}
if
(
This
->
view
==
D3DMatHandle
)
{
IWineD3DDevice_SetTransform
(
This
->
wineD3DDevice
,
WINED3DTS_VIEW
,
(
WINED3DMATRIX
*
)
D3DMatrix
);
}
if
(
This
->
proj
==
D3DMatHandle
)
{
IWineD3DDevice_SetTransform
(
This
->
wineD3DDevice
,
WINED3DTS_PROJECTION
,
(
WINED3DMATRIX
*
)
D3DMatrix
);
}
if
(
D3DMatHandle
==
This
->
world
)
wined3d_device_set_transform
(
This
->
wineD3DDevice
,
WINED3DTS_WORLDMATRIX
(
0
),
(
WINED3DMATRIX
*
)
D3DMatrix
);
if
(
D3DMatHandle
==
This
->
view
)
wined3d_device_set_transform
(
This
->
wineD3DDevice
,
WINED3DTS_VIEW
,
(
WINED3DMATRIX
*
)
D3DMatrix
);
if
(
D3DMatHandle
==
This
->
proj
)
wined3d_device_set_transform
(
This
->
wineD3DDevice
,
WINED3DTS_PROJECTION
,
(
WINED3DMATRIX
*
)
D3DMatrix
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3D_OK
;
...
...
@@ -1861,7 +1851,7 @@ IDirect3DDeviceImpl_7_SetRenderTarget(IDirect3DDevice7 *iface,
return
D3D_OK
;
}
hr
=
IWineD3DDevice_SetRenderT
arget
(
This
->
wineD3DDevice
,
0
,
hr
=
wined3d_device_set_render_t
arget
(
This
->
wineD3DDevice
,
0
,
Target
?
Target
->
wined3d_surface
:
NULL
,
FALSE
);
if
(
hr
!=
D3D_OK
)
{
...
...
@@ -2271,9 +2261,7 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
{
WINED3DTEXTUREFILTERTYPE
tex_mag
;
hr
=
IWineD3DDevice_GetSamplerState
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_MAGFILTER
,
&
tex_mag
);
hr
=
wined3d_device_get_sampler_state
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_MAGFILTER
,
&
tex_mag
);
switch
(
tex_mag
)
{
...
...
@@ -2295,14 +2283,14 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
WINED3DTEXTUREFILTERTYPE
tex_min
;
WINED3DTEXTUREFILTERTYPE
tex_mip
;
hr
=
IWineD3DDevice_GetSamplerS
tate
(
This
->
wineD3DDevice
,
hr
=
wined3d_device_get_sampler_s
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_MINFILTER
,
&
tex_min
);
if
(
FAILED
(
hr
))
{
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
hr
=
IWineD3DDevice_GetSamplerS
tate
(
This
->
wineD3DDevice
,
hr
=
wined3d_device_get_sampler_s
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_MIPFILTER
,
&
tex_mip
);
switch
(
tex_min
)
...
...
@@ -2353,14 +2341,12 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
case
D3DRENDERSTATE_TEXTUREADDRESS
:
case
D3DRENDERSTATE_TEXTUREADDRESSU
:
hr
=
IWineD3DDevice_GetSamplerState
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_ADDRESSU
,
Value
);
hr
=
wined3d_device_get_sampler_state
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_ADDRESSU
,
Value
);
break
;
case
D3DRENDERSTATE_TEXTUREADDRESSV
:
hr
=
IWineD3DDevice_GetSamplerState
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_ADDRESSV
,
Value
);
hr
=
wined3d_device_get_sampler_state
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_ADDRESSV
,
Value
);
break
;
case
D3DRENDERSTATE_BORDERCOLOR
:
...
...
@@ -2382,10 +2368,9 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
float
f
;
}
wined3d_value
;
hr
=
IWineD3DDevice_GetRenderState
(
This
->
wineD3DDevice
,
WINED3DRS_DEPTHBIAS
,
&
wined3d_value
.
d
);
if
(
SUCCEEDED
(
hr
))
*
Value
=
wined3d_value
.
f
/
zbias_factor
;
hr
=
wined3d_device_get_render_state
(
This
->
wineD3DDevice
,
WINED3DRS_DEPTHBIAS
,
&
wined3d_value
.
d
);
if
(
SUCCEEDED
(
hr
))
*
Value
=
wined3d_value
.
f
/
zbias_factor
;
break
;
}
...
...
@@ -2398,9 +2383,7 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
hr
=
E_NOTIMPL
;
break
;
}
hr
=
IWineD3DDevice_GetRenderState
(
This
->
wineD3DDevice
,
RenderStateType
,
Value
);
hr
=
wined3d_device_get_render_state
(
This
->
wineD3DDevice
,
RenderStateType
,
Value
);
}
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
...
...
@@ -2450,7 +2433,7 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface,
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_GetT
exture
(
This
->
wineD3DDevice
,
0
,
&
tex
);
hr
=
wined3d_device_get_t
exture
(
This
->
wineD3DDevice
,
0
,
&
tex
);
if
(
SUCCEEDED
(
hr
)
&&
tex
)
{
/* The parent of the texture is the IDirectDrawSurface7
...
...
@@ -2476,12 +2459,12 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface,
This
->
legacyTextureBlending
=
TRUE
;
IWineD3DDevice_GetTextureStageS
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLOROP
,
&
colorop
);
IWineD3DDevice_GetTextureStageS
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG1
,
&
colorarg1
);
IWineD3DDevice_GetTextureStageS
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG2
,
&
colorarg2
);
IWineD3DDevice_GetTextureStageS
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
&
alphaop
);
IWineD3DDevice_GetTextureStageS
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
&
alphaarg1
);
IWineD3DDevice_GetTextureStageS
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG2
,
&
alphaarg2
);
wined3d_device_get_texture_stage_s
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLOROP
,
&
colorop
);
wined3d_device_get_texture_stage_s
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG1
,
&
colorarg1
);
wined3d_device_get_texture_stage_s
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG2
,
&
colorarg2
);
wined3d_device_get_texture_stage_s
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
&
alphaop
);
wined3d_device_get_texture_stage_s
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
&
alphaarg1
);
wined3d_device_get_texture_stage_s
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG2
,
&
alphaarg2
);
if
(
colorop
==
WINED3DTOP_SELECTARG1
&&
colorarg1
==
WINED3DTA_TEXTURE
&&
alphaop
==
WINED3DTOP_SELECTARG1
&&
alphaarg1
==
WINED3DTA_TEXTURE
)
...
...
@@ -2505,7 +2488,7 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface,
BOOL
tex_alpha
=
FALSE
;
DDPIXELFORMAT
ddfmt
;
hr
=
IWineD3DDevice_GetT
exture
(
This
->
wineD3DDevice
,
0
,
&
tex
);
hr
=
wined3d_device_get_t
exture
(
This
->
wineD3DDevice
,
0
,
&
tex
);
if
(
hr
==
WINED3D_OK
&&
tex
)
{
...
...
@@ -2621,9 +2604,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
break
;
}
hr
=
IWineD3DDevice_SetSamplerState
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_MAGFILTER
,
tex_mag
);
hr
=
wined3d_device_set_sampler_state
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_MAGFILTER
,
tex_mag
);
break
;
}
...
...
@@ -2666,28 +2647,24 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
break
;
}
IWineD3DDevice_SetSamplerS
tate
(
This
->
wineD3DDevice
,
wined3d_device_set_sampler_s
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_MIPFILTER
,
tex_mip
);
hr
=
IWineD3DDevice_SetSamplerState
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_MINFILTER
,
tex_min
);
hr
=
wined3d_device_set_sampler_state
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_MINFILTER
,
tex_min
);
break
;
}
case
D3DRENDERSTATE_TEXTUREADDRESS
:
IWineD3DDevice_SetSamplerState
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_ADDRESSV
,
Value
);
wined3d_device_set_sampler_state
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_ADDRESSV
,
Value
);
/* Drop through */
case
D3DRENDERSTATE_TEXTUREADDRESSU
:
hr
=
IWineD3DDevice_SetSamplerState
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_ADDRESSU
,
Value
);
hr
=
wined3d_device_set_sampler_state
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_ADDRESSU
,
Value
);
break
;
case
D3DRENDERSTATE_TEXTUREADDRESSV
:
hr
=
IWineD3DDevice_SetSamplerState
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_ADDRESSV
,
Value
);
hr
=
wined3d_device_set_sampler_state
(
This
->
wineD3DDevice
,
0
,
WINED3DSAMP_ADDRESSV
,
Value
);
break
;
case
D3DRENDERSTATE_BORDERCOLOR
:
...
...
@@ -2711,9 +2688,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
float
f
;
}
wined3d_value
;
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
;
}
...
...
@@ -2727,9 +2702,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
break
;
}
hr
=
IWineD3DDevice_SetRenderState
(
This
->
wineD3DDevice
,
RenderStateType
,
Value
);
hr
=
wined3d_device_set_render_state
(
This
->
wineD3DDevice
,
RenderStateType
,
Value
);
break
;
}
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
@@ -2798,9 +2771,7 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
if
(
Value
==
0
)
{
hr
=
IWineD3DDevice_SetTexture
(
This
->
wineD3DDevice
,
0
,
NULL
);
hr
=
wined3d_device_set_texture
(
This
->
wineD3DDevice
,
0
,
NULL
);
break
;
}
...
...
@@ -2828,7 +2799,7 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
BOOL
tex_alpha
=
FALSE
;
DDPIXELFORMAT
ddfmt
;
hr
=
IWineD3DDevice_GetT
exture
(
This
->
wineD3DDevice
,
0
,
&
tex
);
hr
=
wined3d_device_get_t
exture
(
This
->
wineD3DDevice
,
0
,
&
tex
);
if
(
hr
==
WINED3D_OK
&&
tex
)
{
...
...
@@ -2848,49 +2819,75 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
}
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
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG2
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
WINED3DTA_TEXTURE
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG2
,
WINED3DTA_CURRENT
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG1
,
WINED3DTA_TEXTURE
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG2
,
WINED3DTA_CURRENT
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLOROP
,
WINED3DTOP_MODULATE
);
wined3d_device_set_texture_stage_state
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG2
);
wined3d_device_set_texture_stage_state
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
WINED3DTA_TEXTURE
);
wined3d_device_set_texture_stage_state
(
This
->
wineD3DDevice
,
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
;
}
case
D3DTBLEND_ADD
:
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLOROP
,
WINED3DTOP_ADD
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG1
,
WINED3DTA_TEXTURE
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG2
,
WINED3DTA_CURRENT
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG2
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG2
,
WINED3DTA_CURRENT
);
wined3d_device_set_texture_stage_state
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLOROP
,
WINED3DTOP_ADD
);
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_ALPHAOP
,
WINED3DTOP_SELECTARG2
);
wined3d_device_set_texture_stage_state
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG2
,
WINED3DTA_CURRENT
);
break
;
case
D3DTBLEND_MODULATEALPHA
:
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG1
,
WINED3DTA_TEXTURE
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
WINED3DTA_TEXTURE
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG2
,
WINED3DTA_CURRENT
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG2
,
WINED3DTA_CURRENT
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLOROP
,
WINED3DTOP_MODULATE
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_MODULATE
);
wined3d_device_set_texture_stage_state
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG1
,
WINED3DTA_TEXTURE
);
wined3d_device_set_texture_stage_state
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
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_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
;
case
D3DTBLEND_COPY
:
case
D3DTBLEND_DECAL
:
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG1
,
WINED3DTA_TEXTURE
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
WINED3DTA_TEXTURE
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLOROP
,
WINED3DTOP_SELECTARG1
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG1
);
wined3d_device_set_texture_stage_state
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG1
,
WINED3DTA_TEXTURE
);
wined3d_device_set_texture_stage_state
(
This
->
wineD3DDevice
,
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
;
case
D3DTBLEND_DECALALPHA
:
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLOROP
,
WINED3DTOP_BLENDTEXTUREALPHA
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG1
,
WINED3DTA_TEXTURE
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG2
,
WINED3DTA_CURRENT
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG2
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG2
,
WINED3DTA_CURRENT
);
wined3d_device_set_texture_stage_state
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLOROP
,
WINED3DTOP_BLENDTEXTUREALPHA
);
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_ALPHAOP
,
WINED3DTOP_SELECTARG2
);
wined3d_device_set_texture_stage_state
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG2
,
WINED3DTA_CURRENT
);
break
;
default:
...
...
@@ -3171,14 +3168,12 @@ IDirect3DDeviceImpl_7_SetTransform(IDirect3DDevice7 *iface,
default:
type
=
TransformStateType
;
}
if
(
!
Matrix
)
return
DDERR_INVALIDPARAMS
;
if
(
!
Matrix
)
return
DDERR_INVALIDPARAMS
;
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_SetTransform
(
This
->
wineD3DDevice
,
type
,
(
WINED3DMATRIX
*
)
Matrix
);
hr
=
wined3d_device_set_transform
(
This
->
wineD3DDevice
,
type
,
(
WINED3DMATRIX
*
)
Matrix
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
...
...
@@ -3268,7 +3263,7 @@ IDirect3DDeviceImpl_7_GetTransform(IDirect3DDevice7 *iface,
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_GetTransform
(
This
->
wineD3DDevice
,
type
,
(
WINED3DMATRIX
*
)
Matrix
);
hr
=
wined3d_device_get_transform
(
This
->
wineD3DDevice
,
type
,
(
WINED3DMATRIX
*
)
Matrix
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
...
...
@@ -3450,7 +3445,7 @@ IDirect3DDeviceImpl_7_DrawPrimitive(IDirect3DDevice7 *iface,
/* Set the FVF */
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_SetVertexD
eclaration
(
This
->
wineD3DDevice
,
ddraw_find_decl
(
This
->
ddraw
,
VertexType
));
hr
=
wined3d_device_set_vertex_d
eclaration
(
This
->
wineD3DDevice
,
ddraw_find_decl
(
This
->
ddraw
,
VertexType
));
if
(
hr
!=
D3D_OK
)
{
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
@@ -3569,7 +3564,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitive(IDirect3DDevice7 *iface,
/* Set the D3DDevice's FVF */
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_SetVertexD
eclaration
(
This
->
wineD3DDevice
,
ddraw_find_decl
(
This
->
ddraw
,
VertexType
));
hr
=
wined3d_device_set_vertex_d
eclaration
(
This
->
wineD3DDevice
,
ddraw_find_decl
(
This
->
ddraw
,
VertexType
));
if
(
FAILED
(
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
);
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_SetVertexDeclaration
(
This
->
wineD3DDevice
,
vb
->
wineD3DVertexDeclaration
);
if
(
FAILED
(
hr
))
hr
=
wined3d_device_set_vertex_declaration
(
This
->
wineD3DDevice
,
vb
->
wineD3DVertexDeclaration
);
if
(
FAILED
(
hr
))
{
ERR
(
" (%p) Setting the FVF failed, hr = %x!
\n
"
,
This
,
hr
);
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
@@ -4075,11 +4069,7 @@ IDirect3DDeviceImpl_7_DrawPrimitiveVB(IDirect3DDevice7 *iface,
}
/* Set the vertex stream source */
hr
=
IWineD3DDevice_SetStreamSource
(
This
->
wineD3DDevice
,
0
/* StreamNumber */
,
vb
->
wineD3DVertexBuffer
,
0
/* StartVertex - we pass this to DrawPrimitive */
,
stride
);
hr
=
wined3d_device_set_stream_source
(
This
->
wineD3DDevice
,
0
,
vb
->
wineD3DVertexBuffer
,
0
,
stride
);
if
(
hr
!=
D3D_OK
)
{
ERR
(
"(%p) IDirect3DDevice::SetStreamSource failed with hr = %08x
\n
"
,
This
,
hr
);
...
...
@@ -4184,9 +4174,8 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_SetVertexDeclaration
(
This
->
wineD3DDevice
,
vb
->
wineD3DVertexDeclaration
);
if
(
FAILED
(
hr
))
hr
=
wined3d_device_set_vertex_declaration
(
This
->
wineD3DDevice
,
vb
->
wineD3DVertexDeclaration
);
if
(
FAILED
(
hr
))
{
ERR
(
" (%p) Setting the FVF failed, hr = %x!
\n
"
,
This
,
hr
);
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
@@ -4233,17 +4222,12 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
wined3d_buffer_unmap
(
This
->
indexbuffer
);
/* Set the index stream */
IWineD3DDevice_SetBaseVertexIndex
(
This
->
wineD3DDevice
,
StartVertex
);
hr
=
IWineD3DDevice_SetIndexBuffer
(
This
->
wineD3DDevice
,
This
->
indexbuffer
,
WINED3DFMT_R16_UINT
);
wined3d_device_set_base_vertex_index
(
This
->
wineD3DDevice
,
StartVertex
);
hr
=
wined3d_device_set_index_buffer
(
This
->
wineD3DDevice
,
This
->
indexbuffer
,
WINED3DFMT_R16_UINT
);
/* Set the vertex stream source */
hr
=
IWineD3DDevice_SetStreamSource
(
This
->
wineD3DDevice
,
0
/* StreamNumber */
,
vb
->
wineD3DVertexBuffer
,
0
/* offset, we pass this to DrawIndexedPrimitive */
,
stride
);
if
(
hr
!=
D3D_OK
)
hr
=
wined3d_device_set_stream_source
(
This
->
wineD3DDevice
,
0
,
vb
->
wineD3DVertexBuffer
,
0
,
stride
);
if
(
FAILED
(
hr
))
{
ERR
(
"(%p) IDirect3DDevice::SetStreamSource failed with hr = %08x
\n
"
,
This
,
hr
);
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
@@ -4462,7 +4446,7 @@ IDirect3DDeviceImpl_7_GetTexture(IDirect3DDevice7 *iface,
}
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_GetT
exture
(
This
->
wineD3DDevice
,
Stage
,
&
wined3d_texture
);
hr
=
wined3d_device_get_t
exture
(
This
->
wineD3DDevice
,
Stage
,
&
wined3d_texture
);
if
(
FAILED
(
hr
)
||
!
wined3d_texture
)
{
*
Texture
=
NULL
;
...
...
@@ -4545,7 +4529,7 @@ IDirect3DDeviceImpl_7_SetTexture(IDirect3DDevice7 *iface,
/* Texture may be NULL here */
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_SetT
exture
(
This
->
wineD3DDevice
,
hr
=
wined3d_device_set_t
exture
(
This
->
wineD3DDevice
,
Stage
,
surf
?
surf
->
wined3d_texture
:
NULL
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
...
...
@@ -4602,9 +4586,8 @@ IDirect3DDeviceImpl_3_SetTexture(IDirect3DDevice3 *iface,
DDPIXELFORMAT
ddfmt
;
HRESULT
result
;
result
=
IWineD3DDevice_GetTexture
(
This
->
wineD3DDevice
,
0
,
&
tex
);
if
(
result
==
WINED3D_OK
&&
tex
)
result
=
wined3d_device_get_texture
(
This
->
wineD3DDevice
,
0
,
&
tex
);
if
(
result
==
WINED3D_OK
&&
tex
)
{
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 */
if
(
tex_alpha
)
IWineD3DDevice_SetTextureStageS
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG1
);
wined3d_device_set_texture_stage_s
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG1
);
else
IWineD3DDevice_SetTextureStageS
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG2
);
wined3d_device_set_texture_stage_s
tate
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG2
);
}
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
@@ -4713,7 +4696,7 @@ IDirect3DDeviceImpl_7_GetTextureStageState(IDirect3DDevice7 *iface,
if
(
l
->
sampler_state
)
{
hr
=
IWineD3DDevice_GetSamplerS
tate
(
This
->
wineD3DDevice
,
Stage
,
l
->
state
,
State
);
hr
=
wined3d_device_get_sampler_s
tate
(
This
->
wineD3DDevice
,
Stage
,
l
->
state
,
State
);
switch
(
TexStageStateType
)
{
...
...
@@ -4757,7 +4740,7 @@ IDirect3DDeviceImpl_7_GetTextureStageState(IDirect3DDevice7 *iface,
}
else
{
hr
=
IWineD3DDevice_GetTextureStageS
tate
(
This
->
wineD3DDevice
,
Stage
,
l
->
state
,
State
);
hr
=
wined3d_device_get_texture_stage_s
tate
(
This
->
wineD3DDevice
,
Stage
,
l
->
state
,
State
);
}
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
@@ -4880,18 +4863,18 @@ IDirect3DDeviceImpl_7_SetTextureStageState(IDirect3DDevice7 *iface,
}
case
D3DTSS_ADDRESS
:
IWineD3DDevice_SetSamplerS
tate
(
This
->
wineD3DDevice
,
Stage
,
WINED3DSAMP_ADDRESSV
,
State
);
wined3d_device_set_sampler_s
tate
(
This
->
wineD3DDevice
,
Stage
,
WINED3DSAMP_ADDRESSV
,
State
);
break
;
default:
break
;
}
hr
=
IWineD3DDevice_SetSamplerS
tate
(
This
->
wineD3DDevice
,
Stage
,
l
->
state
,
State
);
hr
=
wined3d_device_set_sampler_s
tate
(
This
->
wineD3DDevice
,
Stage
,
l
->
state
,
State
);
}
else
{
hr
=
IWineD3DDevice_SetTextureStageS
tate
(
This
->
wineD3DDevice
,
Stage
,
l
->
state
,
State
);
hr
=
wined3d_device_set_texture_stage_s
tate
(
This
->
wineD3DDevice
,
Stage
,
l
->
state
,
State
);
}
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
@@ -5098,8 +5081,7 @@ IDirect3DDeviceImpl_7_SetViewport(IDirect3DDevice7 *iface,
/* Note: D3DVIEWPORT7 is compatible with WINED3DVIEWPORT */
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_SetViewport
(
This
->
wineD3DDevice
,
(
WINED3DVIEWPORT
*
)
Data
);
hr
=
wined3d_device_set_viewport
(
This
->
wineD3DDevice
,
(
WINED3DVIEWPORT
*
)
Data
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
...
...
@@ -5155,8 +5137,7 @@ IDirect3DDeviceImpl_7_GetViewport(IDirect3DDevice7 *iface,
/* Note: D3DVIEWPORT7 is compatible with WINED3DVIEWPORT */
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_GetViewport
(
This
->
wineD3DDevice
,
(
WINED3DVIEWPORT
*
)
Data
);
hr
=
wined3d_device_get_viewport
(
This
->
wineD3DDevice
,
(
WINED3DVIEWPORT
*
)
Data
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr_ddraw_from_wined3d
(
hr
);
...
...
@@ -5211,8 +5192,7 @@ IDirect3DDeviceImpl_7_SetMaterial(IDirect3DDevice7 *iface,
if
(
!
Mat
)
return
DDERR_INVALIDPARAMS
;
/* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_SetMaterial
(
This
->
wineD3DDevice
,
(
WINED3DMATERIAL
*
)
Mat
);
hr
=
wined3d_device_set_material
(
This
->
wineD3DDevice
,
(
WINED3DMATERIAL
*
)
Mat
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr_ddraw_from_wined3d
(
hr
);
}
...
...
@@ -5265,8 +5245,7 @@ IDirect3DDeviceImpl_7_GetMaterial(IDirect3DDevice7 *iface,
EnterCriticalSection
(
&
ddraw_cs
);
/* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */
hr
=
IWineD3DDevice_GetMaterial
(
This
->
wineD3DDevice
,
(
WINED3DMATERIAL
*
)
Mat
);
hr
=
wined3d_device_get_material
(
This
->
wineD3DDevice
,
(
WINED3DMATERIAL
*
)
Mat
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr_ddraw_from_wined3d
(
hr
);
}
...
...
@@ -5320,9 +5299,7 @@ IDirect3DDeviceImpl_7_SetLight(IDirect3DDevice7 *iface,
EnterCriticalSection
(
&
ddraw_cs
);
/* Note: D3DLIGHT7 is compatible with WINED3DLIGHT */
hr
=
IWineD3DDevice_SetLight
(
This
->
wineD3DDevice
,
LightIndex
,
(
WINED3DLIGHT
*
)
Light
);
hr
=
wined3d_device_set_light
(
This
->
wineD3DDevice
,
LightIndex
,
(
WINED3DLIGHT
*
)
Light
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr_ddraw_from_wined3d
(
hr
);
}
...
...
@@ -5376,9 +5353,7 @@ IDirect3DDeviceImpl_7_GetLight(IDirect3DDevice7 *iface,
EnterCriticalSection
(
&
ddraw_cs
);
/* Note: D3DLIGHT7 is compatible with WINED3DLIGHT */
rc
=
IWineD3DDevice_GetLight
(
This
->
wineD3DDevice
,
LightIndex
,
(
WINED3DLIGHT
*
)
Light
);
rc
=
wined3d_device_get_light
(
This
->
wineD3DDevice
,
LightIndex
,
(
WINED3DLIGHT
*
)
Light
);
/* Translate the result. WineD3D returns other values than D3D7 */
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
@@ -6273,7 +6248,7 @@ IDirect3DDeviceImpl_7_LightEnable(IDirect3DDevice7 *iface,
TRACE
(
"iface %p, light_idx %u, enabled %#x.
\n
"
,
iface
,
LightIndex
,
Enable
);
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_SetLightE
nable
(
This
->
wineD3DDevice
,
LightIndex
,
Enable
);
hr
=
wined3d_device_set_light_e
nable
(
This
->
wineD3DDevice
,
LightIndex
,
Enable
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr_ddraw_from_wined3d
(
hr
);
}
...
...
@@ -6332,7 +6307,7 @@ IDirect3DDeviceImpl_7_GetLightEnable(IDirect3DDevice7 *iface,
return
DDERR_INVALIDPARAMS
;
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_GetLightE
nable
(
This
->
wineD3DDevice
,
LightIndex
,
Enable
);
hr
=
wined3d_device_get_light_e
nable
(
This
->
wineD3DDevice
,
LightIndex
,
Enable
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr_ddraw_from_wined3d
(
hr
);
}
...
...
@@ -6391,7 +6366,7 @@ IDirect3DDeviceImpl_7_SetClipPlane(IDirect3DDevice7 *iface,
return
DDERR_INVALIDPARAMS
;
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_SetClipP
lane
(
This
->
wineD3DDevice
,
Index
,
PlaneEquation
);
hr
=
wined3d_device_set_clip_p
lane
(
This
->
wineD3DDevice
,
Index
,
PlaneEquation
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
...
...
@@ -6448,7 +6423,7 @@ IDirect3DDeviceImpl_7_GetClipPlane(IDirect3DDevice7 *iface,
return
DDERR_INVALIDPARAMS
;
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_GetClipP
lane
(
This
->
wineD3DDevice
,
Index
,
PlaneEquation
);
hr
=
wined3d_device_get_clip_p
lane
(
This
->
wineD3DDevice
,
Index
,
PlaneEquation
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
...
...
@@ -6772,14 +6747,13 @@ IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This)
if
(
!
depthStencil
)
{
TRACE
(
"Setting wined3d depth stencil to NULL
\n
"
);
IWineD3DDevice_SetDepthStencilSurface
(
This
->
wineD3DDevice
,
NULL
);
wined3d_device_set_depth_stencil
(
This
->
wineD3DDevice
,
NULL
);
return
WINED3DZB_FALSE
;
}
dsi
=
(
IDirectDrawSurfaceImpl
*
)
depthStencil
;
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
);
return
WINED3DZB_TRUE
;
...
...
@@ -6826,7 +6800,7 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi
IWineD3DDevice_AddRef
(
ddraw
->
wineD3DDevice
);
/* Render to the back buffer */
hr
=
IWineD3DDevice_SetRenderT
arget
(
ddraw
->
wineD3DDevice
,
0
,
target
->
wined3d_surface
,
TRUE
);
hr
=
wined3d_device_set_render_t
arget
(
ddraw
->
wineD3DDevice
,
0
,
target
->
wined3d_surface
,
TRUE
);
if
(
FAILED
(
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
;
IWineD3DDevice_SetRenderS
tate
(
ddraw
->
wineD3DDevice
,
WINED3DRS_ZENABLE
,
wined3d_device_set_render_s
tate
(
ddraw
->
wineD3DDevice
,
WINED3DRS_ZENABLE
,
IDirect3DDeviceImpl_UpdateDepthStencil
(
device
));
return
D3D_OK
;
...
...
dlls/ddraw/executebuffer.c
View file @
979e3744
...
...
@@ -155,11 +155,8 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
}
/* IDirect3DDevices have color keying always enabled -
* enable it before drawing. This overwrites any ALPHA*
* render state
*/
IWineD3DDevice_SetRenderState
(
lpDevice
->
wineD3DDevice
,
WINED3DRS_COLORKEYENABLE
,
1
);
* render state. */
wined3d_device_set_render_state
(
lpDevice
->
wineD3DDevice
,
WINED3DRS_COLORKEYENABLE
,
1
);
IDirect3DDevice7_DrawIndexedPrimitive
((
IDirect3DDevice7
*
)
lpDevice
,
D3DPT_TRIANGLELIST
,
D3DFVF_TLVERTEX
,
tl_vx
,
0
,
This
->
indices
,
count
*
3
,
0
);
}
break
;
...
...
@@ -318,18 +315,12 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
/* Get the transform and world matrix */
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
IWineD3DDevice_GetTransform
(
lpDevice
->
wineD3DDevice
,
D3DTRANSFORMSTATE_VIEW
,
(
WINED3DMATRIX
*
)
&
view_mat
);
IWineD3DDevice_GetTransform
(
lpDevice
->
wineD3DDevice
,
D3DTRANSFORMSTATE_PROJECTION
,
(
WINED3DMATRIX
*
)
&
proj_mat
);
IWineD3DDevice_GetTransform
(
lpDevice
->
wineD3DDevice
,
WINED3DTS_WORLDMATRIX
(
0
),
(
WINED3DMATRIX
*
)
&
world_mat
);
wined3d_device_get_transform
(
lpDevice
->
wineD3DDevice
,
D3DTRANSFORMSTATE_VIEW
,
(
WINED3DMATRIX
*
)
&
view_mat
);
wined3d_device_get_transform
(
lpDevice
->
wineD3DDevice
,
D3DTRANSFORMSTATE_PROJECTION
,
(
WINED3DMATRIX
*
)
&
proj_mat
);
wined3d_device_get_transform
(
lpDevice
->
wineD3DDevice
,
WINED3DTS_WORLDMATRIX
(
0
),
(
WINED3DMATRIX
*
)
&
world_mat
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
LPD3DPROCESSVERTICES
ci
=
(
LPD3DPROCESSVERTICES
)
instr
;
...
...
dlls/ddraw/surface.c
View file @
979e3744
...
...
@@ -2923,7 +2923,7 @@ static HRESULT WINAPI ddraw_gamma_control_GetGammaRamp(IDirectDrawGammaControl *
if
(
surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
{
/* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP. */
IWineD3DDevice_GetGammaR
amp
(
surface
->
ddraw
->
wineD3DDevice
,
0
,
(
WINED3DGAMMARAMP
*
)
gamma_ramp
);
wined3d_device_get_gamma_r
amp
(
surface
->
ddraw
->
wineD3DDevice
,
0
,
(
WINED3DGAMMARAMP
*
)
gamma_ramp
);
}
else
{
...
...
@@ -2965,7 +2965,7 @@ static HRESULT WINAPI ddraw_gamma_control_SetGammaRamp(IDirectDrawGammaControl *
if
(
surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
{
/* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP */
IWineD3DDevice_SetGammaR
amp
(
surface
->
ddraw
->
wineD3DDevice
,
0
,
flags
,
(
WINED3DGAMMARAMP
*
)
gamma_ramp
);
wined3d_device_set_gamma_r
amp
(
surface
->
ddraw
->
wineD3DDevice
,
0
,
flags
,
(
WINED3DGAMMARAMP
*
)
gamma_ramp
);
}
else
{
...
...
dlls/ddraw/vertexbuffer.c
View file @
979e3744
...
...
@@ -141,23 +141,14 @@ IDirect3DVertexBufferImpl_Release(IDirect3DVertexBuffer7 *iface)
UINT
offset
,
stride
;
EnterCriticalSection
(
&
ddraw_cs
);
/* D3D7 Vertex buffers don't stay bound in the device, they are passed as a parameter
* to drawPrimitiveVB. DrawPrimitiveVB sets them as the stream source in wined3d,
* and they should get unset there before they are destroyed
*/
IWineD3DDevice_GetStreamSource
(
This
->
ddraw
->
wineD3DDevice
,
0
/* Stream number */
,
&
curVB
,
&
offset
,
&
stride
);
if
(
curVB
==
This
->
wineD3DVertexBuffer
)
{
IWineD3DDevice_SetStreamSource
(
This
->
ddraw
->
wineD3DDevice
,
0
/* Steam number */
,
NULL
/* stream data */
,
0
/* Offset */
,
0
/* stride */
);
}
/* D3D7 Vertex buffers don't stay bound in the device, they are passed
* as a parameter to drawPrimitiveVB. DrawPrimitiveVB sets them as the
* stream source in wined3d, and they should get unset there before
* they are destroyed. */
wined3d_device_get_stream_source
(
This
->
ddraw
->
wineD3DDevice
,
0
,
&
curVB
,
&
offset
,
&
stride
);
if
(
curVB
==
This
->
wineD3DVertexBuffer
)
wined3d_device_set_stream_source
(
This
->
ddraw
->
wineD3DDevice
,
0
,
NULL
,
0
,
0
);
if
(
curVB
)
wined3d_buffer_decref
(
curVB
);
/* For the GetStreamSource */
...
...
@@ -335,23 +326,13 @@ IDirect3DVertexBufferImpl_ProcessVertices(IDirect3DVertexBuffer7 *iface,
* the vertex ops
*/
doClip
=
VertexOp
&
D3DVOP_CLIP
?
TRUE
:
FALSE
;
IWineD3DDevice_GetRenderState
(
D3D
->
wineD3DDevice
,
WINED3DRS_CLIPPING
,
(
DWORD
*
)
&
oldClip
);
if
(
doClip
!=
oldClip
)
{
IWineD3DDevice_SetRenderState
(
D3D
->
wineD3DDevice
,
WINED3DRS_CLIPPING
,
doClip
);
}
wined3d_device_get_render_state
(
D3D
->
wineD3DDevice
,
WINED3DRS_CLIPPING
,
(
DWORD
*
)
&
oldClip
);
if
(
doClip
!=
oldClip
)
wined3d_device_set_render_state
(
D3D
->
wineD3DDevice
,
WINED3DRS_CLIPPING
,
doClip
);
IWineD3DDevice_SetStreamSource
(
D3D
->
wineD3DDevice
,
0
,
/* Stream No */
Src
->
wineD3DVertexBuffer
,
0
,
/* Offset */
get_flexible_vertex_size
(
Src
->
fvf
));
IWineD3DDevice_SetVertexDeclaration
(
D3D
->
wineD3DDevice
,
Src
->
wineD3DVertexDeclaration
);
wined3d_device_set_stream_source
(
D3D
->
wineD3DDevice
,
0
,
Src
->
wineD3DVertexBuffer
,
0
,
get_flexible_vertex_size
(
Src
->
fvf
));
wined3d_device_set_vertex_declaration
(
D3D
->
wineD3DDevice
,
Src
->
wineD3DVertexDeclaration
);
hr
=
IWineD3DDevice_ProcessVertices
(
D3D
->
wineD3DDevice
,
SrcIndex
,
DestIndex
,
...
...
@@ -362,10 +343,8 @@ IDirect3DVertexBufferImpl_ProcessVertices(IDirect3DVertexBuffer7 *iface,
This
->
fvf
);
/* Restore the states if needed */
if
(
doClip
!=
oldClip
)
IWineD3DDevice_SetRenderState
(
D3D
->
wineD3DDevice
,
WINED3DRS_CLIPPING
,
oldClip
);
if
(
doClip
!=
oldClip
)
wined3d_device_set_render_state
(
D3D
->
wineD3DDevice
,
WINED3DRS_CLIPPING
,
oldClip
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
...
...
dlls/ddraw/viewport.c
View file @
979e3744
...
...
@@ -387,17 +387,12 @@ IDirect3DViewportImpl_TransformVertices(IDirect3DViewport3 *iface,
EnterCriticalSection
(
&
ddraw_cs
);
IWineD3DDevice_GetTransform
(
This
->
active_device
->
wineD3DDevice
,
D3DTRANSFORMSTATE_VIEW
,
(
WINED3DMATRIX
*
)
&
view_mat
);
IWineD3DDevice_GetTransform
(
This
->
active_device
->
wineD3DDevice
,
D3DTRANSFORMSTATE_PROJECTION
,
(
WINED3DMATRIX
*
)
&
proj_mat
);
IWineD3DDevice_GetTransform
(
This
->
active_device
->
wineD3DDevice
,
WINED3DTS_WORLDMATRIX
(
0
),
(
WINED3DMATRIX
*
)
&
world_mat
);
wined3d_device_get_transform
(
This
->
active_device
->
wineD3DDevice
,
D3DTRANSFORMSTATE_VIEW
,
(
WINED3DMATRIX
*
)
&
view_mat
);
wined3d_device_get_transform
(
This
->
active_device
->
wineD3DDevice
,
D3DTRANSFORMSTATE_PROJECTION
,
(
WINED3DMATRIX
*
)
&
proj_mat
);
wined3d_device_get_transform
(
This
->
active_device
->
wineD3DDevice
,
WINED3DTS_WORLDMATRIX
(
0
),
(
WINED3DMATRIX
*
)
&
world_mat
);
multiply_matrix
(
&
mat
,
&
view_mat
,
&
world_mat
);
multiply_matrix
(
&
mat
,
&
proj_mat
,
&
mat
);
...
...
dlls/wined3d/device.c
View file @
979e3744
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dlls/wined3d/stateblock.c
View file @
979e3744
...
...
@@ -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
);
IWineD3DDevice_SetL
ight
(
device
,
light
->
OriginalIndex
,
&
light
->
OriginalParms
);
IWineD3DDevice_SetLightE
nable
(
device
,
light
->
OriginalIndex
,
light
->
glIndex
!=
-
1
);
wined3d_device_set_l
ight
(
device
,
light
->
OriginalIndex
,
&
light
->
OriginalParms
);
wined3d_device_set_light_e
nable
(
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
);
if
(
stateblock
->
changed
.
vertexShader
)
IWineD3DDevice_SetVertexS
hader
(
device
,
stateblock
->
state
.
vertex_shader
);
wined3d_device_set_vertex_s
hader
(
device
,
stateblock
->
state
.
vertex_shader
);
/* Vertex Shader Constants. */
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
);
}
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
);
}
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
);
}
apply_lights
(
device
,
&
stateblock
->
state
);
if
(
stateblock
->
changed
.
pixelShader
)
IWineD3DDevice_SetPixelS
hader
(
device
,
stateblock
->
state
.
pixel_shader
);
wined3d_device_set_pixel_s
hader
(
device
,
stateblock
->
state
.
pixel_shader
);
/* Pixel Shader Constants. */
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
);
}
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
);
}
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
);
}
/* Render states. */
for
(
i
=
0
;
i
<
stateblock
->
num_contained_render_states
;
++
i
)
{
IWineD3DDevice_SetRenderS
tate
(
device
,
stateblock
->
contained_render_states
[
i
],
wined3d_device_set_render_s
tate
(
device
,
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
state
=
stateblock
->
contained_tss_states
[
i
].
state
;
IWineD3DDevice_SetTextureStageS
tate
(
device
,
stage
,
state
,
stateblock
->
state
.
texture_states
[
stage
][
state
]);
wined3d_device_set_texture_stage_s
tate
(
device
,
stage
,
state
,
stateblock
->
state
.
texture_states
[
stage
][
state
]);
}
/* Sampler states. */
...
...
@@ -978,13 +978,13 @@ HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblo
DWORD
value
=
stateblock
->
state
.
sampler_states
[
stage
][
state
];
if
(
stage
>=
MAX_FRAGMENT_SAMPLERS
)
stage
+=
WINED3DVERTEXTEXTURESAMPLER0
-
MAX_FRAGMENT_SAMPLERS
;
IWineD3DDevice_SetSamplerS
tate
(
device
,
stage
,
state
,
value
);
wined3d_device_set_sampler_s
tate
(
device
,
stage
,
state
,
value
);
}
/* Transform states. */
for
(
i
=
0
;
i
<
stateblock
->
num_contained_transform_states
;
++
i
)
{
IWineD3DDevice_SetT
ransform
(
device
,
stateblock
->
contained_transform_states
[
i
],
wined3d_device_set_t
ransform
(
device
,
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
)
{
IWineD3DDevice_SetIndexB
uffer
(
device
,
stateblock
->
state
.
index_buffer
,
stateblock
->
state
.
index_format
);
IWineD3DDevice_SetBaseVertexI
ndex
(
device
,
stateblock
->
state
.
base_vertex_index
);
wined3d_device_set_index_b
uffer
(
device
,
stateblock
->
state
.
index_buffer
,
stateblock
->
state
.
index_format
);
wined3d_device_set_base_vertex_i
ndex
(
device
,
stateblock
->
state
.
base_vertex_index
);
}
if
(
stateblock
->
changed
.
vertexDecl
&&
stateblock
->
state
.
vertex_declaration
)
{
IWineD3DDevice_SetVertexDeclaration
(
device
,
stateblock
->
state
.
vertex_declaration
);
}
wined3d_device_set_vertex_declaration
(
device
,
stateblock
->
state
.
vertex_declaration
);
if
(
stateblock
->
changed
.
material
)
{
IWineD3DDevice_SetMaterial
(
device
,
&
stateblock
->
state
.
material
);
}
wined3d_device_set_material
(
device
,
&
stateblock
->
state
.
material
);
if
(
stateblock
->
changed
.
viewport
)
{
IWineD3DDevice_SetViewport
(
device
,
&
stateblock
->
state
.
viewport
);
}
wined3d_device_set_viewport
(
device
,
&
stateblock
->
state
.
viewport
);
if
(
stateblock
->
changed
.
scissorRect
)
{
IWineD3DDevice_SetScissorRect
(
device
,
&
stateblock
->
state
.
scissor_rect
);
}
wined3d_device_set_scissor_rect
(
device
,
&
stateblock
->
state
.
scissor_rect
);
map
=
stateblock
->
changed
.
streamSource
;
for
(
i
=
0
;
map
;
map
>>=
1
,
++
i
)
{
if
(
map
&
1
)
IWineD3DDevice_SetStreamS
ource
(
device
,
i
,
wined3d_device_set_stream_s
ource
(
device
,
i
,
stateblock
->
state
.
streams
[
i
].
buffer
,
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
)
{
if
(
map
&
1
)
IWineD3DDevice_SetStreamSourceF
req
(
device
,
i
,
wined3d_device_set_stream_source_f
req
(
device
,
i
,
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
;
stage
=
i
<
MAX_FRAGMENT_SAMPLERS
?
i
:
WINED3DVERTEXTEXTURESAMPLER0
+
i
-
MAX_FRAGMENT_SAMPLERS
;
IWineD3DDevice_SetT
exture
(
device
,
stage
,
stateblock
->
state
.
textures
[
i
]);
wined3d_device_set_t
exture
(
device
,
stage
,
stateblock
->
state
.
textures
[
i
]);
}
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
[
2
]
=
(
float
)
stateblock
->
state
.
clip_planes
[
i
][
2
];
clip
[
3
]
=
(
float
)
stateblock
->
state
.
clip_planes
[
i
][
3
];
IWineD3DDevice_SetClipP
lane
(
device
,
i
,
clip
);
wined3d_device_set_clip_p
lane
(
device
,
i
,
clip
);
}
stateblock
->
device
->
stateBlock
->
state
.
lowest_disabled_stage
=
MAX_TEXTURES
-
1
;
...
...
dlls/wined3d/wined3d.spec
View file @
979e3744
...
...
@@ -45,6 +45,70 @@
@ cdecl wined3d_clipper_set_window(ptr long 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_decref(ptr)
...
...
include/wine/wined3d.idl
View file @
979e3744
...
...
@@ -2238,255 +2238,6 @@ interface IWineD3DDevice : IUnknown
BOOL
ShowCursor
(
[
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
(
[
in
]
WINED3DTRANSFORMSTATETYPE
state
,
[
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
,
WINED3DDEVTYPE
device_type
,
HWND
focus_window
,
DWORD
behaviour_flags
,
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
,
const
PALETTEENTRY
*
entries
,
void
*
parent
,
struct
wined3d_palette
**
palette
)
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment