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
eda5c393
Commit
eda5c393
authored
Oct 08, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: Handle blend state in d3d10_effect_object_apply().
parent
cf799f58
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
8 deletions
+22
-8
d3d10_private.h
dlls/d3d10/d3d10_private.h
+1
-0
effect.c
dlls/d3d10/effect.c
+19
-1
effect.c
dlls/d3d10/tests/effect.c
+2
-7
No files found.
dlls/d3d10/d3d10_private.h
View file @
eda5c393
...
...
@@ -76,6 +76,7 @@ struct d3d10_effect_object
{
ID3D10RasterizerState
*
rs
;
ID3D10DepthStencilState
*
ds
;
ID3D10BlendState
*
bs
;
ID3D10VertexShader
*
vs
;
ID3D10PixelShader
*
ps
;
ID3D10GeometryShader
*
gs
;
...
...
dlls/d3d10/effect.c
View file @
eda5c393
...
...
@@ -1355,6 +1355,14 @@ static HRESULT parse_fx10_object(struct d3d10_effect_object *o, const char **ptr
break
;
}
case
D3D10_EOT_BLEND_STATE
:
{
ID3D10EffectBlendVariable
*
bv
=
variable
->
lpVtbl
->
AsBlend
(
variable
);
if
(
FAILED
(
hr
=
bv
->
lpVtbl
->
GetBlendState
(
bv
,
variable_idx
,
&
o
->
object
.
bs
)))
return
hr
;
break
;
}
case
D3D10_EOT_VERTEXSHADER
:
{
ID3D10EffectShaderVariable
*
sv
=
variable
->
lpVtbl
->
AsShader
(
variable
);
...
...
@@ -1385,7 +1393,6 @@ static HRESULT parse_fx10_object(struct d3d10_effect_object *o, const char **ptr
break
;
}
case
D3D10_EOT_BLEND_STATE
:
case
D3D10_EOT_STENCIL_REF
:
case
D3D10_EOT_BLEND_FACTOR
:
case
D3D10_EOT_SAMPLE_MASK
:
...
...
@@ -2181,6 +2188,10 @@ static HRESULT d3d10_effect_object_apply(struct d3d10_effect_object *o)
ID3D10Device_OMSetDepthStencilState
(
device
,
o
->
object
.
ds
,
o
->
pass
->
stencil_ref
);
return
S_OK
;
case
D3D10_EOT_BLEND_STATE
:
ID3D10Device_OMSetBlendState
(
device
,
o
->
object
.
bs
,
o
->
pass
->
blend_factor
,
o
->
pass
->
sample_mask
);
return
S_OK
;
case
D3D10_EOT_VERTEXSHADER
:
ID3D10Device_VSSetShader
(
device
,
o
->
object
.
vs
);
return
S_OK
;
...
...
@@ -2194,6 +2205,8 @@ static HRESULT d3d10_effect_object_apply(struct d3d10_effect_object *o)
return
S_OK
;
case
D3D10_EOT_STENCIL_REF
:
case
D3D10_EOT_BLEND_FACTOR
:
case
D3D10_EOT_SAMPLE_MASK
:
return
S_OK
;
default:
...
...
@@ -2293,6 +2306,11 @@ static void d3d10_effect_object_destroy(struct d3d10_effect_object *o)
ID3D10DepthStencilState_Release
(
o
->
object
.
ds
);
break
;
case
D3D10_EOT_BLEND_STATE
:
if
(
o
->
object
.
bs
)
ID3D10BlendState_Release
(
o
->
object
.
bs
);
break
;
case
D3D10_EOT_VERTEXSHADER
:
if
(
o
->
object
.
vs
)
ID3D10VertexShader_Release
(
o
->
object
.
vs
);
...
...
dlls/d3d10/tests/effect.c
View file @
eda5c393
...
...
@@ -3922,12 +3922,7 @@ static void test_effect_state_groups(ID3D10Device *device)
ok
(
pass_desc
.
BlendFactor
[
2
]
==
0
.
7
f
,
"Got unexpected BlendFactor[2] %.8e.
\n
"
,
pass_desc
.
BlendFactor
[
2
]);
ok
(
pass_desc
.
BlendFactor
[
3
]
==
0
.
8
f
,
"Got unexpected BlendFactor[3] %.8e.
\n
"
,
pass_desc
.
BlendFactor
[
3
]);
hr
=
pass
->
lpVtbl
->
Apply
(
pass
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to apply pass, hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
hr
))
{
effect
->
lpVtbl
->
Release
(
effect
);
return
;
}
ok
(
SUCCEEDED
(
hr
),
"Failed to apply pass, hr %#x.
\n
"
,
hr
);
ID3D10Device_OMGetBlendState
(
device
,
&
blend_state
,
blend_factor
,
&
sample_mask
);
ID3D10BlendState_GetDesc
(
blend_state
,
&
blend_desc
);
...
...
@@ -3958,7 +3953,7 @@ static void test_effect_state_groups(ID3D10Device *device)
ok
(
!
ds_desc
.
DepthEnable
,
"Got unexpected DepthEnable %#x.
\n
"
,
ds_desc
.
DepthEnable
);
ok
(
ds_desc
.
DepthWriteMask
==
D3D10_DEPTH_WRITE_MASK_ZERO
,
"Got unexpected DepthWriteMask %#x.
\n
"
,
ds_desc
.
DepthWriteMask
);
ok
(
ds_desc
.
DepthFunc
==
D3D10_COMPARISON_NEVER
,
"Got unexpected DepthFunc %#x.
\n
"
,
ds_desc
.
DepthFunc
);
todo_wine
ok
(
ds_desc
.
DepthFunc
==
D3D10_COMPARISON_NEVER
,
"Got unexpected DepthFunc %#x.
\n
"
,
ds_desc
.
DepthFunc
);
ok
(
ds_desc
.
StencilEnable
,
"Got unexpected StencilEnable %#x.
\n
"
,
ds_desc
.
StencilEnable
);
ok
(
ds_desc
.
StencilReadMask
==
0x4
,
"Got unexpected StencilReadMask %#x.
\n
"
,
ds_desc
.
StencilReadMask
);
ok
(
ds_desc
.
StencilWriteMask
==
0x5
,
"Got unexpected StencilWriteMask %#x.
\n
"
,
ds_desc
.
StencilWriteMask
);
...
...
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