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
98696724
Commit
98696724
authored
Apr 17, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Get rid of IDirect3DVolumeTexture8Impl.
parent
40d113c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
121 deletions
+97
-121
d3d8_private.h
dlls/d3d8/d3d8_private.h
+1
-17
device.c
dlls/d3d8/device.c
+2
-2
volumetexture.c
dlls/d3d8/volumetexture.c
+94
-102
No files found.
dlls/d3d8/d3d8_private.h
View file @
98696724
...
...
@@ -101,7 +101,6 @@ void fixup_caps(WINED3DCAPS *pWineCaps) DECLSPEC_HIDDEN;
/* Direct3D8 Interfaces: */
typedef
struct
IDirect3DBaseTexture8Impl
IDirect3DBaseTexture8Impl
;
typedef
struct
IDirect3DVolumeTexture8Impl
IDirect3DVolumeTexture8Impl
;
typedef
struct
IDirect3D8Impl
IDirect3D8Impl
;
typedef
struct
IDirect3DDevice8Impl
IDirect3DDevice8Impl
;
typedef
struct
IDirect3DIndexBuffer8Impl
IDirect3DIndexBuffer8Impl
;
...
...
@@ -323,22 +322,7 @@ HRESULT cubetexture_init(struct d3d8_texture *texture, IDirect3DDevice8Impl *dev
HRESULT
texture_init
(
struct
d3d8_texture
*
texture
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
DECLSPEC_HIDDEN
;
/* ----------------------- */
/* IDirect3DVolumeTexture8 */
/* ----------------------- */
/*****************************************************************************
* IDirect3DVolumeTexture8 implementation structure
*/
struct
IDirect3DVolumeTexture8Impl
{
IDirect3DVolumeTexture8
IDirect3DVolumeTexture8_iface
;
LONG
ref
;
struct
wined3d_texture
*
wined3d_texture
;
IDirect3DDevice8
*
parentDevice
;
};
HRESULT
volumetexture_init
(
IDirect3DVolumeTexture8Impl
*
texture
,
IDirect3DDevice8Impl
*
device
,
HRESULT
volumetexture_init
(
struct
d3d8_texture
*
texture
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
DECLSPEC_HIDDEN
;
struct
d3d8_vertex_declaration
...
...
dlls/d3d8/device.c
View file @
98696724
...
...
@@ -717,7 +717,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateVolumeTexture(IDirect3DDevice8
D3DPOOL
pool
,
IDirect3DVolumeTexture8
**
texture
)
{
IDirect3DDevice8Impl
*
This
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DVolumeTexture8Impl
*
object
;
struct
d3d8_texture
*
object
;
HRESULT
hr
;
TRACE
(
"iface %p, width %u, height %u, depth %u, levels %u, usage %#x, format %#x, pool %#x, texture %p.
\n
"
,
...
...
@@ -739,7 +739,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateVolumeTexture(IDirect3DDevice8
}
TRACE
(
"Created volume texture %p.
\n
"
,
object
);
*
texture
=
&
object
->
IDirect3DVolum
eTexture8_iface
;
*
texture
=
(
IDirect3DVolumeTexture8
*
)
&
object
->
IDirect3DBas
eTexture8_iface
;
return
D3D_OK
;
}
...
...
dlls/d3d8/volumetexture.c
View file @
98696724
...
...
@@ -23,15 +23,14 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d8
);
static
inline
IDirect3DVolumeTexture8Impl
*
impl_from_IDirect3DVolumeTexture8
(
IDirect3DVolumeTexture8
*
iface
)
static
inline
struct
d3d8_texture
*
impl_from_IDirect3DVolumeTexture8
(
IDirect3DVolumeTexture8
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DVolumeTexture8Impl
,
IDirect3DVolum
eTexture8_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
d3d8_texture
,
IDirect3DBas
eTexture8_iface
);
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl_QueryInterface
(
IDirect3DVolumeTexture8
*
iface
,
REFIID
riid
,
void
**
ppobj
)
static
HRESULT
WINAPI
d3d8_texture_3d_QueryInterface
(
IDirect3DVolumeTexture8
*
iface
,
REFIID
riid
,
void
**
out
)
{
TRACE
(
"iface %p, riid %s, o
bject %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppobj
);
TRACE
(
"iface %p, riid %s, o
ut %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
out
);
if
(
IsEqualGUID
(
riid
,
&
IID_IDirect3DVolumeTexture8
)
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DBaseTexture8
)
...
...
@@ -39,63 +38,62 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_QueryInterface(IDirect3DVolume
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
IUnknown_AddRef
(
iface
);
*
ppobj
=
iface
;
*
out
=
iface
;
return
S_OK
;
}
WARN
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
riid
));
*
ppobj
=
NULL
;
*
out
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDirect3DVolumeTexture8Impl
_AddRef
(
IDirect3DVolumeTexture8
*
iface
)
static
ULONG
WINAPI
d3d8_texture_3d
_AddRef
(
IDirect3DVolumeTexture8
*
iface
)
{
IDirect3DVolumeTexture8Impl
*
This
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
texture
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
iface
,
ref
);
if
(
ref
==
1
)
{
IDirect3DDevice8_AddRef
(
This
->
parentD
evice
);
IDirect3DDevice8_AddRef
(
texture
->
parent_d
evice
);
wined3d_mutex_lock
();
wined3d_texture_incref
(
This
->
wined3d_texture
);
wined3d_texture_incref
(
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
}
return
ref
;
}
static
ULONG
WINAPI
IDirect3DVolumeTexture8Impl
_Release
(
IDirect3DVolumeTexture8
*
iface
)
static
ULONG
WINAPI
d3d8_texture_3d
_Release
(
IDirect3DVolumeTexture8
*
iface
)
{
IDirect3DVolumeTexture8Impl
*
This
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
texture
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
iface
,
ref
);
if
(
ref
==
0
)
{
IDirect3DDevice8
*
parentDevice
=
This
->
parentDevice
;
if
(
!
ref
)
{
IDirect3DDevice8
*
parent_device
=
texture
->
parent_device
;
wined3d_mutex_lock
();
wined3d_texture_decref
(
This
->
wined3d_texture
);
wined3d_texture_decref
(
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
/* Release the device last, as it may cause the device to be destroyed. */
IDirect3DDevice8_Release
(
parent
D
evice
);
IDirect3DDevice8_Release
(
parent
_d
evice
);
}
return
ref
;
}
/* IDirect3DVolumeTexture8 IDirect3DResource8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl_GetDevice
(
IDirect3DVolumeTexture8
*
iface
,
IDirect3DDevice8
**
device
)
static
HRESULT
WINAPI
d3d8_texture_3d_GetDevice
(
IDirect3DVolumeTexture8
*
iface
,
IDirect3DDevice8
**
device
)
{
IDirect3DVolumeTexture8Impl
*
This
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
device
);
*
device
=
This
->
parentD
evice
;
*
device
=
texture
->
parent_d
evice
;
IDirect3DDevice8_AddRef
(
*
device
);
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
...
...
@@ -103,153 +101,149 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetDevice(IDirect3DVolumeTextu
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl
_SetPrivateData
(
IDirect3DVolumeTexture8
*
iface
,
REFGUID
refguid
,
const
void
*
pData
,
DWORD
SizeOfData
,
DWORD
F
lags
)
static
HRESULT
WINAPI
d3d8_texture_3d
_SetPrivateData
(
IDirect3DVolumeTexture8
*
iface
,
REFGUID
guid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
f
lags
)
{
IDirect3DVolumeTexture8Impl
*
This
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
TRACE
(
"iface %p, guid %s, data %p, data_size %u, flags %#x.
\n
"
,
iface
,
debugstr_guid
(
refguid
),
pData
,
SizeOfData
,
F
lags
);
iface
,
debugstr_guid
(
guid
),
data
,
data_size
,
f
lags
);
wined3d_mutex_lock
();
resource
=
wined3d_texture_get_resource
(
This
->
wined3d_texture
);
hr
=
wined3d_resource_set_private_data
(
resource
,
refguid
,
pData
,
SizeOfData
,
F
lags
);
resource
=
wined3d_texture_get_resource
(
texture
->
wined3d_texture
);
hr
=
wined3d_resource_set_private_data
(
resource
,
guid
,
data
,
data_size
,
f
lags
);
wined3d_mutex_unlock
();
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl
_GetPrivateData
(
IDirect3DVolumeTexture8
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
static
HRESULT
WINAPI
d3d8_texture_3d
_GetPrivateData
(
IDirect3DVolumeTexture8
*
iface
,
REFGUID
guid
,
void
*
data
,
DWORD
*
data_size
)
{
IDirect3DVolumeTexture8Impl
*
This
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
TRACE
(
"iface %p, guid %s, data %p, data_size %p.
\n
"
,
iface
,
debugstr_guid
(
refguid
),
pData
,
pSizeOfData
);
iface
,
debugstr_guid
(
guid
),
data
,
data_size
);
wined3d_mutex_lock
();
resource
=
wined3d_texture_get_resource
(
This
->
wined3d_texture
);
hr
=
wined3d_resource_get_private_data
(
resource
,
refguid
,
pData
,
pSizeOfData
);
resource
=
wined3d_texture_get_resource
(
texture
->
wined3d_texture
);
hr
=
wined3d_resource_get_private_data
(
resource
,
guid
,
data
,
data_size
);
wined3d_mutex_unlock
();
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl_FreePrivateData
(
IDirect3DVolumeTexture8
*
iface
,
REFGUID
refguid
)
static
HRESULT
WINAPI
d3d8_texture_3d_FreePrivateData
(
IDirect3DVolumeTexture8
*
iface
,
REFGUID
guid
)
{
IDirect3DVolumeTexture8Impl
*
This
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
TRACE
(
"iface %p, guid %s.
\n
"
,
iface
,
debugstr_guid
(
ref
guid
));
TRACE
(
"iface %p, guid %s.
\n
"
,
iface
,
debugstr_guid
(
guid
));
wined3d_mutex_lock
();
resource
=
wined3d_texture_get_resource
(
This
->
wined3d_texture
);
hr
=
wined3d_resource_free_private_data
(
resource
,
ref
guid
);
resource
=
wined3d_texture_get_resource
(
texture
->
wined3d_texture
);
hr
=
wined3d_resource_free_private_data
(
resource
,
guid
);
wined3d_mutex_unlock
();
return
hr
;
}
static
DWORD
WINAPI
IDirect3DVolumeTexture8Impl_SetPriority
(
IDirect3DVolumeTexture8
*
iface
,
DWORD
PriorityNew
)
static
DWORD
WINAPI
d3d8_texture_3d_SetPriority
(
IDirect3DVolumeTexture8
*
iface
,
DWORD
priority
)
{
IDirect3DVolumeTexture8Impl
*
This
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
DWORD
ret
;
TRACE
(
"iface %p, priority %u.
\n
"
,
iface
,
PriorityNew
);
TRACE
(
"iface %p, priority %u.
\n
"
,
iface
,
priority
);
wined3d_mutex_lock
();
ret
=
wined3d_texture_set_priority
(
This
->
wined3d_texture
,
PriorityNew
);
ret
=
wined3d_texture_set_priority
(
texture
->
wined3d_texture
,
priority
);
wined3d_mutex_unlock
();
return
ret
;
}
static
DWORD
WINAPI
IDirect3DVolumeTexture8Impl
_GetPriority
(
IDirect3DVolumeTexture8
*
iface
)
static
DWORD
WINAPI
d3d8_texture_3d
_GetPriority
(
IDirect3DVolumeTexture8
*
iface
)
{
IDirect3DVolumeTexture8Impl
*
This
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
DWORD
ret
;
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
ret
=
wined3d_texture_get_priority
(
This
->
wined3d_texture
);
ret
=
wined3d_texture_get_priority
(
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
return
ret
;
}
static
void
WINAPI
IDirect3DVolumeTexture8Impl
_PreLoad
(
IDirect3DVolumeTexture8
*
iface
)
static
void
WINAPI
d3d8_texture_3d
_PreLoad
(
IDirect3DVolumeTexture8
*
iface
)
{
IDirect3DVolumeTexture8Impl
*
This
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
wined3d_texture_preload
(
This
->
wined3d_texture
);
wined3d_texture_preload
(
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
}
static
D3DRESOURCETYPE
WINAPI
IDirect3DVolumeTexture8Impl
_GetType
(
IDirect3DVolumeTexture8
*
iface
)
static
D3DRESOURCETYPE
WINAPI
d3d8_texture_3d
_GetType
(
IDirect3DVolumeTexture8
*
iface
)
{
TRACE
(
"iface %p.
\n
"
,
iface
);
return
D3DRTYPE_VOLUMETEXTURE
;
}
/* IDirect3DVolumeTexture8 IDirect3DBaseTexture8 Interface follow: */
static
DWORD
WINAPI
IDirect3DVolumeTexture8Impl_SetLOD
(
IDirect3DVolumeTexture8
*
iface
,
DWORD
LODNew
)
static
DWORD
WINAPI
d3d8_texture_3d_SetLOD
(
IDirect3DVolumeTexture8
*
iface
,
DWORD
lod
)
{
IDirect3DVolumeTexture8Impl
*
This
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
DWORD
ret
;
TRACE
(
"iface %p, lod %u.
\n
"
,
iface
,
LODNew
);
TRACE
(
"iface %p, lod %u.
\n
"
,
iface
,
lod
);
wined3d_mutex_lock
();
ret
=
wined3d_texture_set_lod
(
This
->
wined3d_texture
,
LODNew
);
ret
=
wined3d_texture_set_lod
(
texture
->
wined3d_texture
,
lod
);
wined3d_mutex_unlock
();
return
ret
;
}
static
DWORD
WINAPI
IDirect3DVolumeTexture8Impl
_GetLOD
(
IDirect3DVolumeTexture8
*
iface
)
static
DWORD
WINAPI
d3d8_texture_3d
_GetLOD
(
IDirect3DVolumeTexture8
*
iface
)
{
IDirect3DVolumeTexture8Impl
*
This
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
DWORD
ret
;
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
ret
=
wined3d_texture_get_lod
(
This
->
wined3d_texture
);
ret
=
wined3d_texture_get_lod
(
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
return
ret
;
}
static
DWORD
WINAPI
IDirect3DVolumeTexture8Impl
_GetLevelCount
(
IDirect3DVolumeTexture8
*
iface
)
static
DWORD
WINAPI
d3d8_texture_3d
_GetLevelCount
(
IDirect3DVolumeTexture8
*
iface
)
{
IDirect3DVolumeTexture8Impl
*
This
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
DWORD
ret
;
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
ret
=
wined3d_texture_get_level_count
(
This
->
wined3d_texture
);
ret
=
wined3d_texture_get_level_count
(
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
return
ret
;
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl_GetLevelDesc
(
IDirect3DVolumeTexture8
*
iface
,
UINT
level
,
D3DVOLUME_DESC
*
desc
)
static
HRESULT
WINAPI
d3d8_texture_3d_GetLevelDesc
(
IDirect3DVolumeTexture8
*
iface
,
UINT
level
,
D3DVOLUME_DESC
*
desc
)
{
IDirect3DVolumeTexture8Impl
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
HRESULT
hr
=
D3D_OK
;
...
...
@@ -277,10 +271,10 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetLevelDesc(IDirect3DVolumeTe
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl
_GetVolumeLevel
(
IDirect3DVolumeTexture8
*
iface
,
static
HRESULT
WINAPI
d3d8_texture_3d
_GetVolumeLevel
(
IDirect3DVolumeTexture8
*
iface
,
UINT
level
,
IDirect3DVolume8
**
volume
)
{
IDirect3DVolumeTexture8Impl
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
TRACE
(
"iface %p, level %u, volume %p.
\n
"
,
iface
,
level
,
volume
);
...
...
@@ -299,10 +293,10 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetVolumeLevel(IDirect3DVolume
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl
_LockBox
(
IDirect3DVolumeTexture8
*
iface
,
static
HRESULT
WINAPI
d3d8_texture_3d
_LockBox
(
IDirect3DVolumeTexture8
*
iface
,
UINT
level
,
D3DLOCKED_BOX
*
locked_box
,
const
D3DBOX
*
box
,
DWORD
flags
)
{
IDirect3DVolumeTexture8Impl
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
HRESULT
hr
;
...
...
@@ -320,10 +314,9 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_LockBox(IDirect3DVolumeTexture
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl_UnlockBox
(
IDirect3DVolumeTexture8
*
iface
,
UINT
level
)
static
HRESULT
WINAPI
d3d8_texture_3d_UnlockBox
(
IDirect3DVolumeTexture8
*
iface
,
UINT
level
)
{
IDirect3DVolumeTexture8Impl
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
HRESULT
hr
;
...
...
@@ -339,10 +332,9 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_UnlockBox(IDirect3DVolumeTextu
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl_AddDirtyBox
(
IDirect3DVolumeTexture8
*
iface
,
const
D3DBOX
*
dirty_box
)
static
HRESULT
WINAPI
d3d8_texture_3d_AddDirtyBox
(
IDirect3DVolumeTexture8
*
iface
,
const
D3DBOX
*
dirty_box
)
{
IDirect3DVolumeTexture8Impl
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DVolumeTexture8
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, dirty_box %p.
\n
"
,
iface
,
dirty_box
);
...
...
@@ -357,28 +349,28 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_AddDirtyBox(IDirect3DVolumeTex
static
const
IDirect3DVolumeTexture8Vtbl
Direct3DVolumeTexture8_Vtbl
=
{
/* IUnknown */
IDirect3DVolumeTexture8Impl
_QueryInterface
,
IDirect3DVolumeTexture8Impl
_AddRef
,
IDirect3DVolumeTexture8Impl
_Release
,
d3d8_texture_3d
_QueryInterface
,
d3d8_texture_3d
_AddRef
,
d3d8_texture_3d
_Release
,
/* IDirect3DResource8 */
IDirect3DVolumeTexture8Impl
_GetDevice
,
IDirect3DVolumeTexture8Impl
_SetPrivateData
,
IDirect3DVolumeTexture8Impl
_GetPrivateData
,
IDirect3DVolumeTexture8Impl
_FreePrivateData
,
IDirect3DVolumeTexture8Impl
_SetPriority
,
IDirect3DVolumeTexture8Impl
_GetPriority
,
IDirect3DVolumeTexture8Impl
_PreLoad
,
IDirect3DVolumeTexture8Impl
_GetType
,
d3d8_texture_3d
_GetDevice
,
d3d8_texture_3d
_SetPrivateData
,
d3d8_texture_3d
_GetPrivateData
,
d3d8_texture_3d
_FreePrivateData
,
d3d8_texture_3d
_SetPriority
,
d3d8_texture_3d
_GetPriority
,
d3d8_texture_3d
_PreLoad
,
d3d8_texture_3d
_GetType
,
/* IDirect3DBaseTexture8 */
IDirect3DVolumeTexture8Impl
_SetLOD
,
IDirect3DVolumeTexture8Impl
_GetLOD
,
IDirect3DVolumeTexture8Impl
_GetLevelCount
,
d3d8_texture_3d
_SetLOD
,
d3d8_texture_3d
_GetLOD
,
d3d8_texture_3d
_GetLevelCount
,
/* IDirect3DVolumeTexture8 */
IDirect3DVolumeTexture8Impl
_GetLevelDesc
,
IDirect3DVolumeTexture8Impl
_GetVolumeLevel
,
IDirect3DVolumeTexture8Impl
_LockBox
,
IDirect3DVolumeTexture8Impl
_UnlockBox
,
IDirect3DVolumeTexture8Impl
_AddDirtyBox
d3d8_texture_3d
_GetLevelDesc
,
d3d8_texture_3d
_GetVolumeLevel
,
d3d8_texture_3d
_LockBox
,
d3d8_texture_3d
_UnlockBox
,
d3d8_texture_3d
_AddDirtyBox
};
static
void
STDMETHODCALLTYPE
volumetexture_wined3d_object_destroyed
(
void
*
parent
)
...
...
@@ -391,13 +383,13 @@ static const struct wined3d_parent_ops d3d8_volumetexture_wined3d_parent_ops =
volumetexture_wined3d_object_destroyed
,
};
HRESULT
volumetexture_init
(
IDirect3DVolumeTexture8Impl
*
texture
,
IDirect3DDevice8Impl
*
device
,
HRESULT
volumetexture_init
(
struct
d3d8_texture
*
texture
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
{
HRESULT
hr
;
texture
->
IDirect3D
VolumeTexture8_iface
.
lpVtbl
=
&
Direct3DVolumeTexture8_Vtbl
;
texture
->
ref
=
1
;
texture
->
IDirect3D
BaseTexture8_iface
.
lpVtbl
=
(
const
IDirect3DBaseTexture8Vtbl
*
)
&
Direct3DVolumeTexture8_Vtbl
;
texture
->
ref
count
=
1
;
wined3d_mutex_lock
();
hr
=
wined3d_texture_create_3d
(
device
->
wined3d_device
,
width
,
height
,
depth
,
levels
,
...
...
@@ -410,8 +402,8 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture8Impl *texture, IDirect3DDevice
return
hr
;
}
texture
->
parent
D
evice
=
&
device
->
IDirect3DDevice8_iface
;
IDirect3DDevice8_AddRef
(
texture
->
parent
D
evice
);
texture
->
parent
_d
evice
=
&
device
->
IDirect3DDevice8_iface
;
IDirect3DDevice8_AddRef
(
texture
->
parent
_d
evice
);
return
D3D_OK
;
}
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