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
37a0f7ad
Commit
37a0f7ad
authored
Nov 17, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DMATRIX typedef.
parent
8e6f5c34
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
49 additions
and
43 deletions
+49
-43
device.c
dlls/d3d8/device.c
+6
-6
device.c
dlls/d3d9/device.c
+6
-6
device.c
dlls/ddraw/device.c
+12
-9
executebuffer.c
dlls/ddraw/executebuffer.c
+4
-4
viewport.c
dlls/ddraw/viewport.c
+3
-3
device.c
dlls/wined3d/device.c
+6
-6
utils.c
dlls/wined3d/utils.c
+4
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-2
wined3d.h
include/wine/wined3d.h
+5
-5
No files found.
dlls/d3d8/device.c
View file @
37a0f7ad
...
...
@@ -1231,9 +1231,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetTransform(IDirect3DDevice8 *iface,
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
State
,
lpMatrix
);
/* Note: D3DMATRIX is compatible with
WINED3DMATRIX
*/
/* Note: D3DMATRIX is compatible with
struct wined3d_matrix.
*/
wined3d_mutex_lock
();
hr
=
wined3d_device_set_transform
(
This
->
wined3d_device
,
State
,
(
const
WINED3DMATRIX
*
)
lpMatrix
);
hr
=
wined3d_device_set_transform
(
This
->
wined3d_device
,
State
,
(
const
struct
wined3d_matrix
*
)
lpMatrix
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1247,9 +1247,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTransform(IDirect3DDevice8 *iface,
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
State
,
pMatrix
);
/* Note: D3DMATRIX is compatible with
WINED3DMATRIX
*/
/* Note: D3DMATRIX is compatible with
struct wined3d_matrix.
*/
wined3d_mutex_lock
();
hr
=
wined3d_device_get_transform
(
This
->
wined3d_device
,
State
,
(
WINED3DMATRIX
*
)
pMatrix
);
hr
=
wined3d_device_get_transform
(
This
->
wined3d_device
,
State
,
(
struct
wined3d_matrix
*
)
pMatrix
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1263,9 +1263,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_MultiplyTransform(IDirect3DDevice8 *i
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
State
,
pMatrix
);
/* Note: D3DMATRIX is compatible with
WINED3DMATRIX
*/
/* Note: D3DMATRIX is compatible with
struct wined3d_matrix.
*/
wined3d_mutex_lock
();
hr
=
wined3d_device_multiply_transform
(
This
->
wined3d_device
,
State
,
(
const
WINED3DMATRIX
*
)
pMatrix
);
hr
=
wined3d_device_multiply_transform
(
This
->
wined3d_device
,
State
,
(
const
struct
wined3d_matrix
*
)
pMatrix
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d9/device.c
View file @
37a0f7ad
...
...
@@ -1249,9 +1249,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetTransform(IDirect3DDevice9Ex *ifac
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
State
,
lpMatrix
);
/* Note: D3DMATRIX is compatible with
WINED3DMATRIX
*/
/* Note: D3DMATRIX is compatible with
struct wined3d_matrix.
*/
wined3d_mutex_lock
();
hr
=
wined3d_device_set_transform
(
This
->
wined3d_device
,
State
,
(
const
WINED3DMATRIX
*
)
lpMatrix
);
hr
=
wined3d_device_set_transform
(
This
->
wined3d_device
,
State
,
(
const
struct
wined3d_matrix
*
)
lpMatrix
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1265,9 +1265,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTransform(IDirect3DDevice9Ex *ifac
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
State
,
pMatrix
);
/* Note: D3DMATRIX is compatible with
WINED3DMATRIX
*/
/* Note: D3DMATRIX is compatible with
struct wined3d_matrix.
*/
wined3d_mutex_lock
();
hr
=
wined3d_device_get_transform
(
This
->
wined3d_device
,
State
,
(
WINED3DMATRIX
*
)
pMatrix
);
hr
=
wined3d_device_get_transform
(
This
->
wined3d_device
,
State
,
(
struct
wined3d_matrix
*
)
pMatrix
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1281,9 +1281,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_MultiplyTransform(IDirect3DDevice9Ex
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
State
,
pMatrix
);
/* Note: D3DMATRIX is compatible with
WINED3DMATRIX
*/
/* Note: D3DMATRIX is compatible with
struct wined3d_matrix.
*/
wined3d_mutex_lock
();
hr
=
wined3d_device_multiply_transform
(
This
->
wined3d_device
,
State
,
(
const
WINED3DMATRIX
*
)
pMatrix
);
hr
=
wined3d_device_multiply_transform
(
This
->
wined3d_device
,
State
,
(
const
struct
wined3d_matrix
*
)
pMatrix
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/ddraw/device.c
View file @
37a0f7ad
...
...
@@ -1385,13 +1385,16 @@ IDirect3DDeviceImpl_1_SetMatrix(IDirect3DDevice *iface,
*
m
=
*
D3DMatrix
;
if
(
D3DMatHandle
==
This
->
world
)
wined3d_device_set_transform
(
This
->
wined3d_device
,
WINED3DTS_WORLDMATRIX
(
0
),
(
WINED3DMATRIX
*
)
D3DMatrix
);
wined3d_device_set_transform
(
This
->
wined3d_device
,
WINED3DTS_WORLDMATRIX
(
0
),
(
struct
wined3d_matrix
*
)
D3DMatrix
);
if
(
D3DMatHandle
==
This
->
view
)
wined3d_device_set_transform
(
This
->
wined3d_device
,
WINED3DTS_VIEW
,
(
WINED3DMATRIX
*
)
D3DMatrix
);
wined3d_device_set_transform
(
This
->
wined3d_device
,
WINED3DTS_VIEW
,
(
struct
wined3d_matrix
*
)
D3DMatrix
);
if
(
D3DMatHandle
==
This
->
proj
)
wined3d_device_set_transform
(
This
->
wined3d_device
,
WINED3DTS_PROJECTION
,
(
WINED3DMATRIX
*
)
D3DMatrix
);
wined3d_device_set_transform
(
This
->
wined3d_device
,
WINED3DTS_PROJECTION
,
(
struct
wined3d_matrix
*
)
D3DMatrix
);
wined3d_mutex_unlock
();
...
...
@@ -3198,9 +3201,9 @@ IDirect3DDeviceImpl_7_SetTransform(IDirect3DDevice7 *iface,
if
(
!
Matrix
)
return
DDERR_INVALIDPARAMS
;
/* Note: D3DMATRIX is compatible with
WINED3DMATRIX
*/
/* Note: D3DMATRIX is compatible with
struct wined3d_matrix.
*/
wined3d_mutex_lock
();
hr
=
wined3d_device_set_transform
(
This
->
wined3d_device
,
type
,
(
WINED3DMATRIX
*
)
Matrix
);
hr
=
wined3d_device_set_transform
(
This
->
wined3d_device
,
type
,
(
struct
wined3d_matrix
*
)
Matrix
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -3289,9 +3292,9 @@ IDirect3DDeviceImpl_7_GetTransform(IDirect3DDevice7 *iface,
if
(
!
Matrix
)
return
DDERR_INVALIDPARAMS
;
/* Note: D3DMATRIX is compatible with
WINED3DMATRIX
*/
/* Note: D3DMATRIX is compatible with
struct wined3d_matrix.
*/
wined3d_mutex_lock
();
hr
=
wined3d_device_get_transform
(
This
->
wined3d_device
,
type
,
(
WINED3DMATRIX
*
)
Matrix
);
hr
=
wined3d_device_get_transform
(
This
->
wined3d_device
,
type
,
(
struct
wined3d_matrix
*
)
Matrix
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -3378,10 +3381,10 @@ IDirect3DDeviceImpl_7_MultiplyTransform(IDirect3DDevice7 *iface,
default:
type
=
TransformStateType
;
}
/* Note: D3DMATRIX is compatible with
WINED3DMATRIX
*/
/* Note: D3DMATRIX is compatible with
struct wined3d_matrix.
*/
wined3d_mutex_lock
();
hr
=
wined3d_device_multiply_transform
(
This
->
wined3d_device
,
type
,
(
WINED3DMATRIX
*
)
D3DMatrix
);
type
,
(
struct
wined3d_matrix
*
)
D3DMatrix
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/ddraw/executebuffer.c
View file @
37a0f7ad
...
...
@@ -314,13 +314,13 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
TRACE
(
"PROCESSVERTICES (%d)
\n
"
,
count
);
/* Get the transform and world matrix */
/* Note: D3DMATRIX is compatible with
WINED3DMATRIX
*/
/* Note: D3DMATRIX is compatible with
struct wined3d_matrix.
*/
wined3d_device_get_transform
(
lpDevice
->
wined3d_device
,
D3DTRANSFORMSTATE_VIEW
,
(
WINED3DMATRIX
*
)
&
view_mat
);
D3DTRANSFORMSTATE_VIEW
,
(
struct
wined3d_matrix
*
)
&
view_mat
);
wined3d_device_get_transform
(
lpDevice
->
wined3d_device
,
D3DTRANSFORMSTATE_PROJECTION
,
(
WINED3DMATRIX
*
)
&
proj_mat
);
D3DTRANSFORMSTATE_PROJECTION
,
(
struct
wined3d_matrix
*
)
&
proj_mat
);
wined3d_device_get_transform
(
lpDevice
->
wined3d_device
,
WINED3DTS_WORLDMATRIX
(
0
),
(
WINED3DMATRIX
*
)
&
world_mat
);
WINED3DTS_WORLDMATRIX
(
0
),
(
struct
wined3d_matrix
*
)
&
world_mat
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
LPD3DPROCESSVERTICES
ci
=
(
LPD3DPROCESSVERTICES
)
instr
;
...
...
dlls/ddraw/viewport.c
View file @
37a0f7ad
...
...
@@ -397,11 +397,11 @@ IDirect3DViewportImpl_TransformVertices(IDirect3DViewport3 *iface,
wined3d_mutex_lock
();
wined3d_device_get_transform
(
This
->
active_device
->
wined3d_device
,
D3DTRANSFORMSTATE_VIEW
,
(
WINED3DMATRIX
*
)
&
view_mat
);
D3DTRANSFORMSTATE_VIEW
,
(
struct
wined3d_matrix
*
)
&
view_mat
);
wined3d_device_get_transform
(
This
->
active_device
->
wined3d_device
,
D3DTRANSFORMSTATE_PROJECTION
,
(
WINED3DMATRIX
*
)
&
proj_mat
);
D3DTRANSFORMSTATE_PROJECTION
,
(
struct
wined3d_matrix
*
)
&
proj_mat
);
wined3d_device_get_transform
(
This
->
active_device
->
wined3d_device
,
WINED3DTS_WORLDMATRIX
(
0
),
(
WINED3DMATRIX
*
)
&
world_mat
);
WINED3DTS_WORLDMATRIX
(
0
),
(
struct
wined3d_matrix
*
)
&
world_mat
);
multiply_matrix
(
&
mat
,
&
view_mat
,
&
world_mat
);
multiply_matrix
(
&
mat
,
&
proj_mat
,
&
mat
);
...
...
dlls/wined3d/device.c
View file @
37a0f7ad
...
...
@@ -1816,7 +1816,7 @@ HRESULT CDECL wined3d_device_get_stream_source_freq(const struct wined3d_device
}
HRESULT
CDECL
wined3d_device_set_transform
(
struct
wined3d_device
*
device
,
WINED3DTRANSFORMSTATETYPE
d3dts
,
const
WINED3DMATRIX
*
matrix
)
WINED3DTRANSFORMSTATETYPE
d3dts
,
const
struct
wined3d_matrix
*
matrix
)
{
TRACE
(
"device %p, state %s, matrix %p.
\n
"
,
device
,
debug_d3dtstype
(
d3dts
),
matrix
);
...
...
@@ -1861,7 +1861,7 @@ HRESULT CDECL wined3d_device_set_transform(struct wined3d_device *device,
}
HRESULT
CDECL
wined3d_device_get_transform
(
const
struct
wined3d_device
*
device
,
WINED3DTRANSFORMSTATETYPE
state
,
WINED3DMATRIX
*
matrix
)
WINED3DTRANSFORMSTATETYPE
state
,
struct
wined3d_matrix
*
matrix
)
{
TRACE
(
"device %p, state %s, matrix %p.
\n
"
,
device
,
debug_d3dtstype
(
state
),
matrix
);
...
...
@@ -1871,10 +1871,10 @@ HRESULT CDECL wined3d_device_get_transform(const struct wined3d_device *device,
}
HRESULT
CDECL
wined3d_device_multiply_transform
(
struct
wined3d_device
*
device
,
WINED3DTRANSFORMSTATETYPE
state
,
const
WINED3DMATRIX
*
matrix
)
WINED3DTRANSFORMSTATETYPE
state
,
const
struct
wined3d_matrix
*
matrix
)
{
const
WINED3DMATRIX
*
mat
=
NULL
;
WINED3DMATRIX
temp
;
const
struct
wined3d_matrix
*
mat
=
NULL
;
struct
wined3d_matrix
temp
;
TRACE
(
"device %p, state %s, matrix %p.
\n
"
,
device
,
debug_d3dtstype
(
state
),
matrix
);
...
...
@@ -3199,9 +3199,9 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
char
*
dest_ptr
,
*
dest_conv
=
NULL
,
*
dest_conv_addr
=
NULL
;
struct
wined3d_matrix
mat
,
proj_mat
,
view_mat
,
world_mat
;
unsigned
int
i
;
WINED3DVIEWPORT
vp
;
WINED3DMATRIX
mat
,
proj_mat
,
view_mat
,
world_mat
;
BOOL
doClip
;
DWORD
numTextures
;
...
...
dlls/wined3d/utils.c
View file @
37a0f7ad
...
...
@@ -2814,8 +2814,10 @@ enum wined3d_format_id pixelformat_for_depth(DWORD depth)
}
}
void
multiply_matrix
(
WINED3DMATRIX
*
dest
,
const
WINED3DMATRIX
*
src1
,
const
WINED3DMATRIX
*
src2
)
{
WINED3DMATRIX
temp
;
void
multiply_matrix
(
struct
wined3d_matrix
*
dest
,
const
struct
wined3d_matrix
*
src1
,
const
struct
wined3d_matrix
*
src2
)
{
struct
wined3d_matrix
temp
;
/* Now do the multiplication 'by hand'.
I know that all this could be optimised, but this will be done later :-) */
...
...
dlls/wined3d/wined3d_private.h
View file @
37a0f7ad
...
...
@@ -2274,7 +2274,7 @@ struct wined3d_state
DWORD
texture_states
[
MAX_TEXTURES
][
WINED3D_HIGHEST_TEXTURE_STATE
+
1
];
DWORD
lowest_disabled_stage
;
WINED3DMATRIX
transforms
[
HIGHEST_TRANSFORMSTATE
+
1
];
struct
wined3d_matrix
transforms
[
HIGHEST_TRANSFORMSTATE
+
1
];
double
clip_planes
[
MAX_CLIPPLANES
][
4
];
WINED3DMATERIAL
material
;
WINED3DVIEWPORT
viewport
;
...
...
@@ -2525,7 +2525,8 @@ BOOL getDepthStencilBits(const struct wined3d_format *format,
BYTE
*
depthSize
,
BYTE
*
stencilSize
)
DECLSPEC_HIDDEN
;
/* Math utils */
void
multiply_matrix
(
WINED3DMATRIX
*
dest
,
const
WINED3DMATRIX
*
src1
,
const
WINED3DMATRIX
*
src2
)
DECLSPEC_HIDDEN
;
void
multiply_matrix
(
struct
wined3d_matrix
*
dest
,
const
struct
wined3d_matrix
*
src1
,
const
struct
wined3d_matrix
*
src2
)
DECLSPEC_HIDDEN
;
UINT
wined3d_log2i
(
UINT32
x
)
DECLSPEC_HIDDEN
;
unsigned
int
count_bits
(
unsigned
int
mask
)
DECLSPEC_HIDDEN
;
...
...
include/wine/wined3d.h
View file @
37a0f7ad
...
...
@@ -1532,7 +1532,7 @@ struct wined3d_vec3
float
z
;
};
typedef
struct
_WINED3DMATRIX
struct
wined3d_matrix
{
union
{
...
...
@@ -1545,7 +1545,7 @@ typedef struct _WINED3DMATRIX
}
DUMMYSTRUCTNAME
;
float
m
[
4
][
4
];
}
DUMMYUNIONNAME
;
}
WINED3DMATRIX
;
};
typedef
struct
_WINED3DLIGHT
{
...
...
@@ -2251,7 +2251,7 @@ HRESULT __cdecl wined3d_device_get_texture(const struct wined3d_device *device,
HRESULT
__cdecl
wined3d_device_get_texture_stage_state
(
const
struct
wined3d_device
*
device
,
UINT
stage
,
WINED3DTEXTURESTAGESTATETYPE
state
,
DWORD
*
value
);
HRESULT
__cdecl
wined3d_device_get_transform
(
const
struct
wined3d_device
*
device
,
WINED3DTRANSFORMSTATETYPE
state
,
WINED3DMATRIX
*
matrix
);
WINED3DTRANSFORMSTATETYPE
state
,
struct
wined3d_matrix
*
matrix
);
HRESULT
__cdecl
wined3d_device_get_vertex_declaration
(
const
struct
wined3d_device
*
device
,
struct
wined3d_vertex_declaration
**
declaration
);
struct
wined3d_shader
*
__cdecl
wined3d_device_get_vertex_shader
(
const
struct
wined3d_device
*
device
);
...
...
@@ -2267,7 +2267,7 @@ ULONG __cdecl wined3d_device_incref(struct wined3d_device *device);
HRESULT
__cdecl
wined3d_device_init_3d
(
struct
wined3d_device
*
device
,
WINED3DPRESENT_PARAMETERS
*
present_parameters
);
HRESULT
__cdecl
wined3d_device_init_gdi
(
struct
wined3d_device
*
device
,
WINED3DPRESENT_PARAMETERS
*
present_parameters
);
HRESULT
__cdecl
wined3d_device_multiply_transform
(
struct
wined3d_device
*
device
,
WINED3DTRANSFORMSTATETYPE
state
,
const
WINED3DMATRIX
*
matrix
);
WINED3DTRANSFORMSTATETYPE
state
,
const
struct
wined3d_matrix
*
matrix
);
HRESULT
__cdecl
wined3d_device_present
(
const
struct
wined3d_device
*
device
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
HWND
dst_window_override
,
const
RGNDATA
*
dirty_region
);
HRESULT
__cdecl
wined3d_device_process_vertices
(
struct
wined3d_device
*
device
,
...
...
@@ -2320,7 +2320,7 @@ HRESULT __cdecl wined3d_device_set_texture(struct wined3d_device *device, UINT s
HRESULT
__cdecl
wined3d_device_set_texture_stage_state
(
struct
wined3d_device
*
device
,
UINT
stage
,
WINED3DTEXTURESTAGESTATETYPE
state
,
DWORD
value
);
HRESULT
__cdecl
wined3d_device_set_transform
(
struct
wined3d_device
*
device
,
WINED3DTRANSFORMSTATETYPE
state
,
const
WINED3DMATRIX
*
matrix
);
WINED3DTRANSFORMSTATETYPE
state
,
const
struct
wined3d_matrix
*
matrix
);
HRESULT
__cdecl
wined3d_device_set_vertex_declaration
(
struct
wined3d_device
*
device
,
struct
wined3d_vertex_declaration
*
declaration
);
HRESULT
__cdecl
wined3d_device_set_vertex_shader
(
struct
wined3d_device
*
device
,
struct
wined3d_shader
*
shader
);
...
...
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