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
c371af0d
Commit
c371af0d
authored
Apr 24, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of device->view_ident.
parent
098105dc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
45 deletions
+16
-45
device.c
dlls/wined3d/device.c
+0
-15
state.c
dlls/wined3d/state.c
+8
-25
stateblock.c
dlls/wined3d/stateblock.c
+7
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-5
No files found.
dlls/wined3d/device.c
View file @
c371af0d
...
@@ -53,17 +53,6 @@ const struct wined3d_light WINED3D_default_light =
...
@@ -53,17 +53,6 @@ const struct wined3d_light WINED3D_default_light =
0
.
0
f
/* Phi */
0
.
0
f
/* Phi */
};
};
/**********************************************************
* Global variable / Constants follow
**********************************************************/
const
struct
wined3d_matrix
identity
=
{{{
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
}}};
/* When needed for comparisons */
/* Note that except for WINED3DPT_POINTLIST and WINED3DPT_LINELIST these
/* Note that except for WINED3DPT_POINTLIST and WINED3DPT_LINELIST these
* actually have the same values in GL and D3D. */
* actually have the same values in GL and D3D. */
GLenum
gl_primitive_type_from_d3d
(
enum
wined3d_primitive_type
primitive_type
)
GLenum
gl_primitive_type_from_d3d
(
enum
wined3d_primitive_type
primitive_type
)
...
@@ -1208,8 +1197,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
...
@@ -1208,8 +1197,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
create_dummy_textures
(
device
,
context
);
create_dummy_textures
(
device
,
context
);
/* Initialize the current view state */
device
->
view_ident
=
1
;
device
->
contexts
[
0
]
->
last_was_rhw
=
0
;
device
->
contexts
[
0
]
->
last_was_rhw
=
0
;
switch
(
wined3d_settings
.
offscreen_rendering_mode
)
switch
(
wined3d_settings
.
offscreen_rendering_mode
)
...
@@ -1684,8 +1671,6 @@ void CDECL wined3d_device_set_transform(struct wined3d_device *device,
...
@@ -1684,8 +1671,6 @@ void CDECL wined3d_device_set_transform(struct wined3d_device *device,
}
}
device
->
stateBlock
->
state
.
transforms
[
d3dts
]
=
*
matrix
;
device
->
stateBlock
->
state
.
transforms
[
d3dts
]
=
*
matrix
;
if
(
d3dts
==
WINED3D_TS_VIEW
)
device
->
view_ident
=
!
memcmp
(
matrix
,
&
identity
,
sizeof
(
identity
));
if
(
d3dts
<
WINED3D_TS_WORLD_MATRIX
(
device
->
adapter
->
gl_info
.
limits
.
blends
))
if
(
d3dts
<
WINED3D_TS_WORLD_MATRIX
(
device
->
adapter
->
gl_info
.
limits
.
blends
))
device_invalidate_state
(
device
,
STATE_TRANSFORM
(
d3dts
));
device_invalidate_state
(
device
,
STATE_TRANSFORM
(
d3dts
));
...
...
dlls/wined3d/state.c
View file @
c371af0d
...
@@ -3801,19 +3801,10 @@ static void transform_world(struct wined3d_context *context, const struct wined3
...
@@ -3801,19 +3801,10 @@ static void transform_world(struct wined3d_context *context, const struct wined3
}
}
else
else
{
{
/* In the general case, the view matrix is the identity matrix */
gl_info
->
gl_ops
.
gl
.
p_glLoadMatrixf
(
&
state
->
transforms
[
WINED3D_TS_VIEW
].
u
.
m
[
0
][
0
]);
if
(
context
->
swapchain
->
device
->
view_ident
)
checkGLcall
(
"glLoadMatrixf"
);
{
gl_info
->
gl_ops
.
gl
.
p_glMultMatrixf
(
&
state
->
transforms
[
WINED3D_TS_WORLD_MATRIX
(
0
)].
u
.
m
[
0
][
0
]);
gl_info
->
gl_ops
.
gl
.
p_glLoadMatrixf
(
&
state
->
transforms
[
WINED3D_TS_WORLD_MATRIX
(
0
)].
u
.
m
[
0
][
0
]);
checkGLcall
(
"glMultMatrixf"
);
checkGLcall
(
"glLoadMatrixf"
);
}
else
{
gl_info
->
gl_ops
.
gl
.
p_glLoadMatrixf
(
&
state
->
transforms
[
WINED3D_TS_VIEW
].
u
.
m
[
0
][
0
]);
checkGLcall
(
"glLoadMatrixf"
);
gl_info
->
gl_ops
.
gl
.
p_glMultMatrixf
(
&
state
->
transforms
[
WINED3D_TS_WORLD_MATRIX
(
0
)].
u
.
m
[
0
][
0
]);
checkGLcall
(
"glMultMatrixf"
);
}
}
}
}
}
...
@@ -3883,18 +3874,10 @@ static void transform_worldex(struct wined3d_context *context, const struct wine
...
@@ -3883,18 +3874,10 @@ static void transform_worldex(struct wined3d_context *context, const struct wine
/* World matrix 0 is multiplied with the view matrix because d3d uses 3
/* World matrix 0 is multiplied with the view matrix because d3d uses 3
* matrices while gl uses only 2. To avoid weighting the view matrix
* matrices while gl uses only 2. To avoid weighting the view matrix
* incorrectly it has to be multiplied into every GL modelview matrix. */
* incorrectly it has to be multiplied into every GL modelview matrix. */
if
(
context
->
swapchain
->
device
->
view_ident
)
gl_info
->
gl_ops
.
gl
.
p_glLoadMatrixf
(
&
state
->
transforms
[
WINED3D_TS_VIEW
].
u
.
m
[
0
][
0
]);
{
checkGLcall
(
"glLoadMatrixf"
);
gl_info
->
gl_ops
.
gl
.
p_glLoadMatrixf
(
&
state
->
transforms
[
WINED3D_TS_WORLD_MATRIX
(
matrix
)].
u
.
m
[
0
][
0
]);
gl_info
->
gl_ops
.
gl
.
p_glMultMatrixf
(
&
state
->
transforms
[
WINED3D_TS_WORLD_MATRIX
(
matrix
)].
u
.
m
[
0
][
0
]);
checkGLcall
(
"glLoadMatrixf"
);
checkGLcall
(
"glMultMatrixf"
);
}
else
{
gl_info
->
gl_ops
.
gl
.
p_glLoadMatrixf
(
&
state
->
transforms
[
WINED3D_TS_VIEW
].
u
.
m
[
0
][
0
]);
checkGLcall
(
"glLoadMatrixf"
);
gl_info
->
gl_ops
.
gl
.
p_glMultMatrixf
(
&
state
->
transforms
[
WINED3D_TS_WORLD_MATRIX
(
matrix
)].
u
.
m
[
0
][
0
]);
checkGLcall
(
"glMultMatrixf"
);
}
}
}
static
void
state_vertexblend_w
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
static
void
state_vertexblend_w
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
...
...
dlls/wined3d/stateblock.c
View file @
c371af0d
...
@@ -1161,6 +1161,13 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
...
@@ -1161,6 +1161,13 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
unsigned
int
i
;
unsigned
int
i
;
struct
wined3d_swapchain
*
swapchain
;
struct
wined3d_swapchain
*
swapchain
;
struct
wined3d_surface
*
backbuffer
;
struct
wined3d_surface
*
backbuffer
;
static
const
struct
wined3d_matrix
identity
=
{{{
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
}}};
TRACE
(
"stateblock %p.
\n
"
,
stateblock
);
TRACE
(
"stateblock %p.
\n
"
,
stateblock
);
...
...
dlls/wined3d/wined3d_private.h
View file @
c371af0d
...
@@ -863,9 +863,6 @@ do { \
...
@@ -863,9 +863,6 @@ do { \
#define checkGLcall(A) do {} while(0)
#define checkGLcall(A) do {} while(0)
#endif
#endif
/* Global variables */
extern
const
struct
wined3d_matrix
identity
DECLSPEC_HIDDEN
;
enum
wined3d_ffp_idx
enum
wined3d_ffp_idx
{
{
WINED3D_FFP_POSITION
=
0
,
WINED3D_FFP_POSITION
=
0
,
...
@@ -1704,7 +1701,6 @@ struct wined3d_device
...
@@ -1704,7 +1701,6 @@ struct wined3d_device
DWORD
vs_clipping
;
DWORD
vs_clipping
;
UINT
instance_count
;
UINT
instance_count
;
WORD
view_ident
:
1
;
/* true iff view matrix is identity */
WORD
vertexBlendUsed
:
1
;
/* To avoid needless setting of the blend matrices */
WORD
vertexBlendUsed
:
1
;
/* To avoid needless setting of the blend matrices */
WORD
isRecordingState
:
1
;
WORD
isRecordingState
:
1
;
WORD
isInDraw
:
1
;
WORD
isInDraw
:
1
;
...
@@ -1714,7 +1710,7 @@ struct wined3d_device
...
@@ -1714,7 +1710,7 @@ struct wined3d_device
WORD
softwareVertexProcessing
:
1
;
/* process vertex shaders using software or hardware */
WORD
softwareVertexProcessing
:
1
;
/* process vertex shaders using software or hardware */
WORD
useDrawStridedSlow
:
1
;
WORD
useDrawStridedSlow
:
1
;
WORD
filter_messages
:
1
;
WORD
filter_messages
:
1
;
WORD
padding
:
6
;
WORD
padding
:
7
;
BYTE
fixed_function_usage_map
;
/* MAX_TEXTURES, 8 */
BYTE
fixed_function_usage_map
;
/* MAX_TEXTURES, 8 */
...
...
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