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
bb6ae095
Commit
bb6ae095
authored
Jan 26, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Pass an object instead of an iface to an internal function.
parent
629e8538
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
18 deletions
+30
-18
device.c
dlls/d3d8/device.c
+30
-18
No files found.
dlls/d3d8/device.c
View file @
bb6ae095
...
@@ -808,17 +808,17 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateIndexBuffer(IDirect3DDevice8 *i
...
@@ -808,17 +808,17 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateIndexBuffer(IDirect3DDevice8 *i
return
D3D_OK
;
return
D3D_OK
;
}
}
static
HRESULT
IDirect3DDevice8Impl_CreateSurface
(
LPDIRECT3DDEVICE8
iface
,
UINT
Width
,
UINT
Height
,
static
HRESULT
IDirect3DDevice8Impl_CreateSurface
(
IDirect3DDevice8Impl
*
device
,
UINT
Width
,
D3DFORMAT
Format
,
BOOL
Lockable
,
BOOL
Discard
,
UINT
Level
,
IDirect3DSurface8
**
ppSurface
,
UINT
Height
,
D3DFORMAT
Format
,
BOOL
Lockable
,
BOOL
Discard
,
UINT
Level
,
UINT
Usage
,
D3DPOOL
Pool
,
D3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
)
IDirect3DSurface8
**
ppSurface
,
UINT
Usage
,
D3DPOOL
Pool
,
D3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
)
{
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
IDirect3DSurface8Impl
*
object
;
IDirect3DSurface8Impl
*
object
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"
ifa
ce %p, width %u, height %u, format %#x, lockable %#x, discard %#x, level %u, surface %p,
\n
"
TRACE
(
"
devi
ce %p, width %u, height %u, format %#x, lockable %#x, discard %#x, level %u, surface %p,
\n
"
"
\t
usage %#x, pool %#x, multisample_type %#x, multisample_quality %u.
\n
"
,
"
\t
usage %#x, pool %#x, multisample_type %#x, multisample_quality %u.
\n
"
,
ifa
ce
,
Width
,
Height
,
Format
,
Lockable
,
Discard
,
Level
,
ppSurface
,
devi
ce
,
Width
,
Height
,
Format
,
Lockable
,
Discard
,
Level
,
ppSurface
,
Usage
,
Pool
,
MultiSample
,
MultisampleQuality
);
Usage
,
Pool
,
MultiSample
,
MultisampleQuality
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DSurface8Impl
));
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DSurface8Impl
));
...
@@ -828,8 +828,8 @@ static HRESULT IDirect3DDevice8Impl_CreateSurface(LPDIRECT3DDEVICE8 iface, UINT
...
@@ -828,8 +828,8 @@ static HRESULT IDirect3DDevice8Impl_CreateSurface(LPDIRECT3DDEVICE8 iface, UINT
return
D3DERR_OUTOFVIDEOMEMORY
;
return
D3DERR_OUTOFVIDEOMEMORY
;
}
}
hr
=
surface_init
(
object
,
This
,
Width
,
Height
,
Format
,
Lockable
,
Discard
,
hr
=
surface_init
(
object
,
device
,
Width
,
Height
,
Format
,
Lockable
,
Discard
,
Level
,
Usage
,
Level
,
Usage
,
Pool
,
MultiSample
,
MultisampleQuality
);
Pool
,
MultiSample
,
MultisampleQuality
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
WARN
(
"Failed to initialize surface, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to initialize surface, hr %#x.
\n
"
,
hr
);
...
@@ -843,41 +843,53 @@ static HRESULT IDirect3DDevice8Impl_CreateSurface(LPDIRECT3DDEVICE8 iface, UINT
...
@@ -843,41 +843,53 @@ static HRESULT IDirect3DDevice8Impl_CreateSurface(LPDIRECT3DDEVICE8 iface, UINT
return
D3D_OK
;
return
D3D_OK
;
}
}
static
HRESULT
WINAPI
IDirect3DDevice8Impl_CreateRenderTarget
(
LPDIRECT3DDEVICE8
iface
,
UINT
Width
,
UINT
Height
,
D3DFORMAT
Format
,
D3DMULTISAMPLE_TYPE
MultiSample
,
BOOL
Lockable
,
IDirect3DSurface8
**
ppSurface
)
{
static
HRESULT
WINAPI
IDirect3DDevice8Impl_CreateRenderTarget
(
IDirect3DDevice8
*
iface
,
UINT
Width
,
UINT
Height
,
D3DFORMAT
Format
,
D3DMULTISAMPLE_TYPE
MultiSample
,
BOOL
Lockable
,
IDirect3DSurface8
**
ppSurface
)
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, width %u, height %u, format %#x, multisample_type %#x, lockable %#x, surface %p.
\n
"
,
TRACE
(
"iface %p, width %u, height %u, format %#x, multisample_type %#x, lockable %#x, surface %p.
\n
"
,
iface
,
Width
,
Height
,
Format
,
MultiSample
,
Lockable
,
ppSurface
);
iface
,
Width
,
Height
,
Format
,
MultiSample
,
Lockable
,
ppSurface
);
hr
=
IDirect3DDevice8Impl_CreateSurface
(
iface
,
Width
,
Height
,
Format
,
Lockable
,
FALSE
/* Discard */
,
hr
=
IDirect3DDevice8Impl_CreateSurface
(
This
,
Width
,
Height
,
Format
,
Lockable
,
0
/* Level */
,
ppSurface
,
D3DUSAGE_RENDERTARGET
,
D3DPOOL_DEFAULT
,
MultiSample
,
0
);
FALSE
/* Discard */
,
0
/* Level */
,
ppSurface
,
D3DUSAGE_RENDERTARGET
,
D3DPOOL_DEFAULT
,
MultiSample
,
0
);
return
hr
;
return
hr
;
}
}
static
HRESULT
WINAPI
IDirect3DDevice8Impl_CreateDepthStencilSurface
(
LPDIRECT3DDEVICE8
iface
,
UINT
Width
,
UINT
Height
,
D3DFORMAT
Format
,
D3DMULTISAMPLE_TYPE
MultiSample
,
IDirect3DSurface8
**
ppSurface
)
{
static
HRESULT
WINAPI
IDirect3DDevice8Impl_CreateDepthStencilSurface
(
IDirect3DDevice8
*
iface
,
UINT
Width
,
UINT
Height
,
D3DFORMAT
Format
,
D3DMULTISAMPLE_TYPE
MultiSample
,
IDirect3DSurface8
**
ppSurface
)
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, width %u, height %u, format %#x, multisample_type %#x, surface %p.
\n
"
,
TRACE
(
"iface %p, width %u, height %u, format %#x, multisample_type %#x, surface %p.
\n
"
,
iface
,
Width
,
Height
,
Format
,
MultiSample
,
ppSurface
);
iface
,
Width
,
Height
,
Format
,
MultiSample
,
ppSurface
);
/* TODO: Verify that Discard is false */
/* TODO: Verify that Discard is false */
hr
=
IDirect3DDevice8Impl_CreateSurface
(
iface
,
Width
,
Height
,
Format
,
TRUE
/* Lockable */
,
FALSE
,
hr
=
IDirect3DDevice8Impl_CreateSurface
(
This
,
Width
,
Height
,
Format
,
TRUE
/* Lockable */
,
FALSE
,
0
/* Level */
,
ppSurface
,
D3DUSAGE_DEPTHSTENCIL
,
D3DPOOL_DEFAULT
,
MultiSample
,
0
);
0
/* Level */
,
ppSurface
,
D3DUSAGE_DEPTHSTENCIL
,
D3DPOOL_DEFAULT
,
MultiSample
,
0
);
return
hr
;
return
hr
;
}
}
/* IDirect3DDevice8Impl::CreateImageSurface returns surface with pool type SYSTEMMEM */
/* IDirect3DDevice8Impl::CreateImageSurface returns surface with pool type SYSTEMMEM */
static
HRESULT
WINAPI
IDirect3DDevice8Impl_CreateImageSurface
(
LPDIRECT3DDEVICE8
iface
,
UINT
Width
,
UINT
Height
,
D3DFORMAT
Format
,
IDirect3DSurface8
**
ppSurface
)
{
static
HRESULT
WINAPI
IDirect3DDevice8Impl_CreateImageSurface
(
IDirect3DDevice8
*
iface
,
UINT
Width
,
UINT
Height
,
D3DFORMAT
Format
,
IDirect3DSurface8
**
ppSurface
)
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, width %u, height %u, format %#x, surface %p.
\n
"
,
TRACE
(
"iface %p, width %u, height %u, format %#x, surface %p.
\n
"
,
iface
,
Width
,
Height
,
Format
,
ppSurface
);
iface
,
Width
,
Height
,
Format
,
ppSurface
);
hr
=
IDirect3DDevice8Impl_CreateSurface
(
iface
,
Width
,
Height
,
Format
,
TRUE
/* Lockable */
,
FALSE
/* Discard
*/
,
hr
=
IDirect3DDevice8Impl_CreateSurface
(
This
,
Width
,
Height
,
Format
,
TRUE
/* Lockable
*/
,
0
/* Level */
,
ppSurface
,
0
/* Usage (undefined/none) */
,
D3DPOOL_SYSTEMMEM
,
D3DMULTISAMPLE_NONE
,
FALSE
/* Discard */
,
0
/* Level */
,
ppSurface
,
0
/* Usage (undefined/none) */
,
0
/* MultisampleQuality */
);
D3DPOOL_SYSTEMMEM
,
D3DMULTISAMPLE_NONE
,
0
/* MultisampleQuality */
);
return
hr
;
return
hr
;
}
}
...
@@ -2621,7 +2633,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
...
@@ -2621,7 +2633,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
if
(
pool
==
WINED3DPOOL_DEFAULT
&&
!
(
usage
&
WINED3DUSAGE_DYNAMIC
))
lockable
=
FALSE
;
if
(
pool
==
WINED3DPOOL_DEFAULT
&&
!
(
usage
&
WINED3DUSAGE_DYNAMIC
))
lockable
=
FALSE
;
hr
=
IDirect3DDevice8Impl_CreateSurface
(
(
IDirect3DDevice8
*
)
This
,
width
,
height
,
hr
=
IDirect3DDevice8Impl_CreateSurface
(
This
,
width
,
height
,
d3dformat_from_wined3dformat
(
format
),
lockable
,
FALSE
/* Discard */
,
level
,
d3dformat_from_wined3dformat
(
format
),
lockable
,
FALSE
/* Discard */
,
level
,
(
IDirect3DSurface8
**
)
&
d3d_surface
,
usage
,
pool
,
D3DMULTISAMPLE_NONE
,
0
/* MultisampleQuality */
);
(
IDirect3DSurface8
**
)
&
d3d_surface
,
usage
,
pool
,
D3DMULTISAMPLE_NONE
,
0
/* MultisampleQuality */
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
...
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