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
02e4c336
Commit
02e4c336
authored
Dec 19, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Consistently use .xyzw for vector components.
parent
33f34488
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
21 deletions
+13
-21
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+0
-0
baseshader.c
dlls/wined3d/baseshader.c
+13
-21
No files found.
dlls/wined3d/arb_program_shader.c
View file @
02e4c336
This diff is collapsed.
Click to expand it.
dlls/wined3d/baseshader.c
View file @
02e4c336
...
...
@@ -588,7 +588,7 @@ static void shader_dump_param(const DWORD param, const DWORD addr_token, int inp
{
static
const
char
*
const
rastout_reg_names
[]
=
{
"oPos"
,
"oFog"
,
"oPts"
};
static
const
char
*
const
misctype_reg_names
[]
=
{
"vPos"
,
"vFace"
};
c
har
swizzle_reg_chars
[
4
]
;
c
onst
char
*
swizzle_reg_chars
=
"xyzw"
;
DWORD
reg
=
param
&
WINED3DSP_REGNUM_MASK
;
DWORD
regtype
=
shader_get_regtype
(
param
);
...
...
@@ -597,14 +597,6 @@ static void shader_dump_param(const DWORD param, const DWORD addr_token, int inp
/* There are some minor differences between pixel and vertex shaders */
char
pshader
=
shader_is_pshader_version
(
shader_version
);
/* For one, we'd prefer color components to be shown for pshaders.
* FIXME: use the swizzle function for this */
swizzle_reg_chars
[
0
]
=
pshader
?
'r'
:
'x'
;
swizzle_reg_chars
[
1
]
=
pshader
?
'g'
:
'y'
;
swizzle_reg_chars
[
2
]
=
pshader
?
'b'
:
'z'
;
swizzle_reg_chars
[
3
]
=
pshader
?
'a'
:
'w'
;
if
(
input
)
{
if
(
(
modifier
==
WINED3DSPSM_NEG
)
||
(
modifier
==
WINED3DSPSM_BIASNEG
)
||
...
...
@@ -709,10 +701,10 @@ static void shader_dump_param(const DWORD param, const DWORD addr_token, int inp
}
else
{
/** operand input */
DWORD
swizzle
=
(
param
&
WINED3DSP_SWIZZLE_MASK
)
>>
WINED3DSP_SWIZZLE_SHIFT
;
DWORD
swizzle_
r
=
swizzle
&
0x03
;
DWORD
swizzle_
g
=
(
swizzle
>>
2
)
&
0x03
;
DWORD
swizzle_
b
=
(
swizzle
>>
4
)
&
0x03
;
DWORD
swizzle_
a
=
(
swizzle
>>
6
)
&
0x03
;
DWORD
swizzle_
x
=
swizzle
&
0x03
;
DWORD
swizzle_
y
=
(
swizzle
>>
2
)
&
0x03
;
DWORD
swizzle_
z
=
(
swizzle
>>
4
)
&
0x03
;
DWORD
swizzle_
w
=
(
swizzle
>>
6
)
&
0x03
;
if
(
0
!=
modifier
)
{
switch
(
modifier
)
{
...
...
@@ -740,16 +732,16 @@ static void shader_dump_param(const DWORD param, const DWORD addr_token, int inp
* RRGGBBAA
*/
if
((
WINED3DVS_NOSWIZZLE
>>
WINED3DVS_SWIZZLE_SHIFT
)
!=
swizzle
)
{
if
(
swizzle_
r
==
swizzle_g
&&
swizzle_
r
==
swizzle_b
&&
swizzle_
r
==
swizzle_a
)
{
TRACE
(
".%c"
,
swizzle_reg_chars
[
swizzle_
r
]);
if
(
swizzle_
x
==
swizzle_y
&&
swizzle_
x
==
swizzle_z
&&
swizzle_
x
==
swizzle_w
)
{
TRACE
(
".%c"
,
swizzle_reg_chars
[
swizzle_
x
]);
}
else
{
TRACE
(
".%c%c%c%c"
,
swizzle_reg_chars
[
swizzle_
r
],
swizzle_reg_chars
[
swizzle_
g
],
swizzle_reg_chars
[
swizzle_
b
],
swizzle_reg_chars
[
swizzle_
a
]);
swizzle_reg_chars
[
swizzle_
x
],
swizzle_reg_chars
[
swizzle_
y
],
swizzle_reg_chars
[
swizzle_
z
],
swizzle_reg_chars
[
swizzle_
w
]);
}
}
}
...
...
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