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
4665ae62
Commit
4665ae62
authored
Sep 01, 2015
by
Józef Kucia
Committed by
Alexandre Julliard
Sep 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d11: Add ID3D11Texture3D interface stub.
parent
0707fa19
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
132 additions
and
11 deletions
+132
-11
d3d11_private.h
dlls/d3d11/d3d11_private.h
+2
-1
texture.c
dlls/d3d11/texture.c
+130
-10
No files found.
dlls/d3d11/d3d11_private.h
View file @
4665ae62
...
...
@@ -116,9 +116,10 @@ HRESULT d3d_texture2d_create(struct d3d_device *device, const D3D11_TEXTURE2D_DE
const
D3D11_SUBRESOURCE_DATA
*
data
,
struct
d3d_texture2d
**
texture
)
DECLSPEC_HIDDEN
;
struct
d3d_texture2d
*
unsafe_impl_from_ID3D10Texture2D
(
ID3D10Texture2D
*
iface
)
DECLSPEC_HIDDEN
;
/* ID3D10Texture3D */
/* ID3D1
1Texture3D, ID3D1
0Texture3D */
struct
d3d_texture3d
{
ID3D11Texture3D
ID3D11Texture3D_iface
;
ID3D10Texture3D
ID3D10Texture3D_iface
;
LONG
refcount
;
...
...
dlls/d3d11/texture.c
View file @
4665ae62
...
...
@@ -542,24 +542,36 @@ HRESULT d3d_texture2d_create(struct d3d_device *device, const D3D11_TEXTURE2D_DE
return
S_OK
;
}
static
inline
struct
d3d_texture3d
*
impl_from_ID3D10Texture3D
(
ID3D10Texture3D
*
iface
)
/* ID3D11Texture3D methods */
static
inline
struct
d3d_texture3d
*
impl_from_ID3D11Texture3D
(
ID3D11Texture3D
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3d_texture3d
,
ID3D1
0
Texture3D_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
d3d_texture3d
,
ID3D1
1
Texture3D_iface
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d1
0_texture3d_QueryInterface
(
ID3D10
Texture3D
*
iface
,
REFIID
riid
,
void
**
object
)
static
HRESULT
STDMETHODCALLTYPE
d3d1
1_texture3d_QueryInterface
(
ID3D11
Texture3D
*
iface
,
REFIID
riid
,
void
**
object
)
{
struct
d3d_texture3d
*
texture
=
impl_from_ID3D11Texture3D
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
if
(
IsEqualGUID
(
riid
,
&
IID_ID3D1
0
Texture3D
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D1
0
Resource
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D1
0
DeviceChild
)
if
(
IsEqualGUID
(
riid
,
&
IID_ID3D1
1
Texture3D
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D1
1
Resource
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D1
1
DeviceChild
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
IUnknown_AddRef
(
iface
);
*
object
=
iface
;
return
S_OK
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_ID3D10Texture3D
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D10Resource
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D10DeviceChild
))
{
IUnknown_AddRef
(
iface
);
*
object
=
&
texture
->
ID3D10Texture3D_iface
;
return
S_OK
;
}
WARN
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
riid
));
...
...
@@ -567,9 +579,9 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_QueryInterface(ID3D10Texture3D
return
E_NOINTERFACE
;
}
static
ULONG
STDMETHODCALLTYPE
d3d1
0_texture3d_AddRef
(
ID3D10
Texture3D
*
iface
)
static
ULONG
STDMETHODCALLTYPE
d3d1
1_texture3d_AddRef
(
ID3D11
Texture3D
*
iface
)
{
struct
d3d_texture3d
*
texture
=
impl_from_ID3D1
0
Texture3D
(
iface
);
struct
d3d_texture3d
*
texture
=
impl_from_ID3D1
1
Texture3D
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
texture
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
texture
,
refcount
);
...
...
@@ -593,9 +605,9 @@ static void STDMETHODCALLTYPE d3d_texture3d_wined3d_object_released(void *parent
HeapFree
(
GetProcessHeap
(),
0
,
parent
);
}
static
ULONG
STDMETHODCALLTYPE
d3d1
0_texture3d_Release
(
ID3D10
Texture3D
*
iface
)
static
ULONG
STDMETHODCALLTYPE
d3d1
1_texture3d_Release
(
ID3D11
Texture3D
*
iface
)
{
struct
d3d_texture3d
*
texture
=
impl_from_ID3D1
0
Texture3D
(
iface
);
struct
d3d_texture3d
*
texture
=
impl_from_ID3D1
1
Texture3D
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
texture
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
texture
,
refcount
);
...
...
@@ -615,6 +627,113 @@ static ULONG STDMETHODCALLTYPE d3d10_texture3d_Release(ID3D10Texture3D *iface)
return
refcount
;
}
static
void
STDMETHODCALLTYPE
d3d11_texture3d_GetDevice
(
ID3D11Texture3D
*
iface
,
ID3D11Device
**
device
)
{
FIXME
(
"iface %p, device %p stub!
\n
"
,
iface
,
device
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_texture3d_GetPrivateData
(
ID3D11Texture3D
*
iface
,
REFGUID
guid
,
UINT
*
data_size
,
void
*
data
)
{
FIXME
(
"iface %p, guid %s, data_size %p, data %p stub!
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_texture3d_SetPrivateData
(
ID3D11Texture3D
*
iface
,
REFGUID
guid
,
UINT
data_size
,
const
void
*
data
)
{
FIXME
(
"iface %p, guid %s, data_size %u, data %p stub!
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_texture3d_SetPrivateDataInterface
(
ID3D11Texture3D
*
iface
,
REFGUID
guid
,
const
IUnknown
*
data
)
{
FIXME
(
"iface %p, guid %s, data %p stub!
\n
"
,
iface
,
debugstr_guid
(
guid
),
data
);
return
E_NOTIMPL
;
}
static
void
STDMETHODCALLTYPE
d3d11_texture3d_GetType
(
ID3D11Texture3D
*
iface
,
D3D11_RESOURCE_DIMENSION
*
resource_dimension
)
{
TRACE
(
"iface %p, resource_dimension %p.
\n
"
,
iface
,
resource_dimension
);
*
resource_dimension
=
D3D11_RESOURCE_DIMENSION_TEXTURE3D
;
}
static
void
STDMETHODCALLTYPE
d3d11_texture3d_SetEvictionPriority
(
ID3D11Texture3D
*
iface
,
UINT
eviction_priority
)
{
FIXME
(
"iface %p, eviction_priority %#x stub!
\n
"
,
iface
,
eviction_priority
);
}
static
UINT
STDMETHODCALLTYPE
d3d11_texture3d_GetEvictionPriority
(
ID3D11Texture3D
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
0
;
}
static
void
STDMETHODCALLTYPE
d3d11_texture3d_GetDesc
(
ID3D11Texture3D
*
iface
,
D3D11_TEXTURE3D_DESC
*
desc
)
{
FIXME
(
"iface %p, desc %p stub!
\n
"
,
iface
,
desc
);
}
static
const
struct
ID3D11Texture3DVtbl
d3d11_texture3d_vtbl
=
{
/* IUnknown methods */
d3d11_texture3d_QueryInterface
,
d3d11_texture3d_AddRef
,
d3d11_texture3d_Release
,
/* ID3D11DeviceChild methods */
d3d11_texture3d_GetDevice
,
d3d11_texture3d_GetPrivateData
,
d3d11_texture3d_SetPrivateData
,
d3d11_texture3d_SetPrivateDataInterface
,
/* ID3D11Resource methods */
d3d11_texture3d_GetType
,
d3d11_texture3d_SetEvictionPriority
,
d3d11_texture3d_GetEvictionPriority
,
/* ID3D11Texture3D methods */
d3d11_texture3d_GetDesc
,
};
/* ID3D10Texture3D methods */
static
inline
struct
d3d_texture3d
*
impl_from_ID3D10Texture3D
(
ID3D10Texture3D
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3d_texture3d
,
ID3D10Texture3D_iface
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_texture3d_QueryInterface
(
ID3D10Texture3D
*
iface
,
REFIID
riid
,
void
**
object
)
{
struct
d3d_texture3d
*
texture
=
impl_from_ID3D10Texture3D
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
return
d3d11_texture3d_QueryInterface
(
&
texture
->
ID3D11Texture3D_iface
,
riid
,
object
);
}
static
ULONG
STDMETHODCALLTYPE
d3d10_texture3d_AddRef
(
ID3D10Texture3D
*
iface
)
{
struct
d3d_texture3d
*
texture
=
impl_from_ID3D10Texture3D
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
d3d11_texture3d_AddRef
(
&
texture
->
ID3D11Texture3D_iface
);
}
static
ULONG
STDMETHODCALLTYPE
d3d10_texture3d_Release
(
ID3D10Texture3D
*
iface
)
{
struct
d3d_texture3d
*
texture
=
impl_from_ID3D10Texture3D
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
d3d11_texture3d_Release
(
&
texture
->
ID3D11Texture3D_iface
);
}
static
void
STDMETHODCALLTYPE
d3d10_texture3d_GetDevice
(
ID3D10Texture3D
*
iface
,
ID3D10Device
**
device
)
{
struct
d3d_texture3d
*
texture
=
impl_from_ID3D10Texture3D
(
iface
);
...
...
@@ -766,6 +885,7 @@ HRESULT d3d_texture3d_init(struct d3d_texture3d *texture, struct d3d_device *dev
unsigned
int
levels
;
HRESULT
hr
;
texture
->
ID3D11Texture3D_iface
.
lpVtbl
=
&
d3d11_texture3d_vtbl
;
texture
->
ID3D10Texture3D_iface
.
lpVtbl
=
&
d3d10_texture3d_vtbl
;
texture
->
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