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
1ec60967
Commit
1ec60967
authored
Dec 20, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DCMPFUNC typedef.
parent
b79dc388
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
37 deletions
+45
-37
state.c
dlls/wined3d/state.c
+30
-4
stateblock.c
dlls/wined3d/stateblock.c
+4
-4
utils.c
dlls/wined3d/utils.c
+0
-16
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-1
wined3d.h
include/wine/wined3d.h
+11
-12
No files found.
dlls/wined3d/state.c
View file @
1ec60967
...
...
@@ -202,9 +202,35 @@ static void state_zwritenable(struct wined3d_context *context, const struct wine
}
}
static
GLenum
gl_compare_func
(
enum
wined3d_cmp_func
f
)
{
switch
(
f
)
{
case
WINED3D_CMP_NEVER
:
return
GL_NEVER
;
case
WINED3D_CMP_LESS
:
return
GL_LESS
;
case
WINED3D_CMP_EQUAL
:
return
GL_EQUAL
;
case
WINED3D_CMP_LESSEQUAL
:
return
GL_LEQUAL
;
case
WINED3D_CMP_GREATER
:
return
GL_GREATER
;
case
WINED3D_CMP_NOTEQUAL
:
return
GL_NOTEQUAL
;
case
WINED3D_CMP_GREATEREQUAL
:
return
GL_GEQUAL
;
case
WINED3D_CMP_ALWAYS
:
return
GL_ALWAYS
;
default:
FIXME
(
"Unrecognized compare function %#x.
\n
"
,
f
);
return
GL_NONE
;
}
}
static
void
state_zfunc
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
GLenum
depth_func
=
CompareF
unc
(
state
->
render_states
[
WINED3D_RS_ZFUNC
]);
GLenum
depth_func
=
gl_compare_f
unc
(
state
->
render_states
[
WINED3D_RS_ZFUNC
]);
if
(
!
depth_func
)
return
;
...
...
@@ -530,7 +556,7 @@ static void state_alpha(struct wined3d_context *context, const struct wined3d_st
else
{
ref
=
((
float
)
state
->
render_states
[
WINED3D_RS_ALPHAREF
])
/
255
.
0
f
;
glParm
=
CompareF
unc
(
state
->
render_states
[
WINED3D_RS_ALPHAFUNC
]);
glParm
=
gl_compare_f
unc
(
state
->
render_states
[
WINED3D_RS_ALPHAFUNC
]);
}
if
(
glParm
)
{
glAlphaFunc
(
glParm
,
ref
);
...
...
@@ -801,9 +827,9 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
onesided_enable
=
state
->
render_states
[
WINED3D_RS_STENCILENABLE
];
twosided_enable
=
state
->
render_states
[
WINED3D_RS_TWOSIDEDSTENCILMODE
];
if
(
!
(
func
=
CompareF
unc
(
state
->
render_states
[
WINED3D_RS_STENCILFUNC
])))
if
(
!
(
func
=
gl_compare_f
unc
(
state
->
render_states
[
WINED3D_RS_STENCILFUNC
])))
func
=
GL_ALWAYS
;
if
(
!
(
func_ccw
=
CompareF
unc
(
state
->
render_states
[
WINED3D_RS_CCW_STENCILFUNC
])))
if
(
!
(
func_ccw
=
gl_compare_f
unc
(
state
->
render_states
[
WINED3D_RS_CCW_STENCILFUNC
])))
func_ccw
=
GL_ALWAYS
;
ref
=
state
->
render_states
[
WINED3D_RS_STENCILREF
];
mask
=
state
->
render_states
[
WINED3D_RS_STENCILMASK
];
...
...
dlls/wined3d/stateblock.c
View file @
1ec60967
...
...
@@ -1134,8 +1134,8 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state
->
render_states
[
WINED3D_RS_SRCBLEND
]
=
WINED3D_BLEND_ONE
;
state
->
render_states
[
WINED3D_RS_DESTBLEND
]
=
WINED3D_BLEND_ZERO
;
state
->
render_states
[
WINED3D_RS_CULLMODE
]
=
WINED3DCULL_CCW
;
state
->
render_states
[
WINED3D_RS_ZFUNC
]
=
WINED3DCMP_LESSEQUAL
;
state
->
render_states
[
WINED3D_RS_ALPHAFUNC
]
=
WINED3DCMP_ALWAYS
;
state
->
render_states
[
WINED3D_RS_ZFUNC
]
=
WINED3D
_
CMP_LESSEQUAL
;
state
->
render_states
[
WINED3D_RS_ALPHAFUNC
]
=
WINED3D
_
CMP_ALWAYS
;
state
->
render_states
[
WINED3D_RS_ALPHAREF
]
=
0
;
state
->
render_states
[
WINED3D_RS_DITHERENABLE
]
=
FALSE
;
state
->
render_states
[
WINED3D_RS_ALPHABLENDENABLE
]
=
FALSE
;
...
...
@@ -1158,7 +1158,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state
->
render_states
[
WINED3D_RS_STENCILPASS
]
=
WINED3DSTENCILOP_KEEP
;
state
->
render_states
[
WINED3D_RS_STENCILREF
]
=
0
;
state
->
render_states
[
WINED3D_RS_STENCILMASK
]
=
0xffffffff
;
state
->
render_states
[
WINED3D_RS_STENCILFUNC
]
=
WINED3DCMP_ALWAYS
;
state
->
render_states
[
WINED3D_RS_STENCILFUNC
]
=
WINED3D
_
CMP_ALWAYS
;
state
->
render_states
[
WINED3D_RS_STENCILWRITEMASK
]
=
0xffffffff
;
state
->
render_states
[
WINED3D_RS_TEXTUREFACTOR
]
=
0xffffffff
;
state
->
render_states
[
WINED3D_RS_WRAP0
]
=
0
;
...
...
@@ -1229,7 +1229,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state
->
render_states
[
WINED3D_RS_CCW_STENCILFAIL
]
=
WINED3DSTENCILOP_KEEP
;
state
->
render_states
[
WINED3D_RS_CCW_STENCILZFAIL
]
=
WINED3DSTENCILOP_KEEP
;
state
->
render_states
[
WINED3D_RS_CCW_STENCILPASS
]
=
WINED3DSTENCILOP_KEEP
;
state
->
render_states
[
WINED3D_RS_CCW_STENCILFUNC
]
=
WINED3DCMP_ALWAYS
;
state
->
render_states
[
WINED3D_RS_CCW_STENCILFUNC
]
=
WINED3D
_
CMP_ALWAYS
;
state
->
render_states
[
WINED3D_RS_COLORWRITEENABLE1
]
=
0x0000000f
;
state
->
render_states
[
WINED3D_RS_COLORWRITEENABLE2
]
=
0x0000000f
;
state
->
render_states
[
WINED3D_RS_COLORWRITEENABLE3
]
=
0x0000000f
;
...
...
dlls/wined3d/utils.c
View file @
1ec60967
...
...
@@ -2496,22 +2496,6 @@ GLenum StencilOp(DWORD op) {
}
}
GLenum
CompareFunc
(
DWORD
func
)
{
switch
((
WINED3DCMPFUNC
)
func
)
{
case
WINED3DCMP_NEVER
:
return
GL_NEVER
;
case
WINED3DCMP_LESS
:
return
GL_LESS
;
case
WINED3DCMP_EQUAL
:
return
GL_EQUAL
;
case
WINED3DCMP_LESSEQUAL
:
return
GL_LEQUAL
;
case
WINED3DCMP_GREATER
:
return
GL_GREATER
;
case
WINED3DCMP_NOTEQUAL
:
return
GL_NOTEQUAL
;
case
WINED3DCMP_GREATEREQUAL
:
return
GL_GEQUAL
;
case
WINED3DCMP_ALWAYS
:
return
GL_ALWAYS
;
default:
FIXME
(
"Unrecognized WINED3DCMPFUNC value %d
\n
"
,
func
);
return
0
;
}
}
BOOL
is_invalid_op
(
const
struct
wined3d_state
*
state
,
int
stage
,
WINED3DTEXTUREOP
op
,
DWORD
arg1
,
DWORD
arg2
,
DWORD
arg3
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
1ec60967
...
...
@@ -2492,7 +2492,6 @@ const char *debug_surflocation(DWORD flag) DECLSPEC_HIDDEN;
/* Routines for GL <-> D3D values */
GLenum
StencilOp
(
DWORD
op
)
DECLSPEC_HIDDEN
;
GLenum
CompareFunc
(
DWORD
func
)
DECLSPEC_HIDDEN
;
BOOL
is_invalid_op
(
const
struct
wined3d_state
*
state
,
int
stage
,
WINED3DTEXTUREOP
op
,
DWORD
arg1
,
DWORD
arg2
,
DWORD
arg3
)
DECLSPEC_HIDDEN
;
void
set_tex_op_nvrc
(
const
struct
wined3d_gl_info
*
gl_info
,
const
struct
wined3d_state
*
state
,
...
...
include/wine/wined3d.h
View file @
1ec60967
...
...
@@ -421,18 +421,17 @@ enum wined3d_vertex_blend_flags
WINED3D_VBF_0WEIGHTS
=
256
,
};
typedef
enum
_WINED3DCMPFUNC
{
WINED3DCMP_NEVER
=
1
,
WINED3DCMP_LESS
=
2
,
WINED3DCMP_EQUAL
=
3
,
WINED3DCMP_LESSEQUAL
=
4
,
WINED3DCMP_GREATER
=
5
,
WINED3DCMP_NOTEQUAL
=
6
,
WINED3DCMP_GREATEREQUAL
=
7
,
WINED3DCMP_ALWAYS
=
8
,
WINED3DCMP_FORCE_DWORD
=
0x7fffffff
}
WINED3DCMPFUNC
;
enum
wined3d_cmp_func
{
WINED3D_CMP_NEVER
=
1
,
WINED3D_CMP_LESS
=
2
,
WINED3D_CMP_EQUAL
=
3
,
WINED3D_CMP_LESSEQUAL
=
4
,
WINED3D_CMP_GREATER
=
5
,
WINED3D_CMP_NOTEQUAL
=
6
,
WINED3D_CMP_GREATEREQUAL
=
7
,
WINED3D_CMP_ALWAYS
=
8
,
};
typedef
enum
_WINED3DZBUFFERTYPE
{
...
...
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