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
fd8597b2
Commit
fd8597b2
authored
Jan 03, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DSTENCILOP typedef.
parent
808e9267
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
45 deletions
+49
-45
state.c
dlls/wined3d/state.c
+32
-6
stateblock.c
dlls/wined3d/stateblock.c
+6
-6
utils.c
dlls/wined3d/utils.c
+0
-19
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-2
wined3d.h
include/wine/wined3d.h
+11
-12
No files found.
dlls/wined3d/state.c
View file @
fd8597b2
...
...
@@ -801,6 +801,32 @@ static void renderstate_stencil_twosided(struct wined3d_context *context, GLint
checkGLcall
(
"glStencilOp(...)"
);
}
static
GLenum
gl_stencil_op
(
enum
wined3d_stencil_op
op
)
{
switch
(
op
)
{
case
WINED3D_STENCIL_OP_KEEP
:
return
GL_KEEP
;
case
WINED3D_STENCIL_OP_ZERO
:
return
GL_ZERO
;
case
WINED3D_STENCIL_OP_REPLACE
:
return
GL_REPLACE
;
case
WINED3D_STENCIL_OP_INCR_SAT
:
return
GL_INCR
;
case
WINED3D_STENCIL_OP_DECR_SAT
:
return
GL_DECR
;
case
WINED3D_STENCIL_OP_INVERT
:
return
GL_INVERT
;
case
WINED3D_STENCIL_OP_INCR
:
return
GL_INCR_WRAP_EXT
;
case
WINED3D_STENCIL_OP_DECR
:
return
GL_DECR_WRAP_EXT
;
default:
FIXME
(
"Unrecognized stencil op %#x.
\n
"
,
op
);
return
GL_KEEP
;
}
}
static
void
state_stencil
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
...
...
@@ -833,12 +859,12 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
func_ccw
=
GL_ALWAYS
;
ref
=
state
->
render_states
[
WINED3D_RS_STENCILREF
];
mask
=
state
->
render_states
[
WINED3D_RS_STENCILMASK
];
stencilFail
=
StencilO
p
(
state
->
render_states
[
WINED3D_RS_STENCILFAIL
]);
depthFail
=
StencilO
p
(
state
->
render_states
[
WINED3D_RS_STENCILZFAIL
]);
stencilPass
=
StencilO
p
(
state
->
render_states
[
WINED3D_RS_STENCILPASS
]);
stencilFail_ccw
=
StencilO
p
(
state
->
render_states
[
WINED3D_RS_CCW_STENCILFAIL
]);
depthFail_ccw
=
StencilO
p
(
state
->
render_states
[
WINED3D_RS_CCW_STENCILZFAIL
]);
stencilPass_ccw
=
StencilO
p
(
state
->
render_states
[
WINED3D_RS_CCW_STENCILPASS
]);
stencilFail
=
gl_stencil_o
p
(
state
->
render_states
[
WINED3D_RS_STENCILFAIL
]);
depthFail
=
gl_stencil_o
p
(
state
->
render_states
[
WINED3D_RS_STENCILZFAIL
]);
stencilPass
=
gl_stencil_o
p
(
state
->
render_states
[
WINED3D_RS_STENCILPASS
]);
stencilFail_ccw
=
gl_stencil_o
p
(
state
->
render_states
[
WINED3D_RS_CCW_STENCILFAIL
]);
depthFail_ccw
=
gl_stencil_o
p
(
state
->
render_states
[
WINED3D_RS_CCW_STENCILZFAIL
]);
stencilPass_ccw
=
gl_stencil_o
p
(
state
->
render_states
[
WINED3D_RS_CCW_STENCILPASS
]);
TRACE
(
"(onesided %d, twosided %d, ref %x, mask %x, "
"GL_FRONT: func: %x, fail %x, zfail %x, zpass %x "
...
...
dlls/wined3d/stateblock.c
View file @
fd8597b2
...
...
@@ -1153,9 +1153,9 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state
->
render_states
[
WINED3D_RS_EDGEANTIALIAS
]
=
FALSE
;
state
->
render_states
[
WINED3D_RS_RANGEFOGENABLE
]
=
FALSE
;
state
->
render_states
[
WINED3D_RS_STENCILENABLE
]
=
FALSE
;
state
->
render_states
[
WINED3D_RS_STENCILFAIL
]
=
WINED3D
STENCIL
OP_KEEP
;
state
->
render_states
[
WINED3D_RS_STENCILZFAIL
]
=
WINED3D
STENCIL
OP_KEEP
;
state
->
render_states
[
WINED3D_RS_STENCILPASS
]
=
WINED3D
STENCIL
OP_KEEP
;
state
->
render_states
[
WINED3D_RS_STENCILFAIL
]
=
WINED3D
_STENCIL_
OP_KEEP
;
state
->
render_states
[
WINED3D_RS_STENCILZFAIL
]
=
WINED3D
_STENCIL_
OP_KEEP
;
state
->
render_states
[
WINED3D_RS_STENCILPASS
]
=
WINED3D
_STENCIL_
OP_KEEP
;
state
->
render_states
[
WINED3D_RS_STENCILREF
]
=
0
;
state
->
render_states
[
WINED3D_RS_STENCILMASK
]
=
0xffffffff
;
state
->
render_states
[
WINED3D_RS_STENCILFUNC
]
=
WINED3D_CMP_ALWAYS
;
...
...
@@ -1226,9 +1226,9 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state
->
render_states
[
WINED3D_RS_ADAPTIVETESS_W
]
=
tmpfloat
.
d
;
state
->
render_states
[
WINED3D_RS_ENABLEADAPTIVETESSELLATION
]
=
FALSE
;
state
->
render_states
[
WINED3D_RS_TWOSIDEDSTENCILMODE
]
=
FALSE
;
state
->
render_states
[
WINED3D_RS_CCW_STENCILFAIL
]
=
WINED3D
STENCIL
OP_KEEP
;
state
->
render_states
[
WINED3D_RS_CCW_STENCILZFAIL
]
=
WINED3D
STENCIL
OP_KEEP
;
state
->
render_states
[
WINED3D_RS_CCW_STENCILPASS
]
=
WINED3D
STENCIL
OP_KEEP
;
state
->
render_states
[
WINED3D_RS_CCW_STENCILFAIL
]
=
WINED3D
_STENCIL_
OP_KEEP
;
state
->
render_states
[
WINED3D_RS_CCW_STENCILZFAIL
]
=
WINED3D
_STENCIL_
OP_KEEP
;
state
->
render_states
[
WINED3D_RS_CCW_STENCILPASS
]
=
WINED3D
_STENCIL_
OP_KEEP
;
state
->
render_states
[
WINED3D_RS_CCW_STENCILFUNC
]
=
WINED3D_CMP_ALWAYS
;
state
->
render_states
[
WINED3D_RS_COLORWRITEENABLE1
]
=
0x0000000f
;
state
->
render_states
[
WINED3D_RS_COLORWRITEENABLE2
]
=
0x0000000f
;
...
...
dlls/wined3d/utils.c
View file @
fd8597b2
...
...
@@ -2477,25 +2477,6 @@ const char *debug_surflocation(DWORD flag) {
return
wine_dbg_sprintf
(
"%s"
,
buf
[
0
]
?
buf
+
3
:
"0"
);
}
/*****************************************************************************
* Useful functions mapping GL <-> D3D values
*/
GLenum
StencilOp
(
DWORD
op
)
{
switch
(
op
)
{
case
WINED3DSTENCILOP_KEEP
:
return
GL_KEEP
;
case
WINED3DSTENCILOP_ZERO
:
return
GL_ZERO
;
case
WINED3DSTENCILOP_REPLACE
:
return
GL_REPLACE
;
case
WINED3DSTENCILOP_INCRSAT
:
return
GL_INCR
;
case
WINED3DSTENCILOP_DECRSAT
:
return
GL_DECR
;
case
WINED3DSTENCILOP_INVERT
:
return
GL_INVERT
;
case
WINED3DSTENCILOP_INCR
:
return
GL_INCR_WRAP_EXT
;
case
WINED3DSTENCILOP_DECR
:
return
GL_DECR_WRAP_EXT
;
default:
FIXME
(
"Unrecognized stencil op %d
\n
"
,
op
);
return
GL_KEEP
;
}
}
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 @
fd8597b2
...
...
@@ -2515,8 +2515,6 @@ const char *debug_d3dtop(WINED3DTEXTUREOP d3dtop) DECLSPEC_HIDDEN;
void
dump_color_fixup_desc
(
struct
color_fixup_desc
fixup
)
DECLSPEC_HIDDEN
;
const
char
*
debug_surflocation
(
DWORD
flag
)
DECLSPEC_HIDDEN
;
/* Routines for GL <-> D3D values */
GLenum
StencilOp
(
DWORD
op
)
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 @
fd8597b2
...
...
@@ -469,18 +469,17 @@ enum wined3d_cull
WINED3D_CULL_CCW
=
3
,
};
typedef
enum
_WINED3DSTENCILOP
{
WINED3DSTENCILOP_KEEP
=
1
,
WINED3DSTENCILOP_ZERO
=
2
,
WINED3DSTENCILOP_REPLACE
=
3
,
WINED3DSTENCILOP_INCRSAT
=
4
,
WINED3DSTENCILOP_DECRSAT
=
5
,
WINED3DSTENCILOP_INVERT
=
6
,
WINED3DSTENCILOP_INCR
=
7
,
WINED3DSTENCILOP_DECR
=
8
,
WINED3DSTENCILOP_FORCE_DWORD
=
0x7fffffff
}
WINED3DSTENCILOP
;
enum
wined3d_stencil_op
{
WINED3D_STENCIL_OP_KEEP
=
1
,
WINED3D_STENCIL_OP_ZERO
=
2
,
WINED3D_STENCIL_OP_REPLACE
=
3
,
WINED3D_STENCIL_OP_INCR_SAT
=
4
,
WINED3D_STENCIL_OP_DECR_SAT
=
5
,
WINED3D_STENCIL_OP_INVERT
=
6
,
WINED3D_STENCIL_OP_INCR
=
7
,
WINED3D_STENCIL_OP_DECR
=
8
,
};
typedef
enum
_WINED3DMATERIALCOLORSOURCE
{
...
...
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