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
122af07a
Commit
122af07a
authored
May 08, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement SGN in ARB.
parent
8e45e48b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+30
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
122af07a
...
...
@@ -1038,6 +1038,7 @@ static void shader_hw_map2gl(const struct wined3d_shader_instruction *ins)
case
WINED3DSIH_SLT
:
instruction
=
"SLT"
;
break
;
case
WINED3DSIH_SUB
:
instruction
=
"SUB"
;
break
;
case
WINED3DSIH_MOVA
:
instruction
=
"ARR"
;
break
;
case
WINED3DSIH_SGN
:
instruction
=
"SSG"
;
break
;
default:
instruction
=
""
;
FIXME
(
"Unhandled opcode %#x
\n
"
,
ins
->
handler_idx
);
break
;
...
...
@@ -1726,6 +1727,34 @@ static void shader_hw_sincos(const struct wined3d_shader_instruction *ins)
}
/* GL locking is done by the caller */
static
void
shader_hw_sgn
(
const
struct
wined3d_shader_instruction
*
ins
)
{
SHADER_BUFFER
*
buffer
=
ins
->
ctx
->
buffer
;
char
dst_name
[
50
];
char
src_name
[
50
];
struct
shader_arb_ctx_priv
*
ctx
=
ins
->
ctx
->
backend_data
;
/* SGN is only valid in vertex shaders */
if
(
ctx
->
target_version
==
NV2
)
{
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
);
FIXME
(
"Emulated SGN untested
\n
"
);
/* If SRC > 0.0, -SRC < SRC = TRUE, otherwise false.
* if SRC < 0.0, SRC < -SRC = TRUE. If neither is true, src = 0.0
*/
if
(
ins
->
dst
[
0
].
modifiers
&
WINED3DSPDM_SATURATE
)
{
shader_addline
(
buffer
,
"SLT %s, -%s, %s;
\n
"
,
dst_name
,
src_name
,
src_name
);
}
else
{
shader_addline
(
buffer
,
"SLT TB, -%s, %s;
\n
"
,
src_name
,
src_name
);
shader_addline
(
buffer
,
"SLT TC, %s, -%s;
\n
"
,
src_name
,
src_name
);
shader_addline
(
buffer
,
"ADD %s, TB, -TC;
\n
"
,
dst_name
);
}
}
static
GLuint
create_arb_blt_vertex_program
(
const
WineD3D_GL_Info
*
gl_info
)
{
GLuint
program_id
=
0
;
...
...
@@ -2363,7 +2392,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_RSQ */
shader_hw_rsq_rcp
,
/* WINED3DSIH_SETP */
NULL
,
/* WINED3DSIH_SGE */
shader_hw_map2gl
,
/* WINED3DSIH_SGN */
NULL
,
/* WINED3DSIH_SGN */
shader_hw_sgn
,
/* WINED3DSIH_SINCOS */
shader_hw_sincos
,
/* WINED3DSIH_SLT */
shader_hw_map2gl
,
/* WINED3DSIH_SUB */
shader_hw_map2gl
,
...
...
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