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
2b9a63b5
Commit
2b9a63b5
authored
Dec 29, 2006
by
H. Verbeet
Committed by
Alexandre Julliard
Dec 29, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Cleanup shader_glsl_get_output_register_swizzle().
parent
845cd590
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
glsl_shader.c
dlls/wined3d/glsl_shader.c
+14
-14
No files found.
dlls/wined3d/glsl_shader.c
View file @
2b9a63b5
...
...
@@ -718,19 +718,19 @@ static void shader_glsl_get_register_name(
strcat
(
regstr
,
tmpStr
);
}
/* Writes the GLSL writemask for the destination register */
static
void
shader_glsl_get_output_register_swizzle
(
const
DWORD
param
,
char
*
write_mask
)
{
*
write_mask
=
0
;
/* Get the GLSL write mask for the destination register */
static
void
shader_glsl_get_write_mask
(
const
DWORD
param
,
char
*
write_mask
)
{
char
*
ptr
=
write_mask
;
if
((
param
&
WINED3DSP_WRITEMASK_ALL
)
!=
WINED3DSP_WRITEMASK_ALL
)
{
strcat
(
write_mask
,
"."
)
;
if
(
param
&
WINED3DSP_WRITEMASK_0
)
strcat
(
write_mask
,
"x"
)
;
if
(
param
&
WINED3DSP_WRITEMASK_1
)
strcat
(
write_mask
,
"y"
)
;
if
(
param
&
WINED3DSP_WRITEMASK_2
)
strcat
(
write_mask
,
"z"
)
;
if
(
param
&
WINED3DSP_WRITEMASK_3
)
strcat
(
write_mask
,
"w"
)
;
*
ptr
++
=
'.'
;
if
(
param
&
WINED3DSP_WRITEMASK_0
)
*
ptr
++
=
'x'
;
if
(
param
&
WINED3DSP_WRITEMASK_1
)
*
ptr
++
=
'y'
;
if
(
param
&
WINED3DSP_WRITEMASK_2
)
*
ptr
++
=
'z'
;
if
(
param
&
WINED3DSP_WRITEMASK_3
)
*
ptr
++
=
'w'
;
}
*
ptr
=
'\0'
;
}
static
void
shader_glsl_get_input_register_swizzle
(
...
...
@@ -804,7 +804,7 @@ static void shader_glsl_add_param(
shader_glsl_get_input_register_swizzle
(
param
,
is_color
,
reg_mask
);
shader_glsl_gen_modifier
(
param
,
reg_name
,
reg_mask
,
out_str
);
}
else
{
shader_glsl_get_
output_register_swizzle
(
param
,
reg_mask
);
shader_glsl_get_
write_mask
(
param
,
reg_mask
);
sprintf
(
out_str
,
"%s%s"
,
reg_name
,
reg_mask
);
}
}
...
...
@@ -1788,7 +1788,7 @@ void pshader_glsl_input_pack(
if
(
!
usage_token
)
continue
;
usage
=
(
usage_token
&
WINED3DSP_DCL_USAGE_MASK
)
>>
WINED3DSP_DCL_USAGE_SHIFT
;
usage_idx
=
(
usage_token
&
WINED3DSP_DCL_USAGEINDEX_MASK
)
>>
WINED3DSP_DCL_USAGEINDEX_SHIFT
;
shader_glsl_get_
output_register_swizzle
(
register_token
,
reg_mask
);
shader_glsl_get_
write_mask
(
register_token
,
reg_mask
);
switch
(
usage
)
{
...
...
@@ -1843,7 +1843,7 @@ void vshader_glsl_output_unpack(
usage
=
(
usage_token
&
WINED3DSP_DCL_USAGE_MASK
)
>>
WINED3DSP_DCL_USAGE_SHIFT
;
usage_idx
=
(
usage_token
&
WINED3DSP_DCL_USAGEINDEX_MASK
)
>>
WINED3DSP_DCL_USAGEINDEX_SHIFT
;
shader_glsl_get_
output_register_swizzle
(
register_token
,
reg_mask
);
shader_glsl_get_
write_mask
(
register_token
,
reg_mask
);
switch
(
usage
)
{
...
...
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