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
d8f8194b
Commit
d8f8194b
authored
Oct 02, 2015
by
Józef Kucia
Committed by
Alexandre Julliard
Oct 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d11: Implement ID3D11GeometryShader interface.
Signed-off-by:
Józef Kucia
<
jkucia@codeweavers.com
>
parent
6c8c61f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
118 additions
and
20 deletions
+118
-20
d3d11_private.h
dlls/d3d11/d3d11_private.h
+2
-1
shader.c
dlls/d3d11/shader.c
+116
-19
No files found.
dlls/d3d11/d3d11_private.h
View file @
d8f8194b
...
...
@@ -240,9 +240,10 @@ HRESULT d3d_vertex_shader_create(struct d3d_device *device, const void *byte_cod
struct
d3d_vertex_shader
**
shader
)
DECLSPEC_HIDDEN
;
struct
d3d_vertex_shader
*
unsafe_impl_from_ID3D10VertexShader
(
ID3D10VertexShader
*
iface
)
DECLSPEC_HIDDEN
;
/* ID3D10GeometryShader */
/* ID3D1
1GeometryShader, ID3D1
0GeometryShader */
struct
d3d_geometry_shader
{
ID3D11GeometryShader
ID3D11GeometryShader_iface
;
ID3D10GeometryShader
ID3D10GeometryShader_iface
;
LONG
refcount
;
...
...
dlls/d3d11/shader.c
View file @
d8f8194b
...
...
@@ -439,60 +439,156 @@ struct d3d_vertex_shader *unsafe_impl_from_ID3D10VertexShader(ID3D10VertexShader
return
impl_from_ID3D10VertexShader
(
iface
);
}
static
inline
struct
d3d_geometry_shader
*
impl_from_ID3D10GeometryShader
(
ID3D10GeometryShader
*
iface
)
/* ID3D11GeometryShader methods */
static
inline
struct
d3d_geometry_shader
*
impl_from_ID3D11GeometryShader
(
ID3D11GeometryShader
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3d_geometry_shader
,
ID3D1
0
GeometryShader_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
d3d_geometry_shader
,
ID3D1
1
GeometryShader_iface
);
}
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
d3d10_geometry_shader_QueryInterface
(
ID3D10GeometryShader
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_geometry_shader_QueryInterface
(
ID3D11GeometryShader
*
iface
,
REFIID
riid
,
void
**
object
)
{
TRACE
(
"iface %p, riid %s, object %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
struct
d3d_geometry_shader
*
shader
=
impl_from_ID3D11GeometryShader
(
iface
);
if
(
IsEqualGUID
(
riid
,
&
IID_ID3D10GeometryShader
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D10DeviceChild
)
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
if
(
IsEqualGUID
(
riid
,
&
IID_ID3D11GeometryShader
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D11DeviceChild
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
I
Unknown
_AddRef
(
iface
);
I
D3D11GeometryShader
_AddRef
(
iface
);
*
object
=
iface
;
return
S_OK
;
}
WARN
(
"%s not implemented, returning E_NOINTERFACE
\n
"
,
debugstr_guid
(
riid
));
if
(
IsEqualGUID
(
riid
,
&
IID_ID3D10GeometryShader
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D10DeviceChild
))
{
ID3D10GeometryShader_AddRef
(
&
shader
->
ID3D10GeometryShader_iface
);
*
object
=
&
shader
->
ID3D10GeometryShader_iface
;
return
S_OK
;
}
WARN
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
riid
));
*
object
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
STDMETHODCALLTYPE
d3d1
0_geometry_shader_AddRef
(
ID3D10
GeometryShader
*
iface
)
static
ULONG
STDMETHODCALLTYPE
d3d1
1_geometry_shader_AddRef
(
ID3D11
GeometryShader
*
iface
)
{
struct
d3d_geometry_shader
*
This
=
impl_from_ID3D10
GeometryShader
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
This
->
refcount
);
struct
d3d_geometry_shader
*
shader
=
impl_from_ID3D11
GeometryShader
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
shader
->
refcount
);
TRACE
(
"%p increasing refcount to %u
\n
"
,
This
,
refcount
);
TRACE
(
"%p increasing refcount to %u
.
\n
"
,
shader
,
refcount
);
return
refcount
;
}
static
ULONG
STDMETHODCALLTYPE
d3d1
0_geometry_shader_Release
(
ID3D10
GeometryShader
*
iface
)
static
ULONG
STDMETHODCALLTYPE
d3d1
1_geometry_shader_Release
(
ID3D11
GeometryShader
*
iface
)
{
struct
d3d_geometry_shader
*
This
=
impl_from_ID3D10
GeometryShader
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
This
->
refcount
);
struct
d3d_geometry_shader
*
shader
=
impl_from_ID3D11
GeometryShader
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
shader
->
refcount
);
TRACE
(
"%p decreasing refcount to %u
\n
"
,
This
,
refcount
);
TRACE
(
"%p decreasing refcount to %u
.
\n
"
,
shader
,
refcount
);
if
(
!
refcount
)
{
wined3d_mutex_lock
();
wined3d_shader_decref
(
This
->
wined3d_shader
);
wined3d_shader_decref
(
shader
->
wined3d_shader
);
wined3d_mutex_unlock
();
}
return
refcount
;
}
static
void
STDMETHODCALLTYPE
d3d11_geometry_shader_GetDevice
(
ID3D11GeometryShader
*
iface
,
ID3D11Device
**
device
)
{
FIXME
(
"iface %p, device %p stub!
\n
"
,
iface
,
device
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_geometry_shader_GetPrivateData
(
ID3D11GeometryShader
*
iface
,
REFGUID
guid
,
UINT
*
data_size
,
void
*
data
)
{
struct
d3d_geometry_shader
*
shader
=
impl_from_ID3D11GeometryShader
(
iface
);
TRACE
(
"iface %p, guid %s, data_size %p, data %p.
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
return
d3d_get_private_data
(
&
shader
->
private_store
,
guid
,
data_size
,
data
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_geometry_shader_SetPrivateData
(
ID3D11GeometryShader
*
iface
,
REFGUID
guid
,
UINT
data_size
,
const
void
*
data
)
{
struct
d3d_geometry_shader
*
shader
=
impl_from_ID3D11GeometryShader
(
iface
);
TRACE
(
"iface %p, guid %s, data_size %u, data %p.
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
return
d3d_set_private_data
(
&
shader
->
private_store
,
guid
,
data_size
,
data
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_geometry_shader_SetPrivateDataInterface
(
ID3D11GeometryShader
*
iface
,
REFGUID
guid
,
const
IUnknown
*
data
)
{
struct
d3d_geometry_shader
*
shader
=
impl_from_ID3D11GeometryShader
(
iface
);
TRACE
(
"iface %p, guid %s, data %p.
\n
"
,
iface
,
debugstr_guid
(
guid
),
data
);
return
d3d_set_private_data_interface
(
&
shader
->
private_store
,
guid
,
data
);
}
static
const
struct
ID3D11GeometryShaderVtbl
d3d11_geometry_shader_vtbl
=
{
/* IUnknown methods */
d3d11_geometry_shader_QueryInterface
,
d3d11_geometry_shader_AddRef
,
d3d11_geometry_shader_Release
,
/* ID3D11DeviceChild methods */
d3d11_geometry_shader_GetDevice
,
d3d11_geometry_shader_GetPrivateData
,
d3d11_geometry_shader_SetPrivateData
,
d3d11_geometry_shader_SetPrivateDataInterface
,
};
/* ID3D10GeometryShader methods */
static
inline
struct
d3d_geometry_shader
*
impl_from_ID3D10GeometryShader
(
ID3D10GeometryShader
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3d_geometry_shader
,
ID3D10GeometryShader_iface
);
}
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
d3d10_geometry_shader_QueryInterface
(
ID3D10GeometryShader
*
iface
,
REFIID
riid
,
void
**
object
)
{
struct
d3d_geometry_shader
*
shader
=
impl_from_ID3D10GeometryShader
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
return
d3d11_geometry_shader_QueryInterface
(
&
shader
->
ID3D11GeometryShader_iface
,
riid
,
object
);
}
static
ULONG
STDMETHODCALLTYPE
d3d10_geometry_shader_AddRef
(
ID3D10GeometryShader
*
iface
)
{
struct
d3d_geometry_shader
*
shader
=
impl_from_ID3D10GeometryShader
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
d3d11_geometry_shader_AddRef
(
&
shader
->
ID3D11GeometryShader_iface
);
}
static
ULONG
STDMETHODCALLTYPE
d3d10_geometry_shader_Release
(
ID3D10GeometryShader
*
iface
)
{
struct
d3d_geometry_shader
*
shader
=
impl_from_ID3D10GeometryShader
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
d3d11_geometry_shader_Release
(
&
shader
->
ID3D11GeometryShader_iface
);
}
/* ID3D10DeviceChild methods */
static
void
STDMETHODCALLTYPE
d3d10_geometry_shader_GetDevice
(
ID3D10GeometryShader
*
iface
,
ID3D10Device
**
device
)
...
...
@@ -567,6 +663,7 @@ HRESULT d3d_geometry_shader_init(struct d3d_geometry_shader *shader, struct d3d_
struct
wined3d_shader_desc
desc
;
HRESULT
hr
;
shader
->
ID3D11GeometryShader_iface
.
lpVtbl
=
&
d3d11_geometry_shader_vtbl
;
shader
->
ID3D10GeometryShader_iface
.
lpVtbl
=
&
d3d10_geometry_shader_vtbl
;
shader
->
refcount
=
1
;
wined3d_mutex_lock
();
...
...
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