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
3882f2d3
Commit
3882f2d3
authored
Sep 10, 2015
by
Józef Kucia
Committed by
Alexandre Julliard
Sep 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d11: Add ID3D11ShaderResourceView interface stub.
parent
55d30331
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
138 additions
and
23 deletions
+138
-23
d3d11_private.h
dlls/d3d11/d3d11_private.h
+2
-1
view.c
dlls/d3d11/view.c
+136
-22
No files found.
dlls/d3d11/d3d11_private.h
View file @
3882f2d3
...
...
@@ -188,9 +188,10 @@ HRESULT d3d_rendertarget_view_create(struct d3d_device *device, ID3D11Resource *
const
D3D11_RENDER_TARGET_VIEW_DESC
*
desc
,
struct
d3d_rendertarget_view
**
view
)
DECLSPEC_HIDDEN
;
struct
d3d_rendertarget_view
*
unsafe_impl_from_ID3D10RenderTargetView
(
ID3D10RenderTargetView
*
iface
)
DECLSPEC_HIDDEN
;
/* ID3D10ShaderResourceView */
/* ID3D1
1ShaderResourceView, ID3D1
0ShaderResourceView */
struct
d3d_shader_resource_view
{
ID3D11ShaderResourceView
ID3D11ShaderResourceView_iface
;
ID3D10ShaderResourceView
ID3D10ShaderResourceView_iface
;
LONG
refcount
;
...
...
dlls/d3d11/view.c
View file @
3882f2d3
...
...
@@ -1178,65 +1178,178 @@ struct d3d_rendertarget_view *unsafe_impl_from_ID3D10RenderTargetView(ID3D10Rend
return
impl_from_ID3D10RenderTargetView
(
iface
);
}
static
inline
struct
d3d_shader_resource_view
*
impl_from_ID3D10ShaderResourceView
(
ID3D10ShaderResourceView
*
iface
)
/* ID3D11ShaderResourceView methods */
struct
d3d_shader_resource_view
*
impl_from_ID3D11ShaderResourceView
(
ID3D11ShaderResourceView
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3d_shader_resource_view
,
ID3D1
0
ShaderResourceView_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
d3d_shader_resource_view
,
ID3D1
1
ShaderResourceView_iface
);
}
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
d3d10_shader_resource_view_QueryInterface
(
ID3D10ShaderResourceView
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_shader_resource_view_QueryInterface
(
ID3D11ShaderResourceView
*
iface
,
REFIID
riid
,
void
**
object
)
{
struct
d3d_shader_resource_view
*
view
=
impl_from_ID3D11ShaderResourceView
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
if
(
IsEqualGUID
(
riid
,
&
IID_ID3D1
0
ShaderResourceView
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D1
0
View
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D1
0
DeviceChild
)
if
(
IsEqualGUID
(
riid
,
&
IID_ID3D1
1
ShaderResourceView
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D1
1
View
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D1
1
DeviceChild
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
I
Unknown
_AddRef
(
iface
);
I
D3D11ShaderResourceView
_AddRef
(
iface
);
*
object
=
iface
;
return
S_OK
;
}
if
(
IsEqualGUID
(
riid
,
&
IID_ID3D10ShaderResourceView
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D10View
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D10DeviceChild
))
{
ID3D10ShaderResourceView_AddRef
(
&
view
->
ID3D10ShaderResourceView_iface
);
*
object
=
&
view
->
ID3D10ShaderResourceView_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_shader_resource_view_AddRef
(
ID3D10
ShaderResourceView
*
iface
)
static
ULONG
STDMETHODCALLTYPE
d3d1
1_shader_resource_view_AddRef
(
ID3D11
ShaderResourceView
*
iface
)
{
struct
d3d_shader_resource_view
*
This
=
impl_from_ID3D10
ShaderResourceView
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
This
->
refcount
);
struct
d3d_shader_resource_view
*
view
=
impl_from_ID3D11
ShaderResourceView
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
view
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
This
,
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
view
,
refcount
);
return
refcount
;
}
static
ULONG
STDMETHODCALLTYPE
d3d1
0_shader_resource_view_Release
(
ID3D10
ShaderResourceView
*
iface
)
static
ULONG
STDMETHODCALLTYPE
d3d1
1_shader_resource_view_Release
(
ID3D11
ShaderResourceView
*
iface
)
{
struct
d3d_shader_resource_view
*
This
=
impl_from_ID3D10
ShaderResourceView
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
This
->
refcount
);
struct
d3d_shader_resource_view
*
view
=
impl_from_ID3D11
ShaderResourceView
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
view
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
This
,
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
view
,
refcount
);
if
(
!
refcount
)
{
wined3d_mutex_lock
();
wined3d_shader_resource_view_decref
(
This
->
wined3d_view
);
ID3D10Resource_Release
(
This
->
resource
);
ID3D10Device1_Release
(
This
->
device
);
wined3d_private_store_cleanup
(
&
This
->
private_store
);
wined3d_shader_resource_view_decref
(
view
->
wined3d_view
);
ID3D10Resource_Release
(
view
->
resource
);
ID3D10Device1_Release
(
view
->
device
);
wined3d_private_store_cleanup
(
&
view
->
private_store
);
wined3d_mutex_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
view
);
}
return
refcount
;
}
static
void
STDMETHODCALLTYPE
d3d11_shader_resource_view_GetDevice
(
ID3D11ShaderResourceView
*
iface
,
ID3D11Device
**
device
)
{
FIXME
(
"iface %p, device %p stub!
\n
"
,
iface
,
device
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_shader_resource_view_GetPrivateData
(
ID3D11ShaderResourceView
*
iface
,
REFGUID
guid
,
UINT
*
data_size
,
void
*
data
)
{
struct
d3d_shader_resource_view
*
view
=
impl_from_ID3D11ShaderResourceView
(
iface
);
TRACE
(
"iface %p, guid %s, data_size %p, data %p.
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
return
d3d_get_private_data
(
&
view
->
private_store
,
guid
,
data_size
,
data
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_shader_resource_view_SetPrivateData
(
ID3D11ShaderResourceView
*
iface
,
REFGUID
guid
,
UINT
data_size
,
const
void
*
data
)
{
struct
d3d_shader_resource_view
*
view
=
impl_from_ID3D11ShaderResourceView
(
iface
);
TRACE
(
"iface %p, guid %s, data_size %u, data %p.
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
return
d3d_set_private_data
(
&
view
->
private_store
,
guid
,
data_size
,
data
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_shader_resource_view_SetPrivateDataInterface
(
ID3D11ShaderResourceView
*
iface
,
REFGUID
guid
,
const
IUnknown
*
data
)
{
struct
d3d_shader_resource_view
*
view
=
impl_from_ID3D11ShaderResourceView
(
iface
);
TRACE
(
"iface %p, guid %s, data %p.
\n
"
,
iface
,
debugstr_guid
(
guid
),
data
);
return
d3d_set_private_data_interface
(
&
view
->
private_store
,
guid
,
data
);
}
static
void
STDMETHODCALLTYPE
d3d11_shader_resource_view_GetResource
(
ID3D11ShaderResourceView
*
iface
,
ID3D11Resource
**
resource
)
{
FIXME
(
"iface %p, resource %p stub!
\n
"
,
iface
,
resource
);
}
static
void
STDMETHODCALLTYPE
d3d11_shader_resource_view_GetDesc
(
ID3D11ShaderResourceView
*
iface
,
D3D11_SHADER_RESOURCE_VIEW_DESC
*
desc
)
{
FIXME
(
"iface %p, desc %p stub!
\n
"
,
iface
,
desc
);
}
static
const
struct
ID3D11ShaderResourceViewVtbl
d3d11_shader_resource_view_vtbl
=
{
/* IUnknown methods */
d3d11_shader_resource_view_QueryInterface
,
d3d11_shader_resource_view_AddRef
,
d3d11_shader_resource_view_Release
,
/* ID3D11DeviceChild methods */
d3d11_shader_resource_view_GetDevice
,
d3d11_shader_resource_view_GetPrivateData
,
d3d11_shader_resource_view_SetPrivateData
,
d3d11_shader_resource_view_SetPrivateDataInterface
,
/* ID3D11View methods */
d3d11_shader_resource_view_GetResource
,
/* ID3D11ShaderResourceView methods */
d3d11_shader_resource_view_GetDesc
,
};
/* ID3D10ShaderResourceView methods */
static
inline
struct
d3d_shader_resource_view
*
impl_from_ID3D10ShaderResourceView
(
ID3D10ShaderResourceView
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3d_shader_resource_view
,
ID3D10ShaderResourceView_iface
);
}
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
d3d10_shader_resource_view_QueryInterface
(
ID3D10ShaderResourceView
*
iface
,
REFIID
riid
,
void
**
object
)
{
struct
d3d_shader_resource_view
*
view
=
impl_from_ID3D10ShaderResourceView
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
return
d3d11_shader_resource_view_QueryInterface
(
&
view
->
ID3D11ShaderResourceView_iface
,
riid
,
object
);
}
static
ULONG
STDMETHODCALLTYPE
d3d10_shader_resource_view_AddRef
(
ID3D10ShaderResourceView
*
iface
)
{
struct
d3d_shader_resource_view
*
view
=
impl_from_ID3D10ShaderResourceView
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
d3d11_shader_resource_view_AddRef
(
&
view
->
ID3D11ShaderResourceView_iface
);
}
static
ULONG
STDMETHODCALLTYPE
d3d10_shader_resource_view_Release
(
ID3D10ShaderResourceView
*
iface
)
{
struct
d3d_shader_resource_view
*
view
=
impl_from_ID3D10ShaderResourceView
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
d3d11_shader_resource_view_Release
(
&
view
->
ID3D11ShaderResourceView_iface
);
}
/* ID3D10DeviceChild methods */
static
void
STDMETHODCALLTYPE
d3d10_shader_resource_view_GetDevice
(
ID3D10ShaderResourceView
*
iface
,
...
...
@@ -1330,6 +1443,7 @@ HRESULT d3d_shader_resource_view_init(struct d3d_shader_resource_view *view, str
struct
wined3d_resource
*
wined3d_resource
;
HRESULT
hr
;
view
->
ID3D11ShaderResourceView_iface
.
lpVtbl
=
&
d3d11_shader_resource_view_vtbl
;
view
->
ID3D10ShaderResourceView_iface
.
lpVtbl
=
&
d3d10_shader_resource_view_vtbl
;
view
->
refcount
=
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