Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
f79bbc76
Commit
f79bbc76
authored
Sep 12, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: wined3d_device_set_transform() never fails.
parent
b6b9c156
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
31 deletions
+21
-31
device.c
dlls/d3d8/device.c
+2
-3
device.c
dlls/d3d9/device.c
+2
-3
device.c
dlls/ddraw/device.c
+8
-13
viewport.c
dlls/ddraw/viewport.c
+2
-4
device.c
dlls/wined3d/device.c
+6
-7
wined3d.h
include/wine/wined3d.h
+1
-1
No files found.
dlls/d3d8/device.c
View file @
f79bbc76
...
...
@@ -1261,16 +1261,15 @@ static HRESULT WINAPI d3d8_device_SetTransform(IDirect3DDevice8 *iface,
D3DTRANSFORMSTATETYPE
state
,
const
D3DMATRIX
*
matrix
)
{
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
state
,
matrix
);
/* Note: D3DMATRIX is compatible with struct wined3d_matrix. */
wined3d_mutex_lock
();
hr
=
wined3d_device_set_transform
(
device
->
wined3d_device
,
state
,
(
const
struct
wined3d_matrix
*
)
matrix
);
wined3d_device_set_transform
(
device
->
wined3d_device
,
state
,
(
const
struct
wined3d_matrix
*
)
matrix
);
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d8_device_GetTransform
(
IDirect3DDevice8
*
iface
,
...
...
dlls/d3d9/device.c
View file @
f79bbc76
...
...
@@ -1327,16 +1327,15 @@ static HRESULT WINAPI d3d9_device_SetTransform(IDirect3DDevice9Ex *iface,
D3DTRANSFORMSTATETYPE
state
,
const
D3DMATRIX
*
matrix
)
{
struct
d3d9_device
*
device
=
impl_from_IDirect3DDevice9Ex
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
state
,
matrix
);
/* Note: D3DMATRIX is compatible with struct wined3d_matrix. */
wined3d_mutex_lock
();
hr
=
wined3d_device_set_transform
(
device
->
wined3d_device
,
state
,
(
const
struct
wined3d_matrix
*
)
matrix
);
wined3d_device_set_transform
(
device
->
wined3d_device
,
state
,
(
const
struct
wined3d_matrix
*
)
matrix
);
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d9_device_GetTransform
(
IDirect3DDevice9Ex
*
iface
,
...
...
dlls/ddraw/device.c
View file @
f79bbc76
...
...
@@ -3084,7 +3084,6 @@ static HRESULT d3d_device7_SetTransform(IDirect3DDevice7 *iface,
{
struct
d3d_device
*
device
=
impl_from_IDirect3DDevice7
(
iface
);
enum
wined3d_transform_state
wined3d_state
;
HRESULT
hr
;
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
state
,
matrix
);
...
...
@@ -3111,10 +3110,10 @@ static HRESULT d3d_device7_SetTransform(IDirect3DDevice7 *iface,
/* Note: D3DMATRIX is compatible with struct wined3d_matrix. */
wined3d_mutex_lock
();
hr
=
wined3d_device_set_transform
(
device
->
wined3d_device
,
wined3d_state
,
(
struct
wined3d_matrix
*
)
matrix
);
wined3d_device_set_transform
(
device
->
wined3d_device
,
wined3d_state
,
(
struct
wined3d_matrix
*
)
matrix
);
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d_device7_SetTransform_FPUSetup
(
IDirect3DDevice7
*
iface
,
...
...
@@ -3149,17 +3148,15 @@ static HRESULT WINAPI d3d_device3_SetTransform(IDirect3DDevice3 *iface,
if
(
state
==
D3DTRANSFORMSTATE_PROJECTION
)
{
D3DMATRIX
projection
;
HRESULT
hr
;
wined3d_mutex_lock
();
multiply_matrix
(
&
projection
,
&
device
->
legacy_clipspace
,
matrix
);
hr
=
wined3d_device_set_transform
(
device
->
wined3d_device
,
wined3d_device_set_transform
(
device
->
wined3d_device
,
WINED3D_TS_PROJECTION
,
(
struct
wined3d_matrix
*
)
&
projection
);
if
(
SUCCEEDED
(
hr
))
device
->
legacy_projection
=
*
matrix
;
device
->
legacy_projection
=
*
matrix
;
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
return
IDirect3DDevice7_SetTransform
(
&
device
->
IDirect3DDevice7_iface
,
state
,
matrix
);
...
...
@@ -3363,18 +3360,16 @@ static HRESULT WINAPI d3d_device3_MultiplyTransform(IDirect3DDevice3 *iface,
if
(
state
==
D3DTRANSFORMSTATE_PROJECTION
)
{
D3DMATRIX
projection
,
tmp
;
HRESULT
hr
;
wined3d_mutex_lock
();
multiply_matrix
(
&
tmp
,
&
device
->
legacy_projection
,
matrix
);
multiply_matrix
(
&
projection
,
&
device
->
legacy_clipspace
,
&
tmp
);
hr
=
wined3d_device_set_transform
(
device
->
wined3d_device
,
wined3d_device_set_transform
(
device
->
wined3d_device
,
WINED3D_TS_PROJECTION
,
(
struct
wined3d_matrix
*
)
&
projection
);
if
(
SUCCEEDED
(
hr
))
device
->
legacy_projection
=
tmp
;
device
->
legacy_projection
=
tmp
;
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
return
IDirect3DDevice7_MultiplyTransform
(
&
device
->
IDirect3DDevice7_iface
,
state
,
matrix
);
...
...
dlls/ddraw/viewport.c
View file @
f79bbc76
...
...
@@ -41,13 +41,11 @@ static void update_clip_space(struct d3d_device *device,
offset
->
x
,
offset
->
y
,
offset
->
z
,
1
.
0
f
,
};
D3DMATRIX
projection
;
HRESULT
hr
;
multiply_matrix
(
&
projection
,
&
clip_space
,
&
device
->
legacy_projection
);
hr
=
wined3d_device_set_transform
(
device
->
wined3d_device
,
wined3d_device_set_transform
(
device
->
wined3d_device
,
WINED3D_TS_PROJECTION
,
(
struct
wined3d_matrix
*
)
&
projection
);
if
(
SUCCEEDED
(
hr
))
device
->
legacy_clipspace
=
clip_space
;
device
->
legacy_clipspace
=
clip_space
;
}
/*****************************************************************************
...
...
dlls/wined3d/device.c
View file @
f79bbc76
...
...
@@ -1716,7 +1716,7 @@ HRESULT CDECL wined3d_device_get_stream_source_freq(const struct wined3d_device
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_device_set_transform
(
struct
wined3d_device
*
device
,
void
CDECL
wined3d_device_set_transform
(
struct
wined3d_device
*
device
,
enum
wined3d_transform_state
d3dts
,
const
struct
wined3d_matrix
*
matrix
)
{
TRACE
(
"device %p, state %s, matrix %p.
\n
"
,
...
...
@@ -1732,7 +1732,7 @@ HRESULT CDECL wined3d_device_set_transform(struct wined3d_device *device,
TRACE
(
"Recording... not performing anything.
\n
"
);
device
->
updateStateBlock
->
changed
.
transform
[
d3dts
>>
5
]
|=
1
<<
(
d3dts
&
0x1f
);
device
->
updateStateBlock
->
state
.
transforms
[
d3dts
]
=
*
matrix
;
return
WINED3D_OK
;
return
;
}
/* If the new matrix is the same as the current one,
...
...
@@ -1744,7 +1744,7 @@ HRESULT CDECL wined3d_device_set_transform(struct wined3d_device *device,
if
(
!
memcmp
(
&
device
->
stateBlock
->
state
.
transforms
[
d3dts
].
u
.
m
[
0
][
0
],
matrix
,
sizeof
(
*
matrix
)))
{
TRACE
(
"The application is setting the same matrix over again.
\n
"
);
return
WINED3D_OK
;
return
;
}
device
->
stateBlock
->
state
.
transforms
[
d3dts
]
=
*
matrix
;
...
...
@@ -1753,9 +1753,6 @@ HRESULT CDECL wined3d_device_set_transform(struct wined3d_device *device,
if
(
d3dts
<
WINED3D_TS_WORLD_MATRIX
(
device
->
adapter
->
gl_info
.
limits
.
blends
))
device_invalidate_state
(
device
,
STATE_TRANSFORM
(
d3dts
));
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_device_get_transform
(
const
struct
wined3d_device
*
device
,
...
...
@@ -1790,7 +1787,9 @@ HRESULT CDECL wined3d_device_multiply_transform(struct wined3d_device *device,
multiply_matrix
(
&
temp
,
mat
,
matrix
);
/* Apply change via set transform - will reapply to eg. lights this way. */
return
wined3d_device_set_transform
(
device
,
state
,
&
temp
);
wined3d_device_set_transform
(
device
,
state
,
&
temp
);
return
WINED3D_OK
;
}
/* Note lights are real special cases. Although the device caps state only
...
...
include/wine/wined3d.h
View file @
f79bbc76
...
...
@@ -2233,7 +2233,7 @@ HRESULT __cdecl wined3d_device_set_stream_source_freq(struct wined3d_device *dev
HRESULT
__cdecl
wined3d_device_set_texture
(
struct
wined3d_device
*
device
,
UINT
stage
,
struct
wined3d_texture
*
texture
);
HRESULT
__cdecl
wined3d_device_set_texture_stage_state
(
struct
wined3d_device
*
device
,
UINT
stage
,
enum
wined3d_texture_stage_state
state
,
DWORD
value
);
HRESULT
__cdecl
wined3d_device_set_transform
(
struct
wined3d_device
*
device
,
void
__cdecl
wined3d_device_set_transform
(
struct
wined3d_device
*
device
,
enum
wined3d_transform_state
state
,
const
struct
wined3d_matrix
*
matrix
);
HRESULT
__cdecl
wined3d_device_set_vertex_declaration
(
struct
wined3d_device
*
device
,
struct
wined3d_vertex_declaration
*
declaration
);
...
...
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