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
c13f097d
Commit
c13f097d
authored
Jun 16, 2006
by
Jason Green
Committed by
Alexandre Julliard
Jun 19, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Correct implementation of D3DSIO_LOOP.
I initially misread the specification. src0.x is the iteration count, not the max amount for the loop register. This fixes that.
parent
fd83de71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
glsl_shader.c
dlls/wined3d/glsl_shader.c
+8
-5
No files found.
dlls/wined3d/glsl_shader.c
View file @
c13f097d
...
...
@@ -333,8 +333,10 @@ void shader_generate_glsl_declarations(
}
/* Declare loop register aL */
if
(
reg_maps
->
loop
)
if
(
reg_maps
->
loop
)
{
shader_addline
(
buffer
,
"int aL;
\n
"
);
shader_addline
(
buffer
,
"int tmpInt;
\n
"
);
}
/* Temporary variables for matrix operations */
shader_addline
(
buffer
,
"vec4 tmp0;
\n
"
);
...
...
@@ -1157,7 +1159,8 @@ void shader_glsl_sincos(SHADER_OPCODE_ARG* arg) {
/** Process the D3DSIO_LOOP instruction in GLSL:
* Start a for() loop where src0.y is the initial value of aL,
* increment aL by src0.z while (aL < src0.x).
* increment aL by src0.z for a total of src0.x iterations.
* Need to use a temporary variable for this operation.
*/
void
shader_glsl_loop
(
SHADER_OPCODE_ARG
*
arg
)
{
...
...
@@ -1166,9 +1169,9 @@ void shader_glsl_loop(SHADER_OPCODE_ARG* arg) {
char
src0_mask
[
6
];
shader_glsl_add_param
(
arg
,
arg
->
src
[
0
],
arg
->
src_addr
[
0
],
TRUE
,
src0_reg
,
src0_mask
,
src0_str
);
shader_addline
(
arg
->
buffer
,
"for (
aL = %s.y; aL < %s.x;
aL += %s.z) {
\n
"
,
src0_reg
,
src0_reg
,
src0_reg
);
shader_addline
(
arg
->
buffer
,
"for (
tmpInt = 0, aL = %s.y; tmpInt < %s.x; tmpInt++,
aL += %s.z) {
\n
"
,
src0_reg
,
src0_reg
,
src0_reg
);
}
/** Process the D3DSIO_ENDLOOP 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