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
b8c40f3a
Commit
b8c40f3a
authored
Mar 17, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of IWineD3DCubeTexture.
parent
18c11b9b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
117 deletions
+86
-117
cubetexture.c
dlls/d3d8/cubetexture.c
+23
-23
d3d8_private.h
dlls/d3d8/d3d8_private.h
+2
-6
cubetexture.c
dlls/d3d9/cubetexture.c
+26
-26
d3d9_private.h
dlls/d3d9/d3d9_private.h
+2
-7
ddraw.c
dlls/ddraw/ddraw.c
+1
-2
cubetexture.c
dlls/wined3d/cubetexture.c
+26
-34
device.c
dlls/wined3d/device.c
+4
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-5
wined3d.idl
include/wine/wined3d.idl
+1
-10
No files found.
dlls/d3d8/cubetexture.c
View file @
b8c40f3a
...
...
@@ -60,7 +60,7 @@ static ULONG WINAPI IDirect3DCubeTexture8Impl_AddRef(IDirect3DCubeTexture8 *ifac
{
IUnknown_AddRef
(
This
->
parentDevice
);
wined3d_mutex_lock
();
IWineD3D
CubeTexture_AddRef
(
This
->
wineD3DCubeT
exture
);
IWineD3D
BaseTexture_AddRef
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
}
...
...
@@ -77,10 +77,10 @@ static ULONG WINAPI IDirect3DCubeTexture8Impl_Release(IDirect3DCubeTexture8 *ifa
if
(
ref
==
0
)
{
IDirect3DDevice8
*
parentDevice
=
This
->
parentDevice
;
TRACE
(
"Releasing child %p
\n
"
,
This
->
wineD3DCubeT
exture
);
TRACE
(
"Releasing child %p
.
\n
"
,
This
->
wined3d_t
exture
);
wined3d_mutex_lock
();
IWineD3D
CubeTexture_Release
(
This
->
wineD3DCubeT
exture
);
IWineD3D
BaseTexture_Release
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
/* Release the device last, as it may cause the device to be destroyed. */
...
...
@@ -115,7 +115,7 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_SetPrivateData(IDirect3DCubeText
iface
,
debugstr_guid
(
refguid
),
pData
,
SizeOfData
,
Flags
);
wined3d_mutex_lock
();
hr
=
IWineD3D
CubeTexture_SetPrivateData
(
This
->
wineD3DCubeTexture
,
refguid
,
pData
,
SizeOfData
,
Flags
);
hr
=
IWineD3D
BaseTexture_SetPrivateData
(
This
->
wined3d_texture
,
refguid
,
pData
,
SizeOfData
,
Flags
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -131,7 +131,7 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetPrivateData(IDirect3DCubeText
iface
,
debugstr_guid
(
refguid
),
pData
,
pSizeOfData
);
wined3d_mutex_lock
();
hr
=
IWineD3D
CubeTexture_GetPrivateData
(
This
->
wineD3DCubeTexture
,
refguid
,
pData
,
pSizeOfData
);
hr
=
IWineD3D
BaseTexture_GetPrivateData
(
This
->
wined3d_texture
,
refguid
,
pData
,
pSizeOfData
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -146,7 +146,7 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_FreePrivateData(IDirect3DCubeTex
TRACE
(
"iface %p, guid %s.
\n
"
,
iface
,
debugstr_guid
(
refguid
));
wined3d_mutex_lock
();
hr
=
IWineD3D
CubeTexture_FreePrivateData
(
This
->
wineD3DCubeTexture
,
refguid
);
hr
=
IWineD3D
BaseTexture_FreePrivateData
(
This
->
wined3d_texture
,
refguid
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -161,7 +161,7 @@ static DWORD WINAPI IDirect3DCubeTexture8Impl_SetPriority(IDirect3DCubeTexture8
TRACE
(
"iface %p, priority %u.
\n
"
,
iface
,
PriorityNew
);
wined3d_mutex_lock
();
ret
=
IWineD3D
CubeTexture_SetPriority
(
This
->
wineD3DCubeT
exture
,
PriorityNew
);
ret
=
IWineD3D
BaseTexture_SetPriority
(
This
->
wined3d_t
exture
,
PriorityNew
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -175,7 +175,7 @@ static DWORD WINAPI IDirect3DCubeTexture8Impl_GetPriority(IDirect3DCubeTexture8
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
ret
=
IWineD3D
CubeTexture_GetPriority
(
This
->
wineD3DCubeT
exture
);
ret
=
IWineD3D
BaseTexture_GetPriority
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -188,7 +188,7 @@ static void WINAPI IDirect3DCubeTexture8Impl_PreLoad(IDirect3DCubeTexture8 *ifac
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
IWineD3D
CubeTexture_PreLoad
(
This
->
wineD3DCubeT
exture
);
IWineD3D
BaseTexture_PreLoad
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
}
...
...
@@ -200,7 +200,7 @@ static D3DRESOURCETYPE WINAPI IDirect3DCubeTexture8Impl_GetType(IDirect3DCubeTex
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
type
=
IWineD3D
CubeTexture_GetType
(
This
->
wineD3DCubeT
exture
);
type
=
IWineD3D
BaseTexture_GetType
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
return
type
;
...
...
@@ -215,7 +215,7 @@ static DWORD WINAPI IDirect3DCubeTexture8Impl_SetLOD(IDirect3DCubeTexture8 *ifac
TRACE
(
"iface %p, lod %u.
\n
"
,
iface
,
LODNew
);
wined3d_mutex_lock
();
lod
=
IWineD3D
CubeTexture_SetLOD
(
This
->
wineD3DCubeT
exture
,
LODNew
);
lod
=
IWineD3D
BaseTexture_SetLOD
(
This
->
wined3d_t
exture
,
LODNew
);
wined3d_mutex_unlock
();
return
lod
;
...
...
@@ -229,7 +229,7 @@ static DWORD WINAPI IDirect3DCubeTexture8Impl_GetLOD(IDirect3DCubeTexture8 *ifac
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
lod
=
IWineD3D
CubeTexture_GetLOD
(
This
->
wineD3DCubeT
exture
);
lod
=
IWineD3D
BaseTexture_GetLOD
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
return
lod
;
...
...
@@ -243,7 +243,7 @@ static DWORD WINAPI IDirect3DCubeTexture8Impl_GetLevelCount(IDirect3DCubeTexture
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
cnt
=
IWineD3D
CubeTexture_GetLevelCount
(
This
->
wineD3DCubeT
exture
);
cnt
=
IWineD3D
BaseTexture_GetLevelCount
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
return
cnt
;
...
...
@@ -260,7 +260,7 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetLevelDesc(IDirect3DCubeTextur
TRACE
(
"iface %p, level %u, desc %p.
\n
"
,
iface
,
level
,
desc
);
wined3d_mutex_lock
();
if
(
!
(
sub_resource
=
IWineD3D
CubeTexture_GetSubResource
(
texture
->
wineD3DCubeT
exture
,
level
)))
if
(
!
(
sub_resource
=
IWineD3D
BaseTexture_GetSubResource
(
texture
->
wined3d_t
exture
,
level
)))
hr
=
D3DERR_INVALIDCALL
;
else
{
...
...
@@ -291,8 +291,8 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetCubeMapSurface(IDirect3DCubeT
TRACE
(
"iface %p, face %#x, level %u, surface %p.
\n
"
,
iface
,
face
,
level
,
surface
);
wined3d_mutex_lock
();
sub_resource_idx
=
IWineD3D
CubeTexture_GetLevelCount
(
texture
->
wineD3DCubeT
exture
)
*
face
+
level
;
if
(
!
(
sub_resource
=
IWineD3D
CubeTexture_GetSubResource
(
texture
->
wineD3DCubeT
exture
,
sub_resource_idx
)))
sub_resource_idx
=
IWineD3D
BaseTexture_GetLevelCount
(
texture
->
wined3d_t
exture
)
*
face
+
level
;
if
(
!
(
sub_resource
=
IWineD3D
BaseTexture_GetSubResource
(
texture
->
wined3d_t
exture
,
sub_resource_idx
)))
{
wined3d_mutex_unlock
();
return
D3DERR_INVALIDCALL
;
...
...
@@ -318,8 +318,8 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_LockRect(IDirect3DCubeTexture8 *
iface
,
face
,
level
,
locked_rect
,
rect
,
flags
);
wined3d_mutex_lock
();
sub_resource_idx
=
IWineD3D
CubeTexture_GetLevelCount
(
texture
->
wineD3DCubeT
exture
)
*
face
+
level
;
if
(
!
(
sub_resource
=
IWineD3D
CubeTexture_GetSubResource
(
texture
->
wineD3DCubeT
exture
,
sub_resource_idx
)))
sub_resource_idx
=
IWineD3D
BaseTexture_GetLevelCount
(
texture
->
wined3d_t
exture
)
*
face
+
level
;
if
(
!
(
sub_resource
=
IWineD3D
BaseTexture_GetSubResource
(
texture
->
wined3d_t
exture
,
sub_resource_idx
)))
hr
=
D3DERR_INVALIDCALL
;
else
hr
=
IDirect3DSurface8_LockRect
((
IDirect3DSurface8
*
)
wined3d_resource_get_parent
(
sub_resource
),
...
...
@@ -340,8 +340,8 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_UnlockRect(IDirect3DCubeTexture8
TRACE
(
"iface %p, face %#x, level %u.
\n
"
,
iface
,
face
,
level
);
wined3d_mutex_lock
();
sub_resource_idx
=
IWineD3D
CubeTexture_GetLevelCount
(
texture
->
wineD3DCubeT
exture
)
*
face
+
level
;
if
(
!
(
sub_resource
=
IWineD3D
CubeTexture_GetSubResource
(
texture
->
wineD3DCubeT
exture
,
sub_resource_idx
)))
sub_resource_idx
=
IWineD3D
BaseTexture_GetLevelCount
(
texture
->
wined3d_t
exture
)
*
face
+
level
;
if
(
!
(
sub_resource
=
IWineD3D
BaseTexture_GetSubResource
(
texture
->
wined3d_t
exture
,
sub_resource_idx
)))
hr
=
D3DERR_INVALIDCALL
;
else
hr
=
IDirect3DSurface8_UnlockRect
((
IDirect3DSurface8
*
)
wined3d_resource_get_parent
(
sub_resource
));
...
...
@@ -361,7 +361,7 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_AddDirtyRect(IDirect3DCubeTextur
wined3d_mutex_lock
();
if
(
!
dirty_rect
)
hr
=
IWineD3D
CubeTexture_AddDirtyRegion
(
texture
->
wineD3DCubeT
exture
,
face
,
NULL
);
hr
=
IWineD3D
BaseTexture_AddDirtyRegion
(
texture
->
wined3d_t
exture
,
face
,
NULL
);
else
{
WINED3DBOX
dirty_region
;
...
...
@@ -372,7 +372,7 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_AddDirtyRect(IDirect3DCubeTextur
dirty_region
.
Bottom
=
dirty_rect
->
bottom
;
dirty_region
.
Front
=
0
;
dirty_region
.
Back
=
1
;
hr
=
IWineD3D
CubeTexture_AddDirtyRegion
(
texture
->
wineD3DCubeT
exture
,
face
,
&
dirty_region
);
hr
=
IWineD3D
BaseTexture_AddDirtyRegion
(
texture
->
wined3d_t
exture
,
face
,
&
dirty_region
);
}
wined3d_mutex_unlock
();
...
...
@@ -427,7 +427,7 @@ HRESULT cubetexture_init(IDirect3DCubeTexture8Impl *texture, IDirect3DDevice8Imp
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateCubeTexture
(
device
->
WineD3DDevice
,
edge_length
,
levels
,
usage
&
WINED3DUSAGE_MASK
,
wined3dformat_from_d3dformat
(
format
),
pool
,
texture
,
&
d3d8_cubetexture_wined3d_parent_ops
,
&
texture
->
wine
D3DCubeT
exture
);
&
d3d8_cubetexture_wined3d_parent_ops
,
&
texture
->
wine
d3d_t
exture
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d8/d3d8_private.h
View file @
b8c40f3a
...
...
@@ -340,12 +340,8 @@ struct IDirect3DCubeTexture8Impl
{
IDirect3DCubeTexture8
IDirect3DCubeTexture8_iface
;
LONG
ref
;
/* IDirect3DResource8 fields */
IWineD3DCubeTexture
*
wineD3DCubeTexture
;
/* Parent reference */
IDirect3DDevice8
*
parentDevice
;
IWineD3DBaseTexture
*
wined3d_texture
;
IDirect3DDevice8
*
parentDevice
;
};
HRESULT
cubetexture_init
(
IDirect3DCubeTexture8Impl
*
texture
,
IDirect3DDevice8Impl
*
device
,
...
...
dlls/d3d9/cubetexture.c
View file @
b8c40f3a
...
...
@@ -56,7 +56,7 @@ static ULONG WINAPI IDirect3DCubeTexture9Impl_AddRef(LPDIRECT3DCUBETEXTURE9 ifac
{
IDirect3DDevice9Ex_AddRef
(
This
->
parentDevice
);
wined3d_mutex_lock
();
IWineD3D
CubeTexture_AddRef
(
This
->
wineD3DCubeT
exture
);
IWineD3D
BaseTexture_AddRef
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
}
...
...
@@ -72,10 +72,10 @@ static ULONG WINAPI IDirect3DCubeTexture9Impl_Release(LPDIRECT3DCUBETEXTURE9 ifa
if
(
ref
==
0
)
{
IDirect3DDevice9Ex
*
parentDevice
=
This
->
parentDevice
;
TRACE
(
"Releasing child %p
\n
"
,
This
->
wineD3DCubeT
exture
);
TRACE
(
"Releasing child %p
.
\n
"
,
This
->
wined3d_t
exture
);
wined3d_mutex_lock
();
IWineD3D
CubeTexture_Release
(
This
->
wineD3DCubeT
exture
);
IWineD3D
BaseTexture_Release
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
/* Release the device last, as it may cause the device to be destroyed. */
...
...
@@ -107,7 +107,7 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_SetPrivateData(LPDIRECT3DCUBETEX
iface
,
debugstr_guid
(
refguid
),
pData
,
SizeOfData
,
Flags
);
wined3d_mutex_lock
();
hr
=
IWineD3D
CubeTexture_SetPrivateData
(
This
->
wineD3DCubeTexture
,
refguid
,
pData
,
SizeOfData
,
Flags
);
hr
=
IWineD3D
BaseTexture_SetPrivateData
(
This
->
wined3d_texture
,
refguid
,
pData
,
SizeOfData
,
Flags
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -121,7 +121,7 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetPrivateData(LPDIRECT3DCUBETEX
iface
,
debugstr_guid
(
refguid
),
pData
,
pSizeOfData
);
wined3d_mutex_lock
();
hr
=
IWineD3D
CubeTexture_GetPrivateData
(
This
->
wineD3DCubeTexture
,
refguid
,
pData
,
pSizeOfData
);
hr
=
IWineD3D
BaseTexture_GetPrivateData
(
This
->
wined3d_texture
,
refguid
,
pData
,
pSizeOfData
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -134,7 +134,7 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_FreePrivateData(LPDIRECT3DCUBETE
TRACE
(
"iface %p, guid %s.
\n
"
,
iface
,
debugstr_guid
(
refguid
));
wined3d_mutex_lock
();
hr
=
IWineD3D
CubeTexture_FreePrivateData
(
This
->
wineD3DCubeTexture
,
refguid
);
hr
=
IWineD3D
BaseTexture_FreePrivateData
(
This
->
wined3d_texture
,
refguid
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -147,7 +147,7 @@ static DWORD WINAPI IDirect3DCubeTexture9Impl_SetPriority(LPDIRECT3DCUBETEXTURE9
TRACE
(
"iface %p, priority %u.
\n
"
,
iface
,
PriorityNew
);
wined3d_mutex_lock
();
ret
=
IWineD3D
CubeTexture_SetPriority
(
This
->
wineD3DCubeT
exture
,
PriorityNew
);
ret
=
IWineD3D
BaseTexture_SetPriority
(
This
->
wined3d_t
exture
,
PriorityNew
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -160,7 +160,7 @@ static DWORD WINAPI IDirect3DCubeTexture9Impl_GetPriority(LPDIRECT3DCUBETEXTURE9
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
ret
=
IWineD3D
CubeTexture_GetPriority
(
This
->
wineD3DCubeT
exture
);
ret
=
IWineD3D
BaseTexture_GetPriority
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -172,7 +172,7 @@ static void WINAPI IDirect3DCubeTexture9Impl_PreLoad(LPDIRECT3DCUBETEXTURE9 ifac
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
IWineD3D
CubeTexture_PreLoad
(
This
->
wineD3DCubeT
exture
);
IWineD3D
BaseTexture_PreLoad
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
}
...
...
@@ -183,7 +183,7 @@ static D3DRESOURCETYPE WINAPI IDirect3DCubeTexture9Impl_GetType(LPDIRECT3DCUBETE
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
ret
=
IWineD3D
CubeTexture_GetType
(
This
->
wineD3DCubeT
exture
);
ret
=
IWineD3D
BaseTexture_GetType
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -197,7 +197,7 @@ static DWORD WINAPI IDirect3DCubeTexture9Impl_SetLOD(LPDIRECT3DCUBETEXTURE9 ifac
TRACE
(
"iface %p, lod %u.
\n
"
,
iface
,
LODNew
);
wined3d_mutex_lock
();
ret
=
IWineD3D
CubeTexture_SetLOD
(
This
->
wineD3DCubeT
exture
,
LODNew
);
ret
=
IWineD3D
BaseTexture_SetLOD
(
This
->
wined3d_t
exture
,
LODNew
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -210,7 +210,7 @@ static DWORD WINAPI IDirect3DCubeTexture9Impl_GetLOD(LPDIRECT3DCUBETEXTURE9 ifac
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
ret
=
IWineD3D
CubeTexture_GetLOD
(
This
->
wineD3DCubeT
exture
);
ret
=
IWineD3D
BaseTexture_GetLOD
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -223,7 +223,7 @@ static DWORD WINAPI IDirect3DCubeTexture9Impl_GetLevelCount(LPDIRECT3DCUBETEXTUR
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
ret
=
IWineD3D
CubeTexture_GetLevelCount
(
This
->
wineD3DCubeT
exture
);
ret
=
IWineD3D
BaseTexture_GetLevelCount
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -236,7 +236,7 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_SetAutoGenFilterType(LPDIRECT3DC
TRACE
(
"iface %p, filter_type %#x.
\n
"
,
iface
,
FilterType
);
wined3d_mutex_lock
();
hr
=
IWineD3D
CubeTexture_SetAutoGenFilterType
(
This
->
wineD3DCubeTexture
,
(
WINED3DTEXTUREFILTERTYPE
)
FilterType
);
hr
=
IWineD3D
BaseTexture_SetAutoGenFilterType
(
This
->
wined3d_texture
,
(
WINED3DTEXTUREFILTERTYPE
)
FilterType
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -249,7 +249,7 @@ static D3DTEXTUREFILTERTYPE WINAPI IDirect3DCubeTexture9Impl_GetAutoGenFilterTyp
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
ret
=
(
D3DTEXTUREFILTERTYPE
)
IWineD3DCubeTexture_GetAutoGenFilterType
(
This
->
wineD3DCubeT
exture
);
ret
=
(
D3DTEXTUREFILTERTYPE
)
IWineD3DBaseTexture_GetAutoGenFilterType
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -261,7 +261,7 @@ static void WINAPI IDirect3DCubeTexture9Impl_GenerateMipSubLevels(LPDIRECT3DCUBE
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
IWineD3D
CubeTexture_GenerateMipSubLevels
(
This
->
wineD3DCubeT
exture
);
IWineD3D
BaseTexture_GenerateMipSubLevels
(
This
->
wined3d_t
exture
);
wined3d_mutex_unlock
();
}
...
...
@@ -276,7 +276,7 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(IDirect3DCubeTextur
TRACE
(
"iface %p, level %u, desc %p.
\n
"
,
iface
,
level
,
desc
);
wined3d_mutex_lock
();
if
(
!
(
sub_resource
=
IWineD3D
CubeTexture_GetSubResource
(
texture
->
wineD3DCubeT
exture
,
level
)))
if
(
!
(
sub_resource
=
IWineD3D
BaseTexture_GetSubResource
(
texture
->
wined3d_t
exture
,
level
)))
hr
=
D3DERR_INVALIDCALL
;
else
{
...
...
@@ -307,8 +307,8 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetCubeMapSurface(IDirect3DCubeT
TRACE
(
"iface %p, face %#x, level %u, surface %p.
\n
"
,
iface
,
face
,
level
,
surface
);
wined3d_mutex_lock
();
sub_resource_idx
=
IWineD3D
CubeTexture_GetLevelCount
(
texture
->
wineD3DCubeT
exture
)
*
face
+
level
;
if
(
!
(
sub_resource
=
IWineD3D
CubeTexture_GetSubResource
(
texture
->
wineD3DCubeT
exture
,
sub_resource_idx
)))
sub_resource_idx
=
IWineD3D
BaseTexture_GetLevelCount
(
texture
->
wined3d_t
exture
)
*
face
+
level
;
if
(
!
(
sub_resource
=
IWineD3D
BaseTexture_GetSubResource
(
texture
->
wined3d_t
exture
,
sub_resource_idx
)))
{
wined3d_mutex_unlock
();
return
D3DERR_INVALIDCALL
;
...
...
@@ -333,8 +333,8 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_LockRect(IDirect3DCubeTexture9 *
iface
,
face
,
level
,
locked_rect
,
rect
,
flags
);
wined3d_mutex_lock
();
sub_resource_idx
=
IWineD3D
CubeTexture_GetLevelCount
(
texture
->
wineD3DCubeT
exture
)
*
face
+
level
;
if
(
!
(
sub_resource
=
IWineD3D
CubeTexture_GetSubResource
(
texture
->
wineD3DCubeT
exture
,
sub_resource_idx
)))
sub_resource_idx
=
IWineD3D
BaseTexture_GetLevelCount
(
texture
->
wined3d_t
exture
)
*
face
+
level
;
if
(
!
(
sub_resource
=
IWineD3D
BaseTexture_GetSubResource
(
texture
->
wined3d_t
exture
,
sub_resource_idx
)))
hr
=
D3DERR_INVALIDCALL
;
else
hr
=
IDirect3DSurface9_LockRect
((
IDirect3DSurface9
*
)
wined3d_resource_get_parent
(
sub_resource
),
...
...
@@ -355,8 +355,8 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_UnlockRect(IDirect3DCubeTexture9
TRACE
(
"iface %p, face %#x, level %u.
\n
"
,
iface
,
face
,
level
);
wined3d_mutex_lock
();
sub_resource_idx
=
IWineD3D
CubeTexture_GetLevelCount
(
texture
->
wineD3DCubeT
exture
)
*
face
+
level
;
if
(
!
(
sub_resource
=
IWineD3D
CubeTexture_GetSubResource
(
texture
->
wineD3DCubeT
exture
,
sub_resource_idx
)))
sub_resource_idx
=
IWineD3D
BaseTexture_GetLevelCount
(
texture
->
wined3d_t
exture
)
*
face
+
level
;
if
(
!
(
sub_resource
=
IWineD3D
BaseTexture_GetSubResource
(
texture
->
wined3d_t
exture
,
sub_resource_idx
)))
hr
=
D3DERR_INVALIDCALL
;
else
hr
=
IDirect3DSurface9_UnlockRect
((
IDirect3DSurface9
*
)
wined3d_resource_get_parent
(
sub_resource
));
...
...
@@ -376,7 +376,7 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_AddDirtyRect(IDirect3DCubeTextu
wined3d_mutex_lock
();
if
(
!
dirty_rect
)
hr
=
IWineD3D
CubeTexture_AddDirtyRegion
(
texture
->
wineD3DCubeT
exture
,
face
,
NULL
);
hr
=
IWineD3D
BaseTexture_AddDirtyRegion
(
texture
->
wined3d_t
exture
,
face
,
NULL
);
else
{
WINED3DBOX
dirty_region
;
...
...
@@ -387,7 +387,7 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_AddDirtyRect(IDirect3DCubeTextu
dirty_region
.
Bottom
=
dirty_rect
->
bottom
;
dirty_region
.
Front
=
0
;
dirty_region
.
Back
=
1
;
hr
=
IWineD3D
CubeTexture_AddDirtyRegion
(
texture
->
wineD3DCubeT
exture
,
face
,
&
dirty_region
);
hr
=
IWineD3D
BaseTexture_AddDirtyRegion
(
texture
->
wined3d_t
exture
,
face
,
&
dirty_region
);
}
wined3d_mutex_unlock
();
...
...
@@ -444,7 +444,7 @@ HRESULT cubetexture_init(IDirect3DCubeTexture9Impl *texture, IDirect3DDevice9Imp
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateCubeTexture
(
device
->
WineD3DDevice
,
edge_length
,
levels
,
usage
,
wined3dformat_from_d3dformat
(
format
),
pool
,
texture
,
&
d3d9_cubetexture_wined3d_parent_ops
,
&
texture
->
wine
D3DCubeT
exture
);
&
d3d9_cubetexture_wined3d_parent_ops
,
&
texture
->
wine
d3d_t
exture
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d9/d3d9_private.h
View file @
b8c40f3a
...
...
@@ -330,15 +330,10 @@ typedef struct IDirect3DBaseTexture9Impl
*/
typedef
struct
IDirect3DCubeTexture9Impl
{
/* IUnknown fields */
const
IDirect3DCubeTexture9Vtbl
*
lpVtbl
;
LONG
ref
;
/* IDirect3DResource9 fields */
IWineD3DCubeTexture
*
wineD3DCubeTexture
;
/* Parent reference */
LPDIRECT3DDEVICE9EX
parentDevice
;
IWineD3DBaseTexture
*
wined3d_texture
;
IDirect3DDevice9Ex
*
parentDevice
;
}
IDirect3DCubeTexture9Impl
;
HRESULT
cubetexture_init
(
IDirect3DCubeTexture9Impl
*
texture
,
IDirect3DDevice9Impl
*
device
,
...
...
dlls/ddraw/ddraw.c
View file @
b8c40f3a
...
...
@@ -3438,8 +3438,7 @@ static HRESULT CreateSurface(IDirectDrawImpl *ddraw, DDSURFACEDESC2 *DDSD,
if
(
desc2
.
ddsCaps
.
dwCaps2
&
DDSCAPS2_CUBEMAP
)
{
hr
=
IWineD3DDevice_CreateCubeTexture
(
ddraw
->
wineD3DDevice
,
DDSD
->
dwWidth
,
levels
,
0
,
Format
,
Pool
,
object
,
&
ddraw_null_wined3d_parent_ops
,
(
IWineD3DCubeTexture
**
)
&
object
->
wineD3DTexture
);
Format
,
Pool
,
object
,
&
ddraw_null_wined3d_parent_ops
,
&
object
->
wineD3DTexture
);
}
else
{
...
...
dlls/wined3d/cubetexture.c
View file @
b8c40f3a
/*
* IWineD3DCubeTexture implementation
*
* Copyright 2002-2005 Jason Edmeades
* Copyright 2002-2005 Raphael Junqueira
* Copyright 2005 Oliver Stieber
...
...
@@ -197,19 +195,15 @@ static void cubetexture_cleanup(IWineD3DCubeTextureImpl *This)
basetexture_cleanup
((
IWineD3DBaseTextureImpl
*
)
This
);
}
/* *******************************************
IWineD3DCubeTexture IUnknown parts follow
******************************************* */
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_QueryInterface
(
IWineD3DCubeTexture
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_QueryInterface
(
IWineD3DBaseTexture
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IWineD3DCubeTextureImpl
*
This
=
(
IWineD3DCubeTextureImpl
*
)
iface
;
TRACE
(
"(%p)->(%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DBase
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DResource
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DBaseTexture
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DCubeTexture
))
{
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DBaseTexture
)
)
{
IUnknown_AddRef
(
iface
);
*
ppobj
=
This
;
return
S_OK
;
...
...
@@ -218,14 +212,16 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_QueryInterface(IWineD3DCubeTexture
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IWineD3DCubeTextureImpl_AddRef
(
IWineD3DCubeTexture
*
iface
)
{
static
ULONG
WINAPI
IWineD3DCubeTextureImpl_AddRef
(
IWineD3DBaseTexture
*
iface
)
{
IWineD3DCubeTextureImpl
*
This
=
(
IWineD3DCubeTextureImpl
*
)
iface
;
TRACE
(
"(%p) : AddRef increasing from %d
\n
"
,
This
,
This
->
resource
.
ref
);
return
InterlockedIncrement
(
&
This
->
resource
.
ref
);
}
/* Do not call while under the GL lock. */
static
ULONG
WINAPI
IWineD3DCubeTextureImpl_Release
(
IWineD3DCubeTexture
*
iface
)
{
static
ULONG
WINAPI
IWineD3DCubeTextureImpl_Release
(
IWineD3DBaseTexture
*
iface
)
{
IWineD3DCubeTextureImpl
*
This
=
(
IWineD3DCubeTextureImpl
*
)
iface
;
ULONG
ref
;
TRACE
(
"(%p) : Releasing from %d
\n
"
,
This
,
This
->
resource
.
ref
);
...
...
@@ -239,87 +235,83 @@ static ULONG WINAPI IWineD3DCubeTextureImpl_Release(IWineD3DCubeTexture *iface)
return
ref
;
}
/* ****************************************************
IWineD3DCubeTexture IWineD3DResource parts follow
**************************************************** */
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_SetPrivateData
(
IWineD3DCubeTexture
*
iface
,
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_SetPrivateData
(
IWineD3DBaseTexture
*
iface
,
REFGUID
riid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
{
return
resource_set_private_data
(
&
((
IWineD3DCubeTextureImpl
*
)
iface
)
->
resource
,
riid
,
data
,
data_size
,
flags
);
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_GetPrivateData
(
IWineD3D
Cub
eTexture
*
iface
,
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_GetPrivateData
(
IWineD3D
Bas
eTexture
*
iface
,
REFGUID
guid
,
void
*
data
,
DWORD
*
data_size
)
{
return
resource_get_private_data
(
&
((
IWineD3DCubeTextureImpl
*
)
iface
)
->
resource
,
guid
,
data
,
data_size
);
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_FreePrivateData
(
IWineD3D
Cub
eTexture
*
iface
,
REFGUID
refguid
)
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_FreePrivateData
(
IWineD3D
Bas
eTexture
*
iface
,
REFGUID
refguid
)
{
return
resource_free_private_data
(
&
((
IWineD3DCubeTextureImpl
*
)
iface
)
->
resource
,
refguid
);
}
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_SetPriority
(
IWineD3D
Cub
eTexture
*
iface
,
DWORD
priority
)
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_SetPriority
(
IWineD3D
Bas
eTexture
*
iface
,
DWORD
priority
)
{
return
resource_set_priority
(
&
((
IWineD3DCubeTextureImpl
*
)
iface
)
->
resource
,
priority
);
}
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_GetPriority
(
IWineD3D
Cub
eTexture
*
iface
)
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_GetPriority
(
IWineD3D
Bas
eTexture
*
iface
)
{
return
resource_get_priority
(
&
((
IWineD3DCubeTextureImpl
*
)
iface
)
->
resource
);
}
/* Do not call while under the GL lock. */
static
void
WINAPI
IWineD3DCubeTextureImpl_PreLoad
(
IWineD3D
Cub
eTexture
*
iface
)
static
void
WINAPI
IWineD3DCubeTextureImpl_PreLoad
(
IWineD3D
Bas
eTexture
*
iface
)
{
cubetexture_preload
((
IWineD3DBaseTextureImpl
*
)
iface
,
SRGB_ANY
);
}
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DCubeTextureImpl_GetType
(
IWineD3D
Cub
eTexture
*
iface
)
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DCubeTextureImpl_GetType
(
IWineD3D
Bas
eTexture
*
iface
)
{
return
resource_get_type
(
&
((
IWineD3DCubeTextureImpl
*
)
iface
)
->
resource
);
}
static
void
*
WINAPI
IWineD3DCubeTextureImpl_GetParent
(
IWineD3D
Cub
eTexture
*
iface
)
static
void
*
WINAPI
IWineD3DCubeTextureImpl_GetParent
(
IWineD3D
Bas
eTexture
*
iface
)
{
TRACE
(
"iface %p.
\n
"
,
iface
);
return
((
IWineD3DCubeTextureImpl
*
)
iface
)
->
resource
.
parent
;
}
/* ******************************************************
IWineD3DCubeTexture IWineD3DBaseTexture parts follow
****************************************************** */
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_SetLOD
(
IWineD3DCubeTexture
*
iface
,
DWORD
LODNew
)
{
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_SetLOD
(
IWineD3DBaseTexture
*
iface
,
DWORD
LODNew
)
{
return
basetexture_set_lod
((
IWineD3DBaseTextureImpl
*
)
iface
,
LODNew
);
}
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_GetLOD
(
IWineD3DCubeTexture
*
iface
)
{
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_GetLOD
(
IWineD3DBaseTexture
*
iface
)
{
return
basetexture_get_lod
((
IWineD3DBaseTextureImpl
*
)
iface
);
}
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_GetLevelCount
(
IWineD3D
Cub
eTexture
*
iface
)
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_GetLevelCount
(
IWineD3D
Bas
eTexture
*
iface
)
{
return
basetexture_get_level_count
((
IWineD3DBaseTextureImpl
*
)
iface
);
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_SetAutoGenFilterType
(
IWineD3D
Cub
eTexture
*
iface
,
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_SetAutoGenFilterType
(
IWineD3D
Bas
eTexture
*
iface
,
WINED3DTEXTUREFILTERTYPE
FilterType
)
{
return
basetexture_set_autogen_filter_type
((
IWineD3DBaseTextureImpl
*
)
iface
,
FilterType
);
}
static
WINED3DTEXTUREFILTERTYPE
WINAPI
IWineD3DCubeTextureImpl_GetAutoGenFilterType
(
IWineD3D
Cub
eTexture
*
iface
)
static
WINED3DTEXTUREFILTERTYPE
WINAPI
IWineD3DCubeTextureImpl_GetAutoGenFilterType
(
IWineD3D
Bas
eTexture
*
iface
)
{
return
basetexture_get_autogen_filter_type
((
IWineD3DBaseTextureImpl
*
)
iface
);
}
static
void
WINAPI
IWineD3DCubeTextureImpl_GenerateMipSubLevels
(
IWineD3D
Cub
eTexture
*
iface
)
static
void
WINAPI
IWineD3DCubeTextureImpl_GenerateMipSubLevels
(
IWineD3D
Bas
eTexture
*
iface
)
{
basetexture_generate_mipmaps
((
IWineD3DBaseTextureImpl
*
)
iface
);
}
static
struct
wined3d_resource
*
WINAPI
IWineD3DCubeTextureImpl_GetSubResource
(
IWineD3D
Cub
eTexture
*
iface
,
static
struct
wined3d_resource
*
WINAPI
IWineD3DCubeTextureImpl_GetSubResource
(
IWineD3D
Bas
eTexture
*
iface
,
UINT
sub_resource_idx
)
{
IWineD3DBaseTextureImpl
*
texture
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
...
...
@@ -329,7 +321,7 @@ static struct wined3d_resource * WINAPI IWineD3DCubeTextureImpl_GetSubResource(I
return
basetexture_get_sub_resource
(
texture
,
sub_resource_idx
);
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_AddDirtyRegion
(
IWineD3D
Cub
eTexture
*
iface
,
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_AddDirtyRegion
(
IWineD3D
Bas
eTexture
*
iface
,
UINT
layer
,
const
WINED3DBOX
*
dirty_region
)
{
IWineD3DBaseTextureImpl
*
texture
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
...
...
@@ -349,7 +341,7 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_AddDirtyRegion(IWineD3DCubeTexture
return
WINED3D_OK
;
}
static
const
IWineD3D
Cub
eTextureVtbl
IWineD3DCubeTexture_Vtbl
=
static
const
IWineD3D
Bas
eTextureVtbl
IWineD3DCubeTexture_Vtbl
=
{
/* IUnknown */
IWineD3DCubeTextureImpl_QueryInterface
,
...
...
dlls/wined3d/device.c
View file @
b8c40f3a
...
...
@@ -1204,7 +1204,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface, UIN
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateCubeTexture
(
IWineD3DDevice
*
iface
,
UINT
EdgeLength
,
UINT
Levels
,
DWORD
Usage
,
enum
wined3d_format_id
Format
,
WINED3DPOOL
Pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
IWineD3D
CubeTexture
**
ppCubeT
exture
)
const
struct
wined3d_parent_ops
*
parent_ops
,
IWineD3D
BaseTexture
**
t
exture
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DCubeTextureImpl
*
object
;
/** NOTE: impl ref allowed since this is a create function **/
...
...
@@ -1214,7 +1214,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
if
(
!
object
)
{
ERR
(
"Out of memory
\n
"
);
*
ppCubeT
exture
=
NULL
;
*
t
exture
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
...
...
@@ -1223,12 +1223,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
{
WARN
(
"Failed to initialize cubetexture, returning %#x
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppCubeT
exture
=
NULL
;
*
t
exture
=
NULL
;
return
hr
;
}
TRACE
(
"(%p) : Created Cube Texture %p
\n
"
,
This
,
object
);
*
ppCubeTexture
=
(
IWineD3DCub
eTexture
*
)
object
;
*
texture
=
(
IWineD3DBas
eTexture
*
)
object
;
return
WINED3D_OK
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
b8c40f3a
...
...
@@ -1962,13 +1962,9 @@ HRESULT volumetexture_init(IWineD3DBaseTextureImpl *texture, UINT width, UINT he
UINT
depth
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* IWineD3DCubeTexture implementation structure (extends IWineD3DBaseTextureImpl)
*/
typedef
struct
IWineD3DCubeTextureImpl
{
/* IUnknown & WineD3DResource/WineD3DBaseTexture Information */
const
IWineD3DCubeTextureVtbl
*
lpVtbl
;
const
IWineD3DBaseTextureVtbl
*
lpVtbl
;
struct
wined3d_resource
resource
;
IWineD3DBaseTextureClass
baseTexture
;
}
IWineD3DCubeTextureImpl
;
...
...
include/wine/wined3d.idl
View file @
b8c40f3a
...
...
@@ -2368,15 +2368,6 @@ interface IWineD3DBaseTexture : IWineD3DResource
[
object
,
local
,
uuid
(
41752900
-
6
f30
-
11
d9
-
c687
-
00046142
c14f
)
]
interface
IWineD3DCubeTexture
:
IWineD3DBaseTexture
{
}
[
object
,
local
,
uuid
(
34
d01b10
-
6
f30
-
11
d9
-
c687
-
00046142
c14f
)
]
interface
IWineD3DSwapChain
:
IWineD3DBase
...
...
@@ -2564,7 +2555,7 @@ interface IWineD3DDevice : IUnknown
[
in
]
WINED3DPOOL
pool
,
[
in
]
void
*
parent
,
[
in
]
const
struct
wined3d_parent_ops
*
parent_ops
,
[
out
]
IWineD3D
Cub
eTexture
**
texture
[
out
]
IWineD3D
Bas
eTexture
**
texture
)
;
HRESULT
CreateQuery
(
[
in
]
WINED3DQUERYTYPE
type
,
...
...
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