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
7e1100d0
Commit
7e1100d0
authored
May 26, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Handle LRP in vertex shaders.
The ARB "LRP" instruction is a fragment program only instruction. It is however valid in vs_2_0+ vertex shaders, so we have to emulate it.
parent
33534916
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+23
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
7e1100d0
...
...
@@ -1819,6 +1819,28 @@ static void shader_hw_nrm(const struct wined3d_shader_instruction *ins)
}
}
static
void
shader_hw_lrp
(
const
struct
wined3d_shader_instruction
*
ins
)
{
SHADER_BUFFER
*
buffer
=
ins
->
ctx
->
buffer
;
char
dst_name
[
50
];
char
src_name
[
3
][
50
];
/* ARB_fragment_program has a convenient LRP instruction */
if
(
shader_is_pshader_version
(
ins
->
ctx
->
reg_maps
->
shader_version
.
type
))
{
shader_hw_map2gl
(
ins
);
return
;
}
shader_arb_get_dst_param
(
ins
,
&
ins
->
dst
[
0
],
dst_name
);
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
0
],
0
,
src_name
[
0
]);
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
1
],
1
,
src_name
[
1
]);
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
2
],
2
,
src_name
[
2
]);
shader_addline
(
buffer
,
"SUB TA, %s, %s;
\n
"
,
src_name
[
1
],
src_name
[
2
]);
shader_addline
(
buffer
,
"MAD%s %s, %s, TA, %s;
\n
"
,
shader_arb_get_modifier
(
ins
),
dst_name
,
src_name
[
0
],
src_name
[
2
]);
}
static
void
shader_hw_sincos
(
const
struct
wined3d_shader_instruction
*
ins
)
{
/* This instruction exists in ARB, but the d3d instruction takes two extra parameters which
...
...
@@ -2820,7 +2842,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_LOG */
shader_hw_map2gl
,
/* WINED3DSIH_LOGP */
shader_hw_map2gl
,
/* WINED3DSIH_LOOP */
NULL
,
/* WINED3DSIH_LRP */
shader_hw_
map2gl
,
/* WINED3DSIH_LRP */
shader_hw_
lrp
,
/* WINED3DSIH_M3x2 */
shader_hw_mnxn
,
/* WINED3DSIH_M3x3 */
shader_hw_mnxn
,
/* WINED3DSIH_M3x4 */
shader_hw_mnxn
,
...
...
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