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
ed9188c4
Commit
ed9188c4
authored
Nov 04, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Set wined3d state in d3d10_device_OMSetBlendState().
parent
875a7c54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
6 deletions
+44
-6
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+0
-1
device.c
dlls/d3d10core/device.c
+44
-5
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
ed9188c4
...
...
@@ -325,7 +325,6 @@ struct d3d10_device
struct
d3d10_blend_state
*
blend_state
;
float
blend_factor
[
4
];
UINT
sample_mask
;
struct
d3d10_depthstencil_state
*
depth_stencil_state
;
UINT
stencil_ref
;
struct
d3d10_rasterizer_state
*
rasterizer_state
;
...
...
dlls/d3d10core/device.c
View file @
ed9188c4
...
...
@@ -462,13 +462,53 @@ static void STDMETHODCALLTYPE d3d10_device_OMSetBlendState(ID3D10Device1 *iface,
ID3D10BlendState
*
blend_state
,
const
FLOAT
blend_factor
[
4
],
UINT
sample_mask
)
{
struct
d3d10_device
*
device
=
impl_from_ID3D10Device
(
iface
);
const
D3D10_BLEND_DESC
*
desc
;
TRACE
(
"iface %p, blend_state %p, blend_factor
[%f %f %f %f]
, sample_mask 0x%08x.
\n
"
,
TRACE
(
"iface %p, blend_state %p, blend_factor
{%.8e %.8e %.8e %.8e}
, sample_mask 0x%08x.
\n
"
,
iface
,
blend_state
,
blend_factor
[
0
],
blend_factor
[
1
],
blend_factor
[
2
],
blend_factor
[
3
],
sample_mask
);
device
->
blend_state
=
unsafe_impl_from_ID3D10BlendState
(
blend_state
);
if
(
blend_factor
[
0
]
!=
1
.
0
f
||
blend_factor
[
1
]
!=
1
.
0
f
||
blend_factor
[
2
]
!=
1
.
0
f
||
blend_factor
[
3
]
!=
1
.
0
f
)
FIXME
(
"Ignoring blend factor {%.8e %.8e %.8e %.8e}.
\n
"
,
blend_factor
[
0
],
blend_factor
[
1
],
blend_factor
[
2
],
blend_factor
[
3
]);
memcpy
(
device
->
blend_factor
,
blend_factor
,
4
*
sizeof
(
*
blend_factor
));
device
->
sample_mask
=
sample_mask
;
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_MULTISAMPLEMASK
,
sample_mask
);
if
(
!
(
device
->
blend_state
=
unsafe_impl_from_ID3D10BlendState
(
blend_state
)))
{
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_ALPHABLENDENABLE
,
FALSE
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_COLORWRITEENABLE
,
D3D10_COLOR_WRITE_ENABLE_ALL
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_COLORWRITEENABLE1
,
D3D10_COLOR_WRITE_ENABLE_ALL
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_COLORWRITEENABLE2
,
D3D10_COLOR_WRITE_ENABLE_ALL
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_COLORWRITEENABLE3
,
D3D10_COLOR_WRITE_ENABLE_ALL
);
return
;
}
desc
=
&
device
->
blend_state
->
desc
;
/* glSampleCoverage() */
if
(
desc
->
AlphaToCoverageEnable
)
FIXME
(
"Ignoring AlphaToCoverageEnable %#x.
\n
"
,
desc
->
AlphaToCoverageEnable
);
/* glEnableIndexedEXT(GL_BLEND, ...) */
FIXME
(
"Per-rendertarget blend enable not implemented.
\n
"
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_ALPHABLENDENABLE
,
desc
->
BlendEnable
[
0
]);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_SRCBLEND
,
desc
->
SrcBlend
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_DESTBLEND
,
desc
->
DestBlend
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_BLENDOP
,
desc
->
BlendOp
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_SEPARATEALPHABLENDENABLE
,
TRUE
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_SRCBLENDALPHA
,
desc
->
SrcBlendAlpha
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_DESTBLENDALPHA
,
desc
->
DestBlendAlpha
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_BLENDOPALPHA
,
desc
->
BlendOpAlpha
);
FIXME
(
"Color mask > 3 not implemented.
\n
"
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_COLORWRITEENABLE
,
desc
->
RenderTargetWriteMask
[
0
]);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_COLORWRITEENABLE1
,
desc
->
RenderTargetWriteMask
[
1
]);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_COLORWRITEENABLE2
,
desc
->
RenderTargetWriteMask
[
2
]);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_COLORWRITEENABLE3
,
desc
->
RenderTargetWriteMask
[
3
]);
}
static
void
STDMETHODCALLTYPE
d3d10_device_OMSetDepthStencilState
(
ID3D10Device1
*
iface
,
...
...
@@ -1105,7 +1145,7 @@ static void STDMETHODCALLTYPE d3d10_device_OMGetBlendState(ID3D10Device1 *iface,
if
((
*
blend_state
=
device
->
blend_state
?
&
device
->
blend_state
->
ID3D10BlendState_iface
:
NULL
))
ID3D10BlendState_AddRef
(
*
blend_state
);
memcpy
(
blend_factor
,
device
->
blend_factor
,
4
*
sizeof
(
*
blend_factor
));
*
sample_mask
=
device
->
sample_mask
;
*
sample_mask
=
wined3d_device_get_render_state
(
device
->
wined3d_device
,
WINED3D_RS_MULTISAMPLEMASK
)
;
}
static
void
STDMETHODCALLTYPE
d3d10_device_OMGetDepthStencilState
(
ID3D10Device1
*
iface
,
...
...
@@ -2414,7 +2454,6 @@ HRESULT d3d10_device_init(struct d3d10_device *device, void *outer_unknown)
device
->
blend_factor
[
1
]
=
1
.
0
f
;
device
->
blend_factor
[
2
]
=
1
.
0
f
;
device
->
blend_factor
[
3
]
=
1
.
0
f
;
device
->
sample_mask
=
D3D10_DEFAULT_SAMPLE_MASK
;
if
(
wine_rb_init
(
&
device
->
depthstencil_states
,
&
d3d10_depthstencil_state_rb_ops
)
==
-
1
)
{
...
...
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