Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
7bb17f49
Commit
7bb17f49
authored
12 years ago
by
Henri Verbeet
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
d3d8: Get rid of IDirect3DTexture8Impl.
parent
e0390da6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/d3d8/d3d8_private.h
+9
-17
9 additions, 17 deletions
dlls/d3d8/d3d8_private.h
dlls/d3d8/device.c
+1
-1
1 addition, 1 deletion
dlls/d3d8/device.c
dlls/d3d8/texture.c
+94
-100
94 additions, 100 deletions
dlls/d3d8/texture.c
with
104 additions
and
118 deletions
dlls/d3d8/d3d8_private.h
+
9
−
17
View file @
7bb17f49
...
...
@@ -104,7 +104,6 @@ typedef struct IDirect3DBaseTexture8Impl IDirect3DBaseTexture8Impl;
typedef
struct
IDirect3DVolumeTexture8Impl
IDirect3DVolumeTexture8Impl
;
typedef
struct
IDirect3D8Impl
IDirect3D8Impl
;
typedef
struct
IDirect3DDevice8Impl
IDirect3DDevice8Impl
;
typedef
struct
IDirect3DTexture8Impl
IDirect3DTexture8Impl
;
typedef
struct
IDirect3DCubeTexture8Impl
IDirect3DCubeTexture8Impl
;
typedef
struct
IDirect3DIndexBuffer8Impl
IDirect3DIndexBuffer8Impl
;
typedef
struct
IDirect3DSurface8Impl
IDirect3DSurface8Impl
;
...
...
@@ -311,6 +310,14 @@ struct IDirect3DBaseTexture8Impl
struct
wined3d_texture
*
wined3d_texture
;
};
struct
d3d8_texture
{
IDirect3DTexture8
IDirect3DTexture8_iface
;
LONG
refcount
;
struct
wined3d_texture
*
wined3d_texture
;
IDirect3DDevice8
*
parent_device
;
};
/* --------------------- */
/* IDirect3DCubeTexture8 */
/* --------------------- */
...
...
@@ -329,22 +336,7 @@ struct IDirect3DCubeTexture8Impl
HRESULT
cubetexture_init
(
IDirect3DCubeTexture8Impl
*
texture
,
IDirect3DDevice8Impl
*
device
,
UINT
edge_length
,
UINT
levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
DECLSPEC_HIDDEN
;
/* ----------------- */
/* IDirect3DTexture8 */
/* ----------------- */
/*****************************************************************************
* IDirect3DTexture8 implementation structure
*/
struct
IDirect3DTexture8Impl
{
IDirect3DTexture8
IDirect3DTexture8_iface
;
LONG
ref
;
struct
wined3d_texture
*
wined3d_texture
;
IDirect3DDevice8
*
parentDevice
;
};
HRESULT
texture_init
(
IDirect3DTexture8Impl
*
texture
,
IDirect3DDevice8Impl
*
device
,
HRESULT
texture_init
(
struct
d3d8_texture
*
texture
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
DECLSPEC_HIDDEN
;
/* ----------------------- */
...
...
This diff is collapsed.
Click to expand it.
dlls/d3d8/device.c
+
1
−
1
View file @
7bb17f49
...
...
@@ -685,7 +685,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateTexture(IDirect3DDevice8 *iface
D3DPOOL
pool
,
IDirect3DTexture8
**
texture
)
{
IDirect3DDevice8Impl
*
This
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DT
exture
8Impl
*
object
;
struct
d3d8_t
exture
*
object
;
HRESULT
hr
;
TRACE
(
"iface %p, width %u, height %u, levels %u, usage %#x, format %#x, pool %#x, texture %p.
\n
"
,
...
...
This diff is collapsed.
Click to expand it.
dlls/d3d8/texture.c
+
94
−
100
View file @
7bb17f49
...
...
@@ -23,16 +23,14 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d8
);
/* IDirect3DTexture8 IUnknown parts follow: */
static
inline
IDirect3DTexture8Impl
*
impl_from_IDirect3DTexture8
(
IDirect3DTexture8
*
iface
)
static
inline
struct
d3d8_texture
*
impl_from_IDirect3DTexture8
(
IDirect3DTexture8
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DT
exture
8Impl
,
IDirect3DTexture8_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
d3d8_t
exture
,
IDirect3DTexture8_iface
);
}
static
HRESULT
WINAPI
IDirect3DTexture8Impl_QueryInterface
(
IDirect3DTexture8
*
iface
,
REFIID
riid
,
void
**
ppobj
)
static
HRESULT
WINAPI
d3d8_texture_2d_QueryInterface
(
IDirect3DTexture8
*
iface
,
REFIID
riid
,
void
**
out
)
{
TRACE
(
"iface %p, riid %s, o
bjec
t %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppobj
);
TRACE
(
"iface %p, riid %s, o
u
t %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
out
);
if
(
IsEqualGUID
(
riid
,
&
IID_IDirect3DTexture8
)
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DBaseTexture8
)
...
...
@@ -40,63 +38,62 @@ static HRESULT WINAPI IDirect3DTexture8Impl_QueryInterface(IDirect3DTexture8 *if
||
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
IDirect3DT
exture
8Impl
_AddRef
(
IDirect3DTexture8
*
iface
)
static
ULONG
WINAPI
d3d8_t
exture
_2d
_AddRef
(
IDirect3DTexture8
*
iface
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
texture
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
iface
,
ref
);
if
(
ref
==
1
)
{
IDirect3DDevice8_AddRef
(
This
->
parent
D
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
IDirect3DT
exture
8Impl
_Release
(
IDirect3DTexture8
*
iface
)
static
ULONG
WINAPI
d3d8_t
exture
_2d
_Release
(
IDirect3DTexture8
*
iface
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
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
;
}
/* IDirect3DTexture8 IDirect3DResource8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DTexture8Impl_GetDevice
(
IDirect3DTexture8
*
iface
,
IDirect3DDevice8
**
device
)
static
HRESULT
WINAPI
d3d8_texture_2d_GetDevice
(
IDirect3DTexture8
*
iface
,
IDirect3DDevice8
**
device
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
device
);
*
device
=
This
->
parent
D
evice
;
*
device
=
texture
->
parent
_d
evice
;
IDirect3DDevice8_AddRef
(
*
device
);
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
...
...
@@ -104,152 +101,149 @@ static HRESULT WINAPI IDirect3DTexture8Impl_GetDevice(IDirect3DTexture8 *iface,
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DT
exture
8Impl
_SetPrivateData
(
IDirect3DTexture8
*
iface
,
REFGUID
ref
guid
,
const
void
*
pD
ata
,
DWORD
SizeOfData
,
DWORD
F
lags
)
static
HRESULT
WINAPI
d3d8_t
exture
_2d
_SetPrivateData
(
IDirect3DTexture8
*
iface
,
REFGUID
guid
,
const
void
*
d
ata
,
DWORD
data_size
,
DWORD
f
lags
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
TRACE
(
"iface %p, guid %s, data %p, data_size %u, flags %#x.
\n
"
,
iface
,
debugstr_guid
(
ref
guid
),
pD
ata
,
SizeOfData
,
F
lags
);
iface
,
debugstr_guid
(
guid
),
d
ata
,
data_size
,
f
lags
);
wined3d_mutex_lock
();
resource
=
wined3d_texture_get_resource
(
This
->
wined3d_texture
);
hr
=
wined3d_resource_set_private_data
(
resource
,
ref
guid
,
pD
ata
,
SizeOfData
,
F
lags
);
resource
=
wined3d_texture_get_resource
(
texture
->
wined3d_texture
);
hr
=
wined3d_resource_set_private_data
(
resource
,
guid
,
d
ata
,
data_size
,
f
lags
);
wined3d_mutex_unlock
();
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DT
exture
8Impl
_GetPrivateData
(
IDirect3DTexture8
*
iface
,
REFGUID
ref
guid
,
void
*
pD
ata
,
DWORD
*
pSizeOfData
)
static
HRESULT
WINAPI
d3d8_t
exture
_2d
_GetPrivateData
(
IDirect3DTexture8
*
iface
,
REFGUID
guid
,
void
*
d
ata
,
DWORD
*
data_size
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
TRACE
(
"iface %p, guid %s, data %p, data_size %p.
\n
"
,
iface
,
debugstr_guid
(
ref
guid
),
pD
ata
,
pSizeOfData
);
iface
,
debugstr_guid
(
guid
),
d
ata
,
data_size
);
wined3d_mutex_lock
();
resource
=
wined3d_texture_get_resource
(
This
->
wined3d_texture
);
hr
=
wined3d_resource_get_private_data
(
resource
,
ref
guid
,
pD
ata
,
pSizeOfData
);
resource
=
wined3d_texture_get_resource
(
texture
->
wined3d_texture
);
hr
=
wined3d_resource_get_private_data
(
resource
,
guid
,
d
ata
,
data_size
);
wined3d_mutex_unlock
();
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DTexture8Impl_FreePrivateData
(
IDirect3DTexture8
*
iface
,
REFGUID
refguid
)
static
HRESULT
WINAPI
d3d8_texture_2d_FreePrivateData
(
IDirect3DTexture8
*
iface
,
REFGUID
guid
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
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
IDirect3DT
exture
8Impl
_SetPriority
(
IDirect3DTexture8
*
iface
,
DWORD
P
riority
New
)
static
DWORD
WINAPI
d3d8_t
exture
_2d
_SetPriority
(
IDirect3DTexture8
*
iface
,
DWORD
p
riority
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
DWORD
ret
;
TRACE
(
"iface %p, priority %u.
\n
"
,
iface
,
P
riority
New
);
TRACE
(
"iface %p, priority %u.
\n
"
,
iface
,
p
riority
);
wined3d_mutex_lock
();
ret
=
wined3d_texture_set_priority
(
This
->
wined3d_texture
,
P
riority
New
);
ret
=
wined3d_texture_set_priority
(
texture
->
wined3d_texture
,
p
riority
);
wined3d_mutex_unlock
();
return
ret
;
}
static
DWORD
WINAPI
IDirect3DT
exture
8Impl
_GetPriority
(
IDirect3DTexture8
*
iface
)
static
DWORD
WINAPI
d3d8_t
exture
_2d
_GetPriority
(
IDirect3DTexture8
*
iface
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
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
IDirect3DT
exture
8Impl
_PreLoad
(
IDirect3DTexture8
*
iface
)
static
void
WINAPI
d3d8_t
exture
_2d
_PreLoad
(
IDirect3DTexture8
*
iface
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
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
IDirect3DT
exture
8Impl
_GetType
(
IDirect3DTexture8
*
iface
)
static
D3DRESOURCETYPE
WINAPI
d3d8_t
exture
_2d
_GetType
(
IDirect3DTexture8
*
iface
)
{
TRACE
(
"iface %p.
\n
"
,
iface
);
return
D3DRTYPE_TEXTURE
;
}
/* IDirect3DTexture8 IDirect3DBaseTexture8 Interface follow: */
static
DWORD
WINAPI
IDirect3DTexture8Impl_SetLOD
(
IDirect3DTexture8
*
iface
,
DWORD
LODNew
)
static
DWORD
WINAPI
d3d8_texture_2d_SetLOD
(
IDirect3DTexture8
*
iface
,
DWORD
lod
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
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
IDirect3DT
exture
8Impl
_GetLOD
(
IDirect3DTexture8
*
iface
)
static
DWORD
WINAPI
d3d8_t
exture
_2d
_GetLOD
(
IDirect3DTexture8
*
iface
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
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
IDirect3DT
exture
8Impl
_GetLevelCount
(
IDirect3DTexture8
*
iface
)
static
DWORD
WINAPI
d3d8_t
exture
_2d
_GetLevelCount
(
IDirect3DTexture8
*
iface
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
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
IDirect3DTexture8Impl_GetLevelDesc
(
IDirect3DTexture8
*
iface
,
UINT
level
,
D3DSURFACE_DESC
*
desc
)
static
HRESULT
WINAPI
d3d8_texture_2d_GetLevelDesc
(
IDirect3DTexture8
*
iface
,
UINT
level
,
D3DSURFACE_DESC
*
desc
)
{
IDirect3DT
exture
8Impl
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_t
exture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
HRESULT
hr
=
D3D_OK
;
...
...
@@ -277,10 +271,10 @@ static HRESULT WINAPI IDirect3DTexture8Impl_GetLevelDesc(IDirect3DTexture8 *ifac
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DT
exture
8Impl
_GetSurfaceLevel
(
IDirect3DTexture8
*
iface
,
static
HRESULT
WINAPI
d3d8_t
exture
_2d
_GetSurfaceLevel
(
IDirect3DTexture8
*
iface
,
UINT
level
,
IDirect3DSurface8
**
surface
)
{
IDirect3DT
exture
8Impl
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_t
exture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
TRACE
(
"iface %p, level %u, surface %p.
\n
"
,
iface
,
level
,
surface
);
...
...
@@ -299,10 +293,10 @@ static HRESULT WINAPI IDirect3DTexture8Impl_GetSurfaceLevel(IDirect3DTexture8 *i
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DT
exture
8Impl
_LockRect
(
IDirect3DTexture8
*
iface
,
UINT
level
,
static
HRESULT
WINAPI
d3d8_t
exture
_2d
_LockRect
(
IDirect3DTexture8
*
iface
,
UINT
level
,
D3DLOCKED_RECT
*
locked_rect
,
const
RECT
*
rect
,
DWORD
flags
)
{
IDirect3DT
exture
8Impl
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_t
exture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
HRESULT
hr
;
...
...
@@ -320,9 +314,9 @@ static HRESULT WINAPI IDirect3DTexture8Impl_LockRect(IDirect3DTexture8 *iface, U
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DT
exture
8Impl
_UnlockRect
(
IDirect3DTexture8
*
iface
,
UINT
level
)
static
HRESULT
WINAPI
d3d8_t
exture
_2d
_UnlockRect
(
IDirect3DTexture8
*
iface
,
UINT
level
)
{
IDirect3DT
exture
8Impl
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_t
exture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
HRESULT
hr
;
...
...
@@ -338,9 +332,9 @@ static HRESULT WINAPI IDirect3DTexture8Impl_UnlockRect(IDirect3DTexture8 *iface,
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DT
exture
8Impl
_AddDirtyRect
(
IDirect3DTexture8
*
iface
,
const
RECT
*
dirty_rect
)
static
HRESULT
WINAPI
d3d8_t
exture
_2d
_AddDirtyRect
(
IDirect3DTexture8
*
iface
,
const
RECT
*
dirty_rect
)
{
IDirect3DT
exture
8Impl
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
d3d8_t
exture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, dirty_rect %s.
\n
"
,
...
...
@@ -369,28 +363,28 @@ static HRESULT WINAPI IDirect3DTexture8Impl_AddDirtyRect(IDirect3DTexture8 *ifac
static
const
IDirect3DTexture8Vtbl
Direct3DTexture8_Vtbl
=
{
/* IUnknown */
IDirect3DT
exture
8Impl
_QueryInterface
,
IDirect3DT
exture
8Impl
_AddRef
,
IDirect3DT
exture
8Impl
_Release
,
/* IDirect3DResource8 */
IDirect3DT
exture
8Impl
_GetDevice
,
IDirect3DT
exture
8Impl
_SetPrivateData
,
IDirect3DT
exture
8Impl
_GetPrivateData
,
IDirect3DT
exture
8Impl
_FreePrivateData
,
IDirect3DT
exture
8Impl
_SetPriority
,
IDirect3DT
exture
8Impl
_GetPriority
,
IDirect3DT
exture
8Impl
_PreLoad
,
IDirect3DT
exture
8Impl
_GetType
,
d3d8_t
exture
_2d
_QueryInterface
,
d3d8_t
exture
_2d
_AddRef
,
d3d8_t
exture
_2d
_Release
,
/* IDirect3DResource8 */
d3d8_t
exture
_2d
_GetDevice
,
d3d8_t
exture
_2d
_SetPrivateData
,
d3d8_t
exture
_2d
_GetPrivateData
,
d3d8_t
exture
_2d
_FreePrivateData
,
d3d8_t
exture
_2d
_SetPriority
,
d3d8_t
exture
_2d
_GetPriority
,
d3d8_t
exture
_2d
_PreLoad
,
d3d8_t
exture
_2d
_GetType
,
/* IDirect3dBaseTexture8 */
IDirect3DT
exture
8Impl
_SetLOD
,
IDirect3DT
exture
8Impl
_GetLOD
,
IDirect3DT
exture
8Impl
_GetLevelCount
,
d3d8_t
exture
_2d
_SetLOD
,
d3d8_t
exture
_2d
_GetLOD
,
d3d8_t
exture
_2d
_GetLevelCount
,
/* IDirect3DTexture8 */
IDirect3DT
exture
8Impl
_GetLevelDesc
,
IDirect3DT
exture
8Impl
_GetSurfaceLevel
,
IDirect3DT
exture
8Impl
_LockRect
,
IDirect3DT
exture
8Impl
_UnlockRect
,
IDirect3DT
exture
8Impl
_AddDirtyRect
d3d8_t
exture
_2d
_GetLevelDesc
,
d3d8_t
exture
_2d
_GetSurfaceLevel
,
d3d8_t
exture
_2d
_LockRect
,
d3d8_t
exture
_2d
_UnlockRect
,
d3d8_t
exture
_2d
_AddDirtyRect
,
};
static
void
STDMETHODCALLTYPE
d3d8_texture_wined3d_object_destroyed
(
void
*
parent
)
...
...
@@ -403,13 +397,13 @@ static const struct wined3d_parent_ops d3d8_texture_wined3d_parent_ops =
d3d8_texture_wined3d_object_destroyed
,
};
HRESULT
texture_init
(
IDirect3DT
exture
8Impl
*
texture
,
IDirect3DDevice8Impl
*
device
,
HRESULT
texture_init
(
struct
d3d8_t
exture
*
texture
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
{
HRESULT
hr
;
texture
->
IDirect3DTexture8_iface
.
lpVtbl
=
&
Direct3DTexture8_Vtbl
;
texture
->
ref
=
1
;
texture
->
ref
count
=
1
;
wined3d_mutex_lock
();
hr
=
wined3d_texture_create_2d
(
device
->
wined3d_device
,
width
,
height
,
levels
,
...
...
@@ -422,8 +416,8 @@ HRESULT texture_init(IDirect3DTexture8Impl *texture, IDirect3DDevice8Impl *devic
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
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment