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
e31945b8
Commit
e31945b8
authored
Oct 17, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement WINED3DSIH_USHR in the GLSL shader backend.
parent
5ca5409b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
glsl_shader.c
dlls/wined3d/glsl_shader.c
+12
-11
No files found.
dlls/wined3d/glsl_shader.c
View file @
e31945b8
...
...
@@ -2208,20 +2208,21 @@ static void shader_glsl_binop(const struct wined3d_shader_instruction *ins)
struct
glsl_src_param
src0_param
;
struct
glsl_src_param
src1_param
;
DWORD
write_mask
;
c
har
op
;
c
onst
char
*
op
;
/* Determine the GLSL operator to use based on the opcode */
switch
(
ins
->
handler_idx
)
{
case
WINED3DSIH_ADD
:
op
=
'+'
;
break
;
case
WINED3DSIH_AND
:
op
=
'&'
;
break
;
case
WINED3DSIH_DIV
:
op
=
'/'
;
break
;
case
WINED3DSIH_IADD
:
op
=
'+'
;
break
;
case
WINED3DSIH_MUL
:
op
=
'*'
;
break
;
case
WINED3DSIH_SUB
:
op
=
'-'
;
break
;
case
WINED3DSIH_XOR
:
op
=
'^'
;
break
;
case
WINED3DSIH_ADD
:
op
=
"+"
;
break
;
case
WINED3DSIH_AND
:
op
=
"&"
;
break
;
case
WINED3DSIH_DIV
:
op
=
"/"
;
break
;
case
WINED3DSIH_IADD
:
op
=
"+"
;
break
;
case
WINED3DSIH_MUL
:
op
=
"*"
;
break
;
case
WINED3DSIH_SUB
:
op
=
"-"
;
break
;
case
WINED3DSIH_USHR
:
op
=
">>"
;
break
;
case
WINED3DSIH_XOR
:
op
=
"^"
;
break
;
default:
op
=
' '
;
op
=
"<unhandled operator>"
;
FIXME
(
"Opcode %#x not yet handled in GLSL
\n
"
,
ins
->
handler_idx
);
break
;
}
...
...
@@ -2229,7 +2230,7 @@ static void shader_glsl_binop(const struct wined3d_shader_instruction *ins)
write_mask
=
shader_glsl_append_dst
(
buffer
,
ins
);
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
0
],
write_mask
,
&
src0_param
);
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
1
],
write_mask
,
&
src1_param
);
shader_addline
(
buffer
,
"%s %
c
%s);
\n
"
,
src0_param
.
param_str
,
op
,
src1_param
.
param_str
);
shader_addline
(
buffer
,
"%s %
s
%s);
\n
"
,
src0_param
.
param_str
,
op
,
src1_param
.
param_str
);
}
static
void
shader_glsl_relop
(
const
struct
wined3d_shader_instruction
*
ins
)
...
...
@@ -5466,7 +5467,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_TEXREG2GB */
shader_glsl_texreg2gb
,
/* WINED3DSIH_TEXREG2RGB */
shader_glsl_texreg2rgb
,
/* WINED3DSIH_UDIV */
shader_glsl_udiv
,
/* WINED3DSIH_USHR */
NULL
,
/* WINED3DSIH_USHR */
shader_glsl_binop
,
/* WINED3DSIH_UTOF */
shader_glsl_to_float
,
/* WINED3DSIH_XOR */
shader_glsl_binop
,
};
...
...
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