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
1ae060be
Commit
1ae060be
authored
Apr 17, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simplify replicating the .x swizzle in shader_hw_mov().
It becomes even simpler once the swizzle shift and token field are eliminated.
parent
48a096a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+3
-11
No files found.
dlls/wined3d/arb_program_shader.c
View file @
1ae060be
...
...
@@ -1076,17 +1076,9 @@ static void shader_hw_mov(const struct wined3d_shader_instruction *ins)
{
/* Apple's ARB_vertex_program implementation does not accept an ARL source argument
* with more than one component. Thus replicate the first source argument over all
* 4 components. For example, .xyzw -> .x (or better: .xxxx), .zwxy -> .z, etc)
*/
DWORD
parm
=
ins
->
src
[
0
].
token
&
~
(
WINED3DVS_SWIZZLE_MASK
);
if
((
ins
->
src
[
0
].
token
&
WINED3DVS_X_W
)
==
WINED3DVS_X_W
)
parm
|=
WINED3DVS_X_W
|
WINED3DVS_Y_W
|
WINED3DVS_Z_W
|
WINED3DVS_W_W
;
else
if
((
ins
->
src
[
0
].
token
&
WINED3DVS_X_Z
)
==
WINED3DVS_X_Z
)
parm
|=
WINED3DVS_X_Z
|
WINED3DVS_Y_Z
|
WINED3DVS_Z_Z
|
WINED3DVS_W_Z
;
else
if
((
ins
->
src
[
0
].
token
&
WINED3DVS_X_Y
)
==
WINED3DVS_X_Y
)
parm
|=
WINED3DVS_X_Y
|
WINED3DVS_Y_Y
|
WINED3DVS_Z_Y
|
WINED3DVS_W_Y
;
else
if
((
ins
->
src
[
0
].
token
&
WINED3DVS_X_X
)
==
WINED3DVS_X_X
)
parm
|=
WINED3DVS_X_X
|
WINED3DVS_Y_X
|
WINED3DVS_Z_X
|
WINED3DVS_W_X
;
* 4 components. For example, .xyzw -> .x (or better: .xxxx), .zwxy -> .z, etc) */
DWORD
parm
=
ins
->
src
[
0
].
token
&
~
(
WINED3DSP_SWIZZLE_MASK
);
parm
|=
((
ins
->
src
[
0
].
token
>>
WINED3DSP_SWIZZLE_SHIFT
)
&
0x3
)
*
(
0x55
<<
WINED3DSP_SWIZZLE_SHIFT
);
shader_arb_add_src_param
(
ins
,
parm
,
src0_param
);
shader_addline
(
buffer
,
"ARL A0.x, %s;
\n
"
,
src0_param
);
}
...
...
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