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
e6b29add
Commit
e6b29add
authored
Jun 02, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: COM cleanup for the ID3D10EffectType iface.
parent
bc9407a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
28 deletions
+35
-28
d3d10_private.h
dlls/d3d10/d3d10_private.h
+1
-1
effect.c
dlls/d3d10/effect.c
+34
-27
No files found.
dlls/d3d10/d3d10_private.h
View file @
e6b29add
...
...
@@ -93,7 +93,7 @@ struct d3d10_effect_shader_variable
/* ID3D10EffectType */
struct
d3d10_effect_type
{
const
struct
ID3D10EffectTypeVtbl
*
vtbl
;
ID3D10EffectType
ID3D10EffectType_iface
;
char
*
name
;
D3D10_SHADER_VARIABLE_TYPE
basetype
;
...
...
dlls/d3d10/effect.c
View file @
e6b29add
...
...
@@ -60,7 +60,7 @@ static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl;
/* null objects - needed for invalid calls */
static
struct
d3d10_effect_technique
null_technique
=
{
&
d3d10_effect_technique_vtbl
};
static
struct
d3d10_effect_pass
null_pass
=
{
&
d3d10_effect_pass_vtbl
};
static
struct
d3d10_effect_type
null_type
=
{
&
d3d10_effect_type_vtbl
};
static
struct
d3d10_effect_type
null_type
=
{
{
&
d3d10_effect_type_vtbl
}
};
static
struct
d3d10_effect_variable
null_local_buffer
=
{(
const
ID3D10EffectVariableVtbl
*
)
&
d3d10_effect_constant_buffer_vtbl
,
&
null_local_buffer
,
&
null_type
};
static
struct
d3d10_effect_variable
null_variable
=
{
&
d3d10_effect_variable_vtbl
,
...
...
@@ -95,12 +95,12 @@ static char anonymous_name[] = "$Anonymous";
static
char
anonymous_vertexshader_name
[]
=
"vertexshader"
;
static
char
anonymous_pixelshader_name
[]
=
"pixelshader"
;
static
char
anonymous_geometryshader_name
[]
=
"geometryshader"
;
static
struct
d3d10_effect_type
anonymous_vs_type
=
{
&
d3d10_effect_type_vtbl
,
anonymous_vertexshader_name
,
D3D10_SVT_VERTEXSHADER
,
D3D10_SVC_OBJECT
};
static
struct
d3d10_effect_type
anonymous_ps_type
=
{
&
d3d10_effect_type_vtbl
,
anonymous_pixelshader_name
,
D3D10_SVT_PIXELSHADER
,
D3D10_SVC_OBJECT
};
static
struct
d3d10_effect_type
anonymous_gs_type
=
{
&
d3d10_effect_type_vtbl
,
anonymous_geometryshader_name
,
D3D10_SVT_GEOMETRYSHADER
,
D3D10_SVC_OBJECT
};
static
struct
d3d10_effect_type
anonymous_vs_type
=
{
{
&
d3d10_effect_type_vtbl
}
,
anonymous_vertexshader_name
,
D3D10_SVT_VERTEXSHADER
,
D3D10_SVC_OBJECT
};
static
struct
d3d10_effect_type
anonymous_ps_type
=
{
{
&
d3d10_effect_type_vtbl
}
,
anonymous_pixelshader_name
,
D3D10_SVT_PIXELSHADER
,
D3D10_SVC_OBJECT
};
static
struct
d3d10_effect_type
anonymous_gs_type
=
{
{
&
d3d10_effect_type_vtbl
}
,
anonymous_geometryshader_name
,
D3D10_SVT_GEOMETRYSHADER
,
D3D10_SVC_OBJECT
};
static
struct
d3d10_effect_variable
anonymous_vs
=
{(
const
ID3D10EffectVariableVtbl
*
)
&
d3d10_effect_shader_variable_vtbl
,
&
null_local_buffer
,
&
anonymous_vs_type
,
&
null_shader_variable
,
anonymous_name
};
static
struct
d3d10_effect_variable
anonymous_ps
=
{(
const
ID3D10EffectVariableVtbl
*
)
&
d3d10_effect_shader_variable_vtbl
,
...
...
@@ -524,7 +524,7 @@ static HRESULT parse_fx10_type(struct d3d10_effect_type *t, const char *ptr, con
}
/* create a copy of the original type with some minor changes */
t
->
elementtype
->
v
tbl
=
&
d3d10_effect_type_vtbl
;
t
->
elementtype
->
ID3D10EffectType_iface
.
lpV
tbl
=
&
d3d10_effect_type_vtbl
;
t
->
elementtype
->
effect
=
t
->
effect
;
if
(
!
copy_name
(
t
->
name
,
&
t
->
elementtype
->
name
))
...
...
@@ -591,7 +591,7 @@ static struct d3d10_effect_type *get_fx10_type(struct d3d10_effect *effect, cons
return
NULL
;
}
type
->
v
tbl
=
&
d3d10_effect_type_vtbl
;
type
->
ID3D10EffectType_iface
.
lpV
tbl
=
&
d3d10_effect_type_vtbl
;
type
->
id
=
offset
;
type
->
effect
=
effect
;
hr
=
parse_fx10_type
(
type
,
data
+
offset
,
data
);
...
...
@@ -867,7 +867,7 @@ static HRESULT parse_fx10_anonymous_shader(struct d3d10_effect *e, struct d3d10_
t
->
type_class
=
D3D10_SVC_OBJECT
;
t
->
v
tbl
=
&
d3d10_effect_type_vtbl
;
t
->
ID3D10EffectType_iface
.
lpV
tbl
=
&
d3d10_effect_type_vtbl
;
v
->
type
=
t
;
v
->
effect
=
e
;
...
...
@@ -1315,7 +1315,7 @@ static HRESULT parse_fx10_local_buffer(struct d3d10_effect_variable *l, const ch
ERR
(
"Failed to allocate local buffer type memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
l
->
type
->
v
tbl
=
&
d3d10_effect_type_vtbl
;
l
->
type
->
ID3D10EffectType_iface
.
lpV
tbl
=
&
d3d10_effect_type_vtbl
;
l
->
type
->
type_class
=
D3D10_SVC_OBJECT
;
l
->
type
->
effect
=
l
->
effect
;
...
...
@@ -2673,7 +2673,7 @@ static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_variable_GetType
TRACE
(
"iface %p
\n
"
,
iface
);
return
(
ID3D10EffectType
*
)
This
->
typ
e
;
return
&
This
->
type
->
ID3D10EffectType_ifac
e
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_effect_variable_GetDesc
(
ID3D10EffectVariable
*
iface
,
...
...
@@ -6187,16 +6187,23 @@ static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variabl
/* ID3D10EffectType methods */
static
inline
struct
d3d10_effect_type
*
impl_from_ID3D10EffectType
(
ID3D10EffectType
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3d10_effect_type
,
ID3D10EffectType_iface
);
}
static
BOOL
STDMETHODCALLTYPE
d3d10_effect_type_IsValid
(
ID3D10EffectType
*
iface
)
{
struct
d3d10_effect_type
*
This
=
impl_from_ID3D10EffectType
(
iface
);
TRACE
(
"iface %p
\n
"
,
iface
);
return
(
struct
d3d10_effect_type
*
)
iface
!=
&
null_type
;
return
This
!=
&
null_type
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_effect_type_GetDesc
(
ID3D10EffectType
*
iface
,
D3D10_EFFECT_TYPE_DESC
*
desc
)
{
struct
d3d10_effect_type
*
This
=
(
struct
d3d10_effect_type
*
)
iface
;
struct
d3d10_effect_type
*
This
=
impl_from_ID3D10EffectType
(
iface
)
;
TRACE
(
"iface %p, desc %p
\n
"
,
iface
,
desc
);
...
...
@@ -6229,7 +6236,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_type_GetDesc(ID3D10EffectType *ifa
static
struct
ID3D10EffectType
*
STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByIndex
(
ID3D10EffectType
*
iface
,
UINT
index
)
{
struct
d3d10_effect_type
*
This
=
(
struct
d3d10_effect_type
*
)
iface
;
struct
d3d10_effect_type
*
This
=
impl_from_ID3D10EffectType
(
iface
)
;
struct
d3d10_effect_type
*
t
;
TRACE
(
"iface %p, index %u
\n
"
,
iface
,
index
);
...
...
@@ -6237,20 +6244,20 @@ static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTy
if
(
index
>=
This
->
member_count
)
{
WARN
(
"Invalid index specified
\n
"
);
return
(
ID3D10EffectType
*
)
&
null_typ
e
;
return
&
null_type
.
ID3D10EffectType_ifac
e
;
}
t
=
(
&
This
->
members
[
index
])
->
type
;
TRACE
(
"Returning member %p, %s
\n
"
,
t
,
debugstr_a
(
t
->
name
));
return
(
ID3D10EffectType
*
)
t
;
return
&
t
->
ID3D10EffectType_iface
;
}
static
struct
ID3D10EffectType
*
STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByName
(
ID3D10EffectType
*
iface
,
LPCSTR
name
)
{
struct
d3d10_effect_type
*
This
=
(
struct
d3d10_effect_type
*
)
iface
;
struct
d3d10_effect_type
*
This
=
impl_from_ID3D10EffectType
(
iface
)
;
unsigned
int
i
;
TRACE
(
"iface %p, name %s
\n
"
,
iface
,
debugstr_a
(
name
));
...
...
@@ -6258,7 +6265,7 @@ static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTy
if
(
!
name
)
{
WARN
(
"Invalid name specified
\n
"
);
return
(
ID3D10EffectType
*
)
&
null_typ
e
;
return
&
null_type
.
ID3D10EffectType_ifac
e
;
}
for
(
i
=
0
;
i
<
This
->
member_count
;
++
i
)
...
...
@@ -6270,20 +6277,20 @@ static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTy
if
(
!
strcmp
(
typem
->
name
,
name
))
{
TRACE
(
"Returning type %p.
\n
"
,
typem
->
type
);
return
(
ID3D10EffectType
*
)
typem
->
typ
e
;
return
&
typem
->
type
->
ID3D10EffectType_ifac
e
;
}
}
}
WARN
(
"Invalid name specified
\n
"
);
return
(
ID3D10EffectType
*
)
&
null_typ
e
;
return
&
null_type
.
ID3D10EffectType_ifac
e
;
}
static
struct
ID3D10EffectType
*
STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeBySemantic
(
ID3D10EffectType
*
iface
,
LPCSTR
semantic
)
{
struct
d3d10_effect_type
*
This
=
(
struct
d3d10_effect_type
*
)
iface
;
struct
d3d10_effect_type
*
This
=
impl_from_ID3D10EffectType
(
iface
)
;
unsigned
int
i
;
TRACE
(
"iface %p, semantic %s
\n
"
,
iface
,
debugstr_a
(
semantic
));
...
...
@@ -6291,7 +6298,7 @@ static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTy
if
(
!
semantic
)
{
WARN
(
"Invalid semantic specified
\n
"
);
return
(
ID3D10EffectType
*
)
&
null_typ
e
;
return
&
null_type
.
ID3D10EffectType_ifac
e
;
}
for
(
i
=
0
;
i
<
This
->
member_count
;
++
i
)
...
...
@@ -6303,19 +6310,19 @@ static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTy
if
(
!
strcmp
(
typem
->
semantic
,
semantic
))
{
TRACE
(
"Returning type %p.
\n
"
,
typem
->
type
);
return
(
ID3D10EffectType
*
)
typem
->
typ
e
;
return
&
typem
->
type
->
ID3D10EffectType_ifac
e
;
}
}
}
WARN
(
"Invalid semantic specified
\n
"
);
return
(
ID3D10EffectType
*
)
&
null_typ
e
;
return
&
null_type
.
ID3D10EffectType_ifac
e
;
}
static
LPCSTR
STDMETHODCALLTYPE
d3d10_effect_type_GetMemberName
(
ID3D10EffectType
*
iface
,
UINT
index
)
{
struct
d3d10_effect_type
*
This
=
(
struct
d3d10_effect_type
*
)
iface
;
struct
d3d10_effect_type
*
This
=
impl_from_ID3D10EffectType
(
iface
)
;
struct
d3d10_effect_type_member
*
typem
;
TRACE
(
"iface %p, index %u
\n
"
,
iface
,
index
);
...
...
@@ -6335,7 +6342,7 @@ static LPCSTR STDMETHODCALLTYPE d3d10_effect_type_GetMemberName(ID3D10EffectType
static
LPCSTR
STDMETHODCALLTYPE
d3d10_effect_type_GetMemberSemantic
(
ID3D10EffectType
*
iface
,
UINT
index
)
{
struct
d3d10_effect_type
*
This
=
(
struct
d3d10_effect_type
*
)
iface
;
struct
d3d10_effect_type
*
This
=
impl_from_ID3D10EffectType
(
iface
)
;
struct
d3d10_effect_type_member
*
typem
;
TRACE
(
"iface %p, index %u
\n
"
,
iface
,
index
);
...
...
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