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
b28aff0d
Commit
b28aff0d
authored
Jan 27, 2013
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use assignment instead of memcpy to copy structs.
parent
b5d4c20b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+1
-1
stateblock.c
dlls/wined3d/stateblock.c
+4
-4
No files found.
dlls/wined3d/arb_program_shader.c
View file @
b28aff0d
...
...
@@ -6448,7 +6448,7 @@ static void fragment_prog_arbfp(struct wined3d_context *context, const struct wi
return
;
}
memcpy
(
&
new_desc
->
parent
.
settings
,
&
settings
,
sizeof
(
settings
))
;
new_desc
->
parent
.
settings
=
settings
;
new_desc
->
shader
=
gen_arbfp_ffp_shader
(
&
settings
,
gl_info
);
add_ffp_frag_shader
(
&
priv
->
fragment_shaders
,
&
new_desc
->
parent
);
TRACE
(
"Allocated fixed function replacement shader descriptor %p
\n
"
,
new_desc
);
...
...
dlls/wined3d/ati_fragment_shader.c
View file @
b28aff0d
...
...
@@ -861,7 +861,7 @@ static void set_tex_op_atifs(struct wined3d_context *context, const struct wined
new_desc
->
num_textures_used
=
i
+
1
;
}
memcpy
(
&
new_desc
->
parent
.
settings
,
&
settings
,
sizeof
(
settings
))
;
new_desc
->
parent
.
settings
=
settings
;
new_desc
->
shader
=
gen_ati_shader
(
settings
.
op
,
gl_info
);
add_ffp_frag_shader
(
&
priv
->
fragment_shaders
,
&
new_desc
->
parent
);
TRACE
(
"Allocated fixed function replacement shader descriptor %p
\n
"
,
new_desc
);
...
...
dlls/wined3d/stateblock.c
View file @
b28aff0d
...
...
@@ -1168,11 +1168,11 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
memset
(
stateblock
->
changed
.
vertexShaderConstantsF
,
0
,
device
->
d3d_vshader_constantF
*
sizeof
(
BOOL
));
/* Set some of the defaults for lights, transforms etc */
memcpy
(
&
state
->
transforms
[
WINED3D_TS_PROJECTION
],
&
identity
,
sizeof
(
identity
))
;
memcpy
(
&
state
->
transforms
[
WINED3D_TS_VIEW
],
&
identity
,
sizeof
(
identity
))
;
state
->
transforms
[
WINED3D_TS_PROJECTION
]
=
identity
;
state
->
transforms
[
WINED3D_TS_VIEW
]
=
identity
;
for
(
i
=
0
;
i
<
256
;
++
i
)
{
memcpy
(
&
state
->
transforms
[
WINED3D_TS_WORLD_MATRIX
(
i
)],
&
identity
,
sizeof
(
identity
))
;
state
->
transforms
[
WINED3D_TS_WORLD_MATRIX
(
i
)]
=
identity
;
}
state
->
fb
=
&
device
->
fb
;
...
...
@@ -1313,7 +1313,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
for
(
i
=
0
;
i
<
MAX_TEXTURES
;
++
i
)
{
TRACE
(
"Setting up default texture states for texture Stage %u.
\n
"
,
i
);
memcpy
(
&
state
->
transforms
[
WINED3D_TS_TEXTURE0
+
i
],
&
identity
,
sizeof
(
identity
))
;
state
->
transforms
[
WINED3D_TS_TEXTURE0
+
i
]
=
identity
;
state
->
texture_states
[
i
][
WINED3D_TSS_COLOR_OP
]
=
i
?
WINED3D_TOP_DISABLE
:
WINED3D_TOP_MODULATE
;
state
->
texture_states
[
i
][
WINED3D_TSS_COLOR_ARG1
]
=
WINED3DTA_TEXTURE
;
state
->
texture_states
[
i
][
WINED3D_TSS_COLOR_ARG2
]
=
WINED3DTA_CURRENT
;
...
...
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