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
adf7c330
Commit
adf7c330
authored
Nov 08, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the COMPARISON_TYPE typedef.
parent
323a9541
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
45 deletions
+46
-45
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+18
-18
glsl_shader.c
dlls/wined3d/glsl_shader.c
+13
-12
shader.c
dlls/wined3d/shader.c
+6
-6
wined3d_private.h
dlls/wined3d/wined3d_private.h
+9
-9
No files found.
dlls/wined3d/arb_program_shader.c
View file @
adf7c330
...
...
@@ -2943,34 +2943,34 @@ static void shader_hw_break(const struct wined3d_shader_instruction *ins)
}
}
static
const
char
*
get_compare
(
COMPARISON_TYPE
flags
)
static
const
char
*
get_compare
(
enum
wined3d_shader_rel_op
op
)
{
switch
(
flags
)
switch
(
op
)
{
case
COMPARISON
_GT
:
return
"GT"
;
case
COMPARISON
_EQ
:
return
"EQ"
;
case
COMPARISON
_GE
:
return
"GE"
;
case
COMPARISON
_LT
:
return
"LT"
;
case
COMPARISON
_NE
:
return
"NE"
;
case
COMPARISON
_LE
:
return
"LE"
;
case
WINED3D_SHADER_REL_OP
_GT
:
return
"GT"
;
case
WINED3D_SHADER_REL_OP
_EQ
:
return
"EQ"
;
case
WINED3D_SHADER_REL_OP
_GE
:
return
"GE"
;
case
WINED3D_SHADER_REL_OP
_LT
:
return
"LT"
;
case
WINED3D_SHADER_REL_OP
_NE
:
return
"NE"
;
case
WINED3D_SHADER_REL_OP
_LE
:
return
"LE"
;
default:
FIXME
(
"Unrecognized
comparison value: %u
\n
"
,
flags
);
FIXME
(
"Unrecognized
operator %#x.
\n
"
,
op
);
return
"(\?\?)"
;
}
}
static
COMPARISON_TYPE
invert_compare
(
COMPARISON_TYPE
flags
)
static
enum
wined3d_shader_rel_op
invert_compare
(
enum
wined3d_shader_rel_op
op
)
{
switch
(
flags
)
switch
(
op
)
{
case
COMPARISON_GT
:
return
COMPARISON
_LE
;
case
COMPARISON_EQ
:
return
COMPARISON
_NE
;
case
COMPARISON_GE
:
return
COMPARISON
_LT
;
case
COMPARISON_LT
:
return
COMPARISON
_GE
;
case
COMPARISON_NE
:
return
COMPARISON
_EQ
;
case
COMPARISON_LE
:
return
COMPARISON
_GT
;
case
WINED3D_SHADER_REL_OP_GT
:
return
WINED3D_SHADER_REL_OP
_LE
;
case
WINED3D_SHADER_REL_OP_EQ
:
return
WINED3D_SHADER_REL_OP
_NE
;
case
WINED3D_SHADER_REL_OP_GE
:
return
WINED3D_SHADER_REL_OP
_LT
;
case
WINED3D_SHADER_REL_OP_LT
:
return
WINED3D_SHADER_REL_OP
_GE
;
case
WINED3D_SHADER_REL_OP_NE
:
return
WINED3D_SHADER_REL_OP
_EQ
;
case
WINED3D_SHADER_REL_OP_LE
:
return
WINED3D_SHADER_REL_OP
_GT
;
default:
FIXME
(
"Unrecognized
comparison value: %u
\n
"
,
flags
);
FIXME
(
"Unrecognized
operator %#x.
\n
"
,
op
);
return
-
1
;
}
}
...
...
dlls/wined3d/glsl_shader.c
View file @
adf7c330
...
...
@@ -1634,17 +1634,18 @@ static void shader_glsl_add_instruction_modifiers(const struct wined3d_shader_in
}
}
static
inline
const
char
*
shader_get_comp_op
(
DWORD
op
)
{
switch
(
op
)
{
case
COMPARISON_GT
:
return
">"
;
case
COMPARISON_EQ
:
return
"=="
;
case
COMPARISON_GE
:
return
">="
;
case
COMPARISON_LT
:
return
"<"
;
case
COMPARISON_NE
:
return
"!="
;
case
COMPARISON_LE
:
return
"<="
;
static
const
char
*
shader_glsl_get_rel_op
(
enum
wined3d_shader_rel_op
op
)
{
switch
(
op
)
{
case
WINED3D_SHADER_REL_OP_GT
:
return
">"
;
case
WINED3D_SHADER_REL_OP_EQ
:
return
"=="
;
case
WINED3D_SHADER_REL_OP_GE
:
return
">="
;
case
WINED3D_SHADER_REL_OP_LT
:
return
"<"
;
case
WINED3D_SHADER_REL_OP_NE
:
return
"!="
;
case
WINED3D_SHADER_REL_OP_LE
:
return
"<="
;
default:
FIXME
(
"Unrecognized
comparison value: %u
\n
"
,
op
);
FIXME
(
"Unrecognized
operator %#x.
\n
"
,
op
);
return
"(\?\?)"
;
}
}
...
...
@@ -2958,7 +2959,7 @@ static void shader_glsl_ifc(const struct wined3d_shader_instruction *ins)
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
1
],
WINED3DSP_WRITEMASK_0
,
&
src1_param
);
shader_addline
(
ins
->
ctx
->
buffer
,
"if (%s %s %s) {
\n
"
,
src0_param
.
param_str
,
shader_g
et_comp
_op
(
ins
->
flags
),
src1_param
.
param_str
);
src0_param
.
param_str
,
shader_g
lsl_get_rel
_op
(
ins
->
flags
),
src1_param
.
param_str
);
}
static
void
shader_glsl_else
(
const
struct
wined3d_shader_instruction
*
ins
)
...
...
@@ -2981,7 +2982,7 @@ static void shader_glsl_breakc(const struct wined3d_shader_instruction *ins)
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
1
],
WINED3DSP_WRITEMASK_0
,
&
src1_param
);
shader_addline
(
ins
->
ctx
->
buffer
,
"if (%s %s %s) break;
\n
"
,
src0_param
.
param_str
,
shader_g
et_comp
_op
(
ins
->
flags
),
src1_param
.
param_str
);
src0_param
.
param_str
,
shader_g
lsl_get_rel
_op
(
ins
->
flags
),
src1_param
.
param_str
);
}
static
void
shader_glsl_label
(
const
struct
wined3d_shader_instruction
*
ins
)
...
...
dlls/wined3d/shader.c
View file @
adf7c330
...
...
@@ -1439,12 +1439,12 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
{
switch
(
ins
.
flags
)
{
case
COMPARISON
_GT
:
TRACE
(
"_gt"
);
break
;
case
COMPARISON
_EQ
:
TRACE
(
"_eq"
);
break
;
case
COMPARISON
_GE
:
TRACE
(
"_ge"
);
break
;
case
COMPARISON
_LT
:
TRACE
(
"_lt"
);
break
;
case
COMPARISON
_NE
:
TRACE
(
"_ne"
);
break
;
case
COMPARISON
_LE
:
TRACE
(
"_le"
);
break
;
case
WINED3D_SHADER_REL_OP
_GT
:
TRACE
(
"_gt"
);
break
;
case
WINED3D_SHADER_REL_OP
_EQ
:
TRACE
(
"_eq"
);
break
;
case
WINED3D_SHADER_REL_OP
_GE
:
TRACE
(
"_ge"
);
break
;
case
WINED3D_SHADER_REL_OP
_LT
:
TRACE
(
"_lt"
);
break
;
case
WINED3D_SHADER_REL_OP
_NE
:
TRACE
(
"_ne"
);
break
;
case
WINED3D_SHADER_REL_OP
_LE
:
TRACE
(
"_le"
);
break
;
default:
TRACE
(
"_(%u)"
,
ins
.
flags
);
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
adf7c330
...
...
@@ -360,15 +360,15 @@ typedef enum _WINED3DSHADER_PARAM_DSTMOD_TYPE
#define WINED3DSI_TEXLD_PROJECT 1
#define WINED3DSI_TEXLD_BIAS 2
typedef
enum
COMPARISON_TYPE
{
COMPARISON
_GT
=
1
,
COMPARISON
_EQ
=
2
,
COMPARISON
_GE
=
3
,
COMPARISON
_LT
=
4
,
COMPARISON
_NE
=
5
,
COMPARISON
_LE
=
6
,
}
COMPARISON_TYPE
;
enum
wined3d_shader_rel_op
{
WINED3D_SHADER_REL_OP
_GT
=
1
,
WINED3D_SHADER_REL_OP
_EQ
=
2
,
WINED3D_SHADER_REL_OP
_GE
=
3
,
WINED3D_SHADER_REL_OP
_LT
=
4
,
WINED3D_SHADER_REL_OP
_NE
=
5
,
WINED3D_SHADER_REL_OP
_LE
=
6
,
};
#define WINED3D_SM1_VS 0xfffe
#define WINED3D_SM1_PS 0xffff
...
...
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