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
c490fb37
Commit
c490fb37
authored
Oct 21, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement WINED3DSIH_MOVC in the GLSL shader backend.
parent
7a437c29
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
glsl_shader.c
dlls/wined3d/glsl_shader.c
+14
-6
No files found.
dlls/wined3d/glsl_shader.c
View file @
c490fb37
...
...
@@ -2756,12 +2756,12 @@ static void shader_glsl_compare(const struct wined3d_shader_instruction *ins)
static
void
shader_glsl_conditional_move
(
const
struct
wined3d_shader_instruction
*
ins
)
{
const
char
*
condition_prefix
,
*
condition_suffix
;
struct
wined3d_shader_dst_param
dst
;
struct
glsl_src_param
src0_param
;
struct
glsl_src_param
src1_param
;
struct
glsl_src_param
src2_param
;
BOOL
temp_destination
=
FALSE
;
const
char
*
condition_suffix
;
DWORD
cmp_channel
=
0
;
unsigned
int
i
,
j
;
char
mask_char
[
6
];
...
...
@@ -2770,15 +2770,23 @@ static void shader_glsl_conditional_move(const struct wined3d_shader_instruction
switch
(
ins
->
handler_idx
)
{
case
WINED3DSIH_CMP
:
condition_prefix
=
""
;
condition_suffix
=
" >= 0.0"
;
break
;
case
WINED3DSIH_CND
:
condition_prefix
=
""
;
condition_suffix
=
" > 0.5"
;
break
;
case
WINED3DSIH_MOVC
:
condition_prefix
=
"bool("
;
condition_suffix
=
")"
;
break
;
default:
FIXME
(
"Unhandled instruction %#x.
\n
"
,
ins
->
handler_idx
);
condition_prefix
=
"<unhandled prefix>"
;
condition_suffix
=
"<unhandled suffix>"
;
break
;
}
...
...
@@ -2790,8 +2798,8 @@ static void shader_glsl_conditional_move(const struct wined3d_shader_instruction
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
1
],
write_mask
,
&
src1_param
);
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
2
],
write_mask
,
&
src2_param
);
shader_addline
(
ins
->
ctx
->
buffer
,
"%s%s ? %s : %s);
\n
"
,
src0_param
.
param_str
,
condition_suffix
,
shader_addline
(
ins
->
ctx
->
buffer
,
"%s%s
%s
? %s : %s);
\n
"
,
condition_prefix
,
src0_param
.
param_str
,
condition_suffix
,
src1_param
.
param_str
,
src2_param
.
param_str
);
return
;
}
...
...
@@ -2837,8 +2845,8 @@ static void shader_glsl_conditional_move(const struct wined3d_shader_instruction
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
1
],
write_mask
,
&
src1_param
);
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
2
],
write_mask
,
&
src2_param
);
shader_addline
(
ins
->
ctx
->
buffer
,
"%s%s ? %s : %s);
\n
"
,
src0_param
.
param_str
,
condition_suffix
,
shader_addline
(
ins
->
ctx
->
buffer
,
"%s%s
%s
? %s : %s);
\n
"
,
condition_prefix
,
src0_param
.
param_str
,
condition_suffix
,
src1_param
.
param_str
,
src2_param
.
param_str
);
}
...
...
@@ -5415,7 +5423,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_MIN */
shader_glsl_map2gl
,
/* WINED3DSIH_MOV */
shader_glsl_mov
,
/* WINED3DSIH_MOVA */
shader_glsl_mov
,
/* WINED3DSIH_MOVC */
NULL
,
/* WINED3DSIH_MOVC */
shader_glsl_conditional_move
,
/* WINED3DSIH_MUL */
shader_glsl_binop
,
/* WINED3DSIH_NOP */
shader_glsl_nop
,
/* WINED3DSIH_NRM */
shader_glsl_nrm
,
...
...
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