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
aec6d319
Commit
aec6d319
authored
Jun 24, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Avoid a redundant copy.
parent
fd8ebebe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
20 deletions
+17
-20
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+17
-20
No files found.
dlls/wined3d/arb_program_shader.c
View file @
aec6d319
...
...
@@ -4359,7 +4359,8 @@ static inline BOOL get_bool_const(const struct wined3d_shader_instruction *ins,
}
}
static
inline
void
get_int_const
(
const
struct
wined3d_shader_instruction
*
ins
,
IWineD3DBaseShaderImpl
*
This
,
DWORD
idx
,
int
*
ret
)
static
void
get_loop_control_const
(
const
struct
wined3d_shader_instruction
*
ins
,
IWineD3DBaseShaderImpl
*
This
,
UINT
idx
,
struct
loop_control
*
loop_control
)
{
BOOL
vshader
=
shader_is_vshader_version
(
This
->
baseShader
.
reg_maps
.
shader_version
.
type
);
WORD
flag
=
(
1
<<
idx
);
...
...
@@ -4375,18 +4376,18 @@ static inline void get_int_const(const struct wined3d_shader_instruction *ins, I
{
if
(
constant
->
idx
==
idx
)
{
ret
[
0
]
=
constant
->
value
[
0
];
ret
[
1
]
=
constant
->
value
[
1
];
/* Step
/ stride is signed
*/
ret
[
2
]
=
(
int
)
constant
->
value
[
2
];
loop_control
->
count
=
constant
->
value
[
0
];
loop_control
->
start
=
constant
->
value
[
1
];
/* Step
is signed.
*/
loop_control
->
step
=
(
int
)
constant
->
value
[
2
];
return
;
}
}
/* If this happens the flag was set incorrectly */
ERR
(
"Local constant not found
\n
"
);
ret
[
0
]
=
0
;
ret
[
1
]
=
0
;
ret
[
2
]
=
0
;
loop_control
->
count
=
0
;
loop_control
->
start
=
0
;
loop_control
->
step
=
0
;
return
;
}
else
...
...
@@ -4394,16 +4395,16 @@ static inline void get_int_const(const struct wined3d_shader_instruction *ins, I
if
(
vshader
)
{
/* Count and aL start value are unsigned */
ret
[
0
]
=
priv
->
cur_vs_args
->
loop_ctrl
[
idx
][
0
];
ret
[
1
]
=
priv
->
cur_vs_args
->
loop_ctrl
[
idx
][
1
];
/*
The step/stride is signed
*/
ret
[
2
]
=
((
char
)
priv
->
cur_vs_args
->
loop_ctrl
[
idx
][
2
]);
loop_control
->
count
=
priv
->
cur_vs_args
->
loop_ctrl
[
idx
][
0
];
loop_control
->
start
=
priv
->
cur_vs_args
->
loop_ctrl
[
idx
][
1
];
/*
Step is signed.
*/
loop_control
->
step
=
((
char
)
priv
->
cur_vs_args
->
loop_ctrl
[
idx
][
2
]);
}
else
{
ret
[
0
]
=
priv
->
cur_ps_args
->
loop_ctrl
[
idx
][
0
];
ret
[
1
]
=
priv
->
cur_ps_args
->
loop_ctrl
[
idx
][
1
];
ret
[
2
]
=
((
char
)
priv
->
cur_ps_args
->
loop_ctrl
[
idx
][
2
]);
loop_control
->
count
=
priv
->
cur_ps_args
->
loop_ctrl
[
idx
][
0
];
loop_control
->
start
=
priv
->
cur_ps_args
->
loop_ctrl
[
idx
][
1
];
loop_control
->
step
=
((
char
)
priv
->
cur_ps_args
->
loop_ctrl
[
idx
][
2
]);
}
return
;
}
...
...
@@ -4524,14 +4525,10 @@ static void shader_arb_handle_instruction(const struct wined3d_shader_instructio
if
(
!
priv
->
recording
)
{
int
control_values
[
3
];
get_int_const
(
ins
,
This
,
ins
->
src
[
0
].
reg
.
idx
,
control_values
);
list_init
(
&
priv
->
record
);
priv
->
recording
=
TRUE
;
control_frame
->
outer_loop
=
TRUE
;
control_frame
->
loop_control
.
count
=
control_values
[
0
];
control_frame
->
loop_control
.
start
=
control_values
[
1
];
control_frame
->
loop_control
.
step
=
control_values
[
2
];
get_loop_control_const
(
ins
,
This
,
ins
->
src
[
0
].
reg
.
idx
,
&
control_frame
->
loop_control
);
return
;
/* Instruction is handled */
}
/* Record this loop in the outer loop's recording */
...
...
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