Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
65552452
Commit
65552452
authored
Oct 24, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d11: Explicitly convert enums in d3d_depthstencil_state_create.
parent
9c4bcd0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
state.c
dlls/d3d11/state.c
+19
-14
No files found.
dlls/d3d11/state.c
View file @
65552452
...
...
@@ -738,6 +738,16 @@ static const struct wined3d_parent_ops d3d_depthstencil_state_wined3d_parent_ops
d3d_depthstencil_state_wined3d_object_destroyed
,
};
static
enum
wined3d_cmp_func
wined3d_cmp_func_from_d3d11
(
D3D11_COMPARISON_FUNC
func
)
{
return
(
enum
wined3d_cmp_func
)
func
;
}
static
enum
wined3d_stencil_op
wined3d_stencil_op_from_d3d11
(
D3D11_STENCIL_OP
stencil_op
)
{
return
(
enum
wined3d_stencil_op
)
stencil_op
;
}
HRESULT
d3d_depthstencil_state_create
(
struct
d3d_device
*
device
,
const
D3D11_DEPTH_STENCIL_DESC
*
desc
,
struct
d3d_depthstencil_state
**
state
)
{
...
...
@@ -822,18 +832,18 @@ HRESULT d3d_depthstencil_state_create(struct d3d_device *device, const D3D11_DEP
wined3d_desc
.
depth
=
desc
->
DepthEnable
;
wined3d_desc
.
depth_write
=
desc
->
DepthWriteMask
;
wined3d_desc
.
depth_func
=
desc
->
DepthFunc
;
wined3d_desc
.
depth_func
=
wined3d_cmp_func_from_d3d11
(
desc
->
DepthFunc
)
;
wined3d_desc
.
stencil
=
desc
->
StencilEnable
;
wined3d_desc
.
stencil_read_mask
=
desc
->
StencilReadMask
;
wined3d_desc
.
stencil_write_mask
=
desc
->
StencilWriteMask
;
wined3d_desc
.
front
.
fail_op
=
desc
->
FrontFace
.
StencilFailOp
;
wined3d_desc
.
front
.
depth_fail_op
=
desc
->
FrontFace
.
StencilDepthFailOp
;
wined3d_desc
.
front
.
pass_op
=
desc
->
FrontFace
.
StencilPassOp
;
wined3d_desc
.
front
.
func
=
desc
->
FrontFace
.
StencilFunc
;
wined3d_desc
.
back
.
fail_op
=
desc
->
BackFace
.
StencilFailOp
;
wined3d_desc
.
back
.
depth_fail_op
=
desc
->
BackFace
.
StencilDepthFailOp
;
wined3d_desc
.
back
.
pass_op
=
desc
->
BackFace
.
StencilPassOp
;
wined3d_desc
.
back
.
func
=
desc
->
BackFace
.
StencilFunc
;
wined3d_desc
.
front
.
fail_op
=
wined3d_stencil_op_from_d3d11
(
desc
->
FrontFace
.
StencilFailOp
)
;
wined3d_desc
.
front
.
depth_fail_op
=
wined3d_stencil_op_from_d3d11
(
desc
->
FrontFace
.
StencilDepthFailOp
)
;
wined3d_desc
.
front
.
pass_op
=
wined3d_stencil_op_from_d3d11
(
desc
->
FrontFace
.
StencilPassOp
)
;
wined3d_desc
.
front
.
func
=
wined3d_cmp_func_from_d3d11
(
desc
->
FrontFace
.
StencilFunc
)
;
wined3d_desc
.
back
.
fail_op
=
wined3d_stencil_op_from_d3d11
(
desc
->
BackFace
.
StencilFailOp
)
;
wined3d_desc
.
back
.
depth_fail_op
=
wined3d_stencil_op_from_d3d11
(
desc
->
BackFace
.
StencilDepthFailOp
)
;
wined3d_desc
.
back
.
pass_op
=
wined3d_stencil_op_from_d3d11
(
desc
->
BackFace
.
StencilPassOp
)
;
wined3d_desc
.
back
.
func
=
wined3d_cmp_func_from_d3d11
(
desc
->
BackFace
.
StencilFunc
)
;
/* We cannot fail after creating a wined3d_depth_stencil_state object. It
* would lead to double free. */
...
...
@@ -1563,11 +1573,6 @@ static BOOL wined3d_texture_compare_from_d3d11(enum D3D11_FILTER f)
return
D3D11_DECODE_IS_COMPARISON_FILTER
(
f
);
}
static
enum
wined3d_cmp_func
wined3d_cmp_func_from_d3d11
(
D3D11_COMPARISON_FUNC
f
)
{
return
(
enum
wined3d_cmp_func
)
f
;
}
static
HRESULT
d3d_sampler_state_init
(
struct
d3d_sampler_state
*
state
,
struct
d3d_device
*
device
,
const
D3D11_SAMPLER_DESC
*
desc
)
{
...
...
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