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
a60d4b2d
Commit
a60d4b2d
authored
Dec 03, 2006
by
Markus Amsler
Committed by
Alexandre Julliard
Dec 04, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d: Pass the superior creating object down to the callback functions.
parent
281e0f1c
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
50 additions
and
40 deletions
+50
-40
d3d8_private.h
dlls/d3d8/d3d8_private.h
+8
-8
device.c
dlls/d3d8/device.c
+1
-1
directx.c
dlls/d3d8/directx.c
+4
-4
volume.c
dlls/d3d8/volume.c
+1
-1
d3d9_private.h
dlls/d3d9/d3d9_private.h
+6
-6
device.c
dlls/d3d9/device.c
+2
-2
directx.c
dlls/d3d9/directx.c
+2
-2
volume.c
dlls/d3d9/volume.c
+2
-2
ddraw.c
dlls/ddraw/ddraw.c
+4
-1
device.c
dlls/wined3d/device.c
+6
-3
wined3d_interface.h
include/wine/wined3d_interface.h
+14
-10
No files found.
dlls/d3d8/d3d8_private.h
View file @
a60d4b2d
...
...
@@ -569,26 +569,26 @@ typedef struct IDirect3DPixelShader8Impl {
* Internals functions
*
* to see how not defined it here
*/
*/
/* Callbacks */
extern
HRESULT
WINAPI
D3D8CB_CreateSurface
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
extern
HRESULT
WINAPI
D3D8CB_CreateSurface
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
WINED3DPOOL
Pool
,
UINT
Level
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
);
extern
HRESULT
WINAPI
D3D8CB_CreateVolume
(
IUnknown
*
pDevice
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
extern
HRESULT
WINAPI
D3D8CB_CreateVolume
(
IUnknown
*
pDevice
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
WINED3DFORMAT
Format
,
WINED3DPOOL
Pool
,
DWORD
Usage
,
IWineD3DVolume
**
ppVolume
,
IWineD3DVolume
**
ppVolume
,
HANDLE
*
pSharedHandle
);
extern
HRESULT
WINAPI
D3D8CB_CreateDepthStencilSurface
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
extern
HRESULT
WINAPI
D3D8CB_CreateDepthStencilSurface
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
BOOL
Discard
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
);
extern
HRESULT
WINAPI
D3D8CB_CreateRenderTarget
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
extern
HRESULT
WINAPI
D3D8CB_CreateRenderTarget
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
BOOL
Lockable
,
DWORD
MultisampleQuality
,
BOOL
Lockable
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
);
#endif
/* __WINE_D3DX8_PRIVATE_H */
dlls/d3d8/device.c
View file @
a60d4b2d
...
...
@@ -1604,7 +1604,7 @@ const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl =
};
/* Internal function called back during the CreateDevice to create a render target */
HRESULT
WINAPI
D3D8CB_CreateSurface
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
HRESULT
WINAPI
D3D8CB_CreateSurface
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
WINED3DPOOL
Pool
,
UINT
Level
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
)
{
...
...
dlls/d3d8/directx.c
View file @
a60d4b2d
...
...
@@ -186,9 +186,9 @@ static HMONITOR WINAPI IDirect3D8Impl_GetAdapterMonitor(LPDIRECT3D8 iface, UINT
}
/* Internal function called back during the CreateDevice to create a render target */
HRESULT
WINAPI
D3D8CB_CreateRenderTarget
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
BOOL
Lockable
,
HRESULT
WINAPI
D3D8CB_CreateRenderTarget
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
BOOL
Lockable
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
)
{
HRESULT
res
=
D3D_OK
;
IDirect3DSurface8Impl
*
d3dSurface
=
NULL
;
...
...
@@ -267,7 +267,7 @@ static HRESULT WINAPI D3D8CB_CreateAdditionalSwapChain(IUnknown *device,
}
/* Internal function called back during the CreateDevice to create a render target */
HRESULT
WINAPI
D3D8CB_CreateDepthStencilSurface
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
HRESULT
WINAPI
D3D8CB_CreateDepthStencilSurface
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
BOOL
Discard
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
)
{
...
...
dlls/d3d8/volume.c
View file @
a60d4b2d
...
...
@@ -200,7 +200,7 @@ static const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl =
/* Internal function called back during the CreateVolumeTexture */
HRESULT
WINAPI
D3D8CB_CreateVolume
(
IUnknown
*
pDevice
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
HRESULT
WINAPI
D3D8CB_CreateVolume
(
IUnknown
*
pDevice
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
WINED3DFORMAT
Format
,
WINED3DPOOL
Pool
,
DWORD
Usage
,
IWineD3DVolume
**
ppVolume
,
HANDLE
*
pSharedHandle
)
{
...
...
dlls/d3d9/d3d9_private.h
View file @
a60d4b2d
...
...
@@ -522,23 +522,23 @@ typedef struct IDirect3DQuery9Impl {
/* Callbacks */
extern
HRESULT
WINAPI
D3D9CB_CreateSurface
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
extern
HRESULT
WINAPI
D3D9CB_CreateSurface
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
WINED3DPOOL
Pool
,
UINT
Level
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
);
extern
HRESULT
WINAPI
D3D9CB_CreateVolume
(
IUnknown
*
pDevice
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
extern
HRESULT
WINAPI
D3D9CB_CreateVolume
(
IUnknown
*
pDevice
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
WINED3DFORMAT
Format
,
WINED3DPOOL
Pool
,
DWORD
Usage
,
IWineD3DVolume
**
ppVolume
,
IWineD3DVolume
**
ppVolume
,
HANDLE
*
pSharedHandle
);
extern
HRESULT
WINAPI
D3D9CB_CreateDepthStencilSurface
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
extern
HRESULT
WINAPI
D3D9CB_CreateDepthStencilSurface
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
BOOL
Discard
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
);
extern
HRESULT
WINAPI
D3D9CB_CreateRenderTarget
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
extern
HRESULT
WINAPI
D3D9CB_CreateRenderTarget
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
BOOL
Lockable
,
DWORD
MultisampleQuality
,
BOOL
Lockable
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
);
#endif
/* __WINE_D3D9_PRIVATE_H */
dlls/d3d9/device.c
View file @
a60d4b2d
...
...
@@ -991,10 +991,10 @@ const IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl =
/* Internal function called back during the CreateDevice to create a render target */
HRESULT
WINAPI
D3D9CB_CreateSurface
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
HRESULT
WINAPI
D3D9CB_CreateSurface
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
WINED3DPOOL
Pool
,
UINT
Level
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
)
{
HRESULT
res
=
D3D_OK
;
IDirect3DSurface9Impl
*
d3dSurface
=
NULL
;
BOOL
Lockable
=
TRUE
;
...
...
dlls/d3d9/directx.c
View file @
a60d4b2d
...
...
@@ -176,7 +176,7 @@ static HMONITOR WINAPI IDirect3D9Impl_GetAdapterMonitor(LPDIRECT3D9 iface, UINT
}
/* Internal function called back during the CreateDevice to create a render target */
HRESULT
WINAPI
D3D9CB_CreateRenderTarget
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
HRESULT
WINAPI
D3D9CB_CreateRenderTarget
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
BOOL
Lockable
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
)
{
...
...
@@ -250,7 +250,7 @@ HRESULT WINAPI D3D9CB_CreateAdditionalSwapChain(IUnknown *device,
}
/* Internal function called back during the CreateDevice to create a render target */
HRESULT
WINAPI
D3D9CB_CreateDepthStencilSurface
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
HRESULT
WINAPI
D3D9CB_CreateDepthStencilSurface
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
BOOL
Discard
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
)
{
...
...
dlls/d3d9/volume.c
View file @
a60d4b2d
...
...
@@ -201,9 +201,9 @@ static const IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl =
/* Internal function called back during the CreateVolumeTexture */
HRESULT
WINAPI
D3D9CB_CreateVolume
(
IUnknown
*
pDevice
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
HRESULT
WINAPI
D3D9CB_CreateVolume
(
IUnknown
*
pDevice
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
WINED3DFORMAT
Format
,
WINED3DPOOL
Pool
,
DWORD
Usage
,
IWineD3DVolume
**
ppVolume
,
IWineD3DVolume
**
ppVolume
,
HANDLE
*
pSharedHandle
)
{
IDirect3DVolume9Impl
*
object
;
IDirect3DDevice9Impl
*
This
=
(
IDirect3DDevice9Impl
*
)
pDevice
;
...
...
dlls/ddraw/ddraw.c
View file @
a60d4b2d
...
...
@@ -1656,6 +1656,7 @@ IDirectDrawImpl_RecreateAllSurfaces(IDirectDrawImpl *This)
*****************************************************************************/
static
HRESULT
WINAPI
D3D7CB_CreateSurface
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
WINED3DPOOL
Pool
,
UINT
level
,
...
...
@@ -2640,7 +2641,8 @@ IDirectDrawImpl_EnumSurfaces(IDirectDraw7 *iface,
*
*****************************************************************************/
static
HRESULT
WINAPI
D3D7CB_CreateRenderTarget
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
D3D7CB_CreateRenderTarget
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
...
...
@@ -2674,6 +2676,7 @@ D3D7CB_CreateRenderTarget(IUnknown *device, UINT Width, UINT Height,
static
HRESULT
WINAPI
D3D7CB_CreateDepthStencilSurface
(
IUnknown
*
device
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
...
...
dlls/wined3d/device.c
View file @
a60d4b2d
...
...
@@ -1200,7 +1200,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
for
(
i
=
0
;
i
<
object
->
baseTexture
.
levels
;
i
++
)
{
/* use the callback to create the texture surface */
hr
=
D3DCB_CreateSurface
(
This
->
parent
,
tmpW
,
tmpH
,
Format
,
Usage
,
Pool
,
i
,
&
object
->
surfaces
[
i
],
NULL
);
hr
=
D3DCB_CreateSurface
(
This
->
parent
,
parent
,
tmpW
,
tmpH
,
Format
,
Usage
,
Pool
,
i
,
&
object
->
surfaces
[
i
],
NULL
);
if
(
hr
!=
WINED3D_OK
||
(
(
IWineD3DSurfaceImpl
*
)
object
->
surfaces
[
i
])
->
Flags
&
SFLAG_OVERSIZE
)
{
FIXME
(
"Failed to create surface %p
\n
"
,
object
);
/* clean up */
...
...
@@ -1277,7 +1277,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa
for
(
i
=
0
;
i
<
object
->
baseTexture
.
levels
;
i
++
)
{
/* Create the volume */
D3DCB_CreateVolume
(
This
->
parent
,
Width
,
Height
,
Depth
,
Format
,
Pool
,
Usage
,
D3DCB_CreateVolume
(
This
->
parent
,
parent
,
Width
,
Height
,
Depth
,
Format
,
Pool
,
Usage
,
(
IWineD3DVolume
**
)
&
object
->
volumes
[
i
],
pSharedHandle
);
/* Set its container to this object */
...
...
@@ -1379,7 +1379,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
/* Create the 6 faces */
for
(
j
=
0
;
j
<
6
;
j
++
)
{
hr
=
D3DCB_CreateSurface
(
This
->
parent
,
tmpW
,
tmpW
,
Format
,
Usage
,
Pool
,
hr
=
D3DCB_CreateSurface
(
This
->
parent
,
parent
,
tmpW
,
tmpW
,
Format
,
Usage
,
Pool
,
i
/* Level */
,
&
object
->
surfaces
[
j
][
i
],
pSharedHandle
);
if
(
hr
!=
WINED3D_OK
)
{
...
...
@@ -1725,6 +1725,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
TRACE
(
"calling rendertarget CB
\n
"
);
hr
=
D3DCB_CreateRenderTarget
((
IUnknown
*
)
This
->
parent
,
parent
,
object
->
presentParms
.
BackBufferWidth
,
object
->
presentParms
.
BackBufferHeight
,
object
->
presentParms
.
BackBufferFormat
,
...
...
@@ -1758,6 +1759,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
for
(
i
=
0
;
i
<
object
->
presentParms
.
BackBufferCount
;
i
++
)
{
TRACE
(
"calling rendertarget CB
\n
"
);
hr
=
D3DCB_CreateRenderTarget
((
IUnknown
*
)
This
->
parent
,
parent
,
object
->
presentParms
.
BackBufferWidth
,
object
->
presentParms
.
BackBufferHeight
,
object
->
presentParms
.
BackBufferFormat
,
...
...
@@ -1794,6 +1796,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
TRACE
(
"Creating depth stencil buffer
\n
"
);
if
(
This
->
depthStencilBuffer
==
NULL
)
{
hr
=
D3DCB_CreateDepthStencil
((
IUnknown
*
)
This
->
parent
,
parent
,
object
->
presentParms
.
BackBufferWidth
,
object
->
presentParms
.
BackBufferHeight
,
object
->
presentParms
.
AutoDepthStencilFormat
,
...
...
include/wine/wined3d_interface.h
View file @
a60d4b2d
...
...
@@ -184,9 +184,10 @@ DEFINE_GUID(IID_IWineD3DQuery,
* Callback functions required for predefining surfaces / stencils
*/
typedef
HRESULT
WINAPI
(
*
D3DCB_CREATERENDERTARGETFN
)
(
IUnknown
*
pDevice
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
BOOL
Lockable
,
...
...
@@ -194,7 +195,8 @@ typedef HRESULT WINAPI (*D3DCB_CREATERENDERTARGETFN) (IUnknown *pDevice,
HANDLE
*
pSharedHandle
);
typedef
HRESULT
WINAPI
(
*
D3DCB_CREATESURFACEFN
)
(
IUnknown
*
pDevice
,
UINT
Width
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
...
...
@@ -204,9 +206,10 @@ typedef HRESULT WINAPI (*D3DCB_CREATESURFACEFN) (IUnknown *pDevice,
HANDLE
*
pSharedHandle
);
typedef
HRESULT
WINAPI
(
*
D3DCB_CREATEDEPTHSTENCILSURFACEFN
)
(
IUnknown
*
pDevice
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
BOOL
Discard
,
...
...
@@ -215,9 +218,10 @@ typedef HRESULT WINAPI (*D3DCB_CREATEDEPTHSTENCILSURFACEFN) (IUnknown *pDevice,
typedef
HRESULT
WINAPI
(
*
D3DCB_CREATEVOLUMEFN
)
(
IUnknown
*
pDevice
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
IUnknown
*
pSuperior
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
WINED3DFORMAT
Format
,
WINED3DPOOL
Pool
,
DWORD
Usage
,
...
...
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