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
e0588e74
Commit
e0588e74
authored
Jan 15, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Jan 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass the correct mask to shader_glsl_add_src_param() in shader_glsl_lit().
parent
cb5c47f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
glsl_shader.c
dlls/wined3d/glsl_shader.c
+18
-9
No files found.
dlls/wined3d/glsl_shader.c
View file @
e0588e74
...
...
@@ -1297,17 +1297,26 @@ void shader_glsl_lrp(SHADER_OPCODE_ARG* arg) {
* where src.w is clamped at +- 128
*/
void
shader_glsl_lit
(
SHADER_OPCODE_ARG
*
arg
)
{
char
src0_str
[
100
];
char
src0_reg
[
50
];
char
src0_mask
[
6
];
char
src1_str
[
100
];
char
src1_reg
[
50
];
char
src1_mask
[
6
];
char
src3_str
[
100
];
char
src3_reg
[
50
];
char
src3_mask
[
6
];
char
dst_mask
[
6
];
char
dst_str
[
100
],
src0_str
[
100
]
;
char
dst_reg
[
50
],
src0_reg
[
50
]
;
char
dst_mask
[
6
],
src0_mask
[
6
];
shader_glsl_add_
dst_param
(
arg
,
arg
->
dst
,
0
,
dst_reg
,
dst_mask
,
dst
_str
);
shader_glsl_add_src_param
_old
(
arg
,
arg
->
src
[
0
],
arg
->
src_addr
[
0
],
src0_reg
,
src0_mask
,
src0
_str
);
shader_glsl_append_dst
(
arg
->
buffer
,
arg
)
;
shader_glsl_get_write_mask
(
arg
->
dst
,
dst_mask
)
;
shader_glsl_add_src_param
(
arg
,
arg
->
src
[
0
],
arg
->
src_addr
[
0
],
WINED3DSP_WRITEMASK_0
,
src0_reg
,
src0_mask
,
src0_str
);
shader_glsl_add_
src_param
(
arg
,
arg
->
src
[
0
],
arg
->
src_addr
[
0
],
WINED3DSP_WRITEMASK_1
,
src1_reg
,
src1_mask
,
src1
_str
);
shader_glsl_add_src_param
(
arg
,
arg
->
src
[
0
],
arg
->
src_addr
[
0
],
WINED3DSP_WRITEMASK_3
,
src3_reg
,
src3_mask
,
src3
_str
);
shader_addline
(
arg
->
buffer
,
"%s = vec4(1.0, (%s.x > 0.0 ? %s.x : 0.0), (%s.x > 0.0 ? ((%s.y > 0.0) ? pow(%s.y, clamp(%s.w, -128.0, 128.0)) : 0.0) : 0.0), 1.0)%s;
\n
"
,
dst_str
,
src0_reg
,
src0_reg
,
src0_reg
,
src0_reg
,
src0_reg
,
src0_reg
,
dst_mask
);
shader_addline
(
arg
->
buffer
,
"vec4(1.0, (%s > 0.0 ? %s : 0.0), (%s > 0.0 ? ((%s > 0.0) ? pow(%s, clamp(%s, -128.0, 128.0)) : 0.0) : 0.0), 1.0)%s);
\n
"
,
src0_str
,
src0_str
,
src0_str
,
src1_str
,
src1_str
,
src3_str
,
dst_mask
);
}
/** Process the WINED3DSIO_DST instruction in GLSL:
...
...
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