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
fb2dac96
Commit
fb2dac96
authored
Sep 26, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: Implement d3d10_effect_blend_variable_GetBlendState().
parent
13c00a9d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
2 deletions
+51
-2
d3d10_private.h
dlls/d3d10/d3d10_private.h
+4
-0
effect.c
dlls/d3d10/effect.c
+47
-2
No files found.
dlls/d3d10/d3d10_private.h
View file @
fb2dac96
...
...
@@ -109,6 +109,10 @@ struct d3d10_effect_state_object_variable
D3D10_BLEND_DESC
blend
;
D3D10_SAMPLER_DESC
sampler
;
}
desc
;
union
{
ID3D10BlendState
*
blend
;
}
object
;
};
/* ID3D10EffectType */
...
...
dlls/d3d10/effect.c
View file @
fb2dac96
...
...
@@ -1561,6 +1561,32 @@ static HRESULT parse_fx10_variable(struct d3d10_effect_variable *v, const char *
return
S_OK
;
}
static
HRESULT
create_state_object
(
struct
d3d10_effect_variable
*
v
)
{
ID3D10Device
*
device
=
v
->
effect
->
device
;
HRESULT
hr
;
switch
(
v
->
type
->
basetype
)
{
case
D3D10_SVT_BLEND
:
if
(
FAILED
(
hr
=
ID3D10Device_CreateBlendState
(
device
,
&
v
->
u
.
state
.
desc
.
blend
,
&
v
->
u
.
state
.
object
.
blend
)))
return
hr
;
break
;
case
D3D10_SVT_DEPTHSTENCIL
:
case
D3D10_SVT_RASTERIZER
:
case
D3D10_SVT_SAMPLER
:
break
;
default:
ERR
(
"Unhandled variable type %s.
\n
"
,
debug_d3d10_shader_variable_type
(
v
->
type
->
basetype
));
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
parse_fx10_local_variable
(
struct
d3d10_effect_variable
*
v
,
const
char
**
ptr
,
const
char
*
data
)
{
unsigned
int
i
;
...
...
@@ -1660,6 +1686,9 @@ static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const
ERR
(
"Failed to read property list.
\n
"
);
return
E_FAIL
;
}
if
(
FAILED
(
hr
=
create_state_object
(
v
)))
return
hr
;
}
}
break
;
...
...
@@ -5984,9 +6013,25 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetRawValue(ID3D10E
static
HRESULT
STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBlendState
(
ID3D10EffectBlendVariable
*
iface
,
UINT
index
,
ID3D10BlendState
**
blend_state
)
{
FIXME
(
"iface %p, index %u, blend_state %p stub!
\n
"
,
iface
,
index
,
blend_stat
e
);
struct
d3d10_effect_variable
*
v
=
impl_from_ID3D10EffectVariable
((
ID3D10EffectVariable
*
)
ifac
e
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, index %u, blend_state %p.
\n
"
,
iface
,
index
,
blend_state
);
if
(
v
->
type
->
element_count
)
v
=
impl_from_ID3D10EffectVariable
(
iface
->
lpVtbl
->
GetElement
(
iface
,
index
));
else
if
(
index
)
return
E_FAIL
;
if
(
v
->
type
->
basetype
!=
D3D10_SVT_BLEND
)
{
WARN
(
"Variable is not a blend state.
\n
"
);
return
E_FAIL
;
}
if
((
*
blend_state
=
v
->
u
.
state
.
object
.
blend
))
ID3D10BlendState_AddRef
(
*
blend_state
);
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBackingStore
(
ID3D10EffectBlendVariable
*
iface
,
...
...
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