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
ec466ff3
Commit
ec466ff3
authored
May 23, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
May 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Get rid of IDirect3DSurface8Impl.
parent
baa5ceec
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
39 deletions
+30
-39
d3d8_private.h
dlls/d3d8/d3d8_private.h
+5
-13
device.c
dlls/d3d8/device.c
+18
-19
surface.c
dlls/d3d8/surface.c
+0
-0
swapchain.c
dlls/d3d8/swapchain.c
+1
-1
texture.c
dlls/d3d8/texture.c
+6
-6
No files found.
dlls/d3d8/d3d8_private.h
View file @
ec466ff3
...
...
@@ -100,7 +100,6 @@
void
fixup_caps
(
WINED3DCAPS
*
pWineCaps
)
DECLSPEC_HIDDEN
;
typedef
struct
IDirect3DSurface8Impl
IDirect3DSurface8Impl
;
typedef
struct
IDirect3DVolume8Impl
IDirect3DVolume8Impl
;
struct
d3d8
...
...
@@ -199,19 +198,12 @@ struct d3d8_swapchain
HRESULT
swapchain_init
(
struct
d3d8_swapchain
*
swapchain
,
struct
d3d8_device
*
device
,
D3DPRESENT_PARAMETERS
*
present_parameters
)
DECLSPEC_HIDDEN
;
/* ----------------- */
/* IDirect3DSurface8 */
/* ----------------- */
/*****************************************************************************
* IDirect3DSurface8 implementation structure
*/
struct
IDirect3DSurface8Impl
struct
d3d8_surface
{
IDirect3DSurface8
IDirect3DSurface8_iface
;
LONG
ref
;
LONG
ref
count
;
struct
wined3d_surface
*
wined3d_surface
;
IDirect3DDevice8
*
parent
D
evice
;
IDirect3DDevice8
*
parent
_d
evice
;
/* The surface container */
IUnknown
*
container
;
...
...
@@ -220,10 +212,10 @@ struct IDirect3DSurface8Impl
IUnknown
*
forwardReference
;
};
HRESULT
surface_init
(
IDirect3DSurface8Impl
*
surface
,
struct
d3d8_device
*
device
,
HRESULT
surface_init
(
struct
d3d8_surface
*
surface
,
struct
d3d8_device
*
device
,
UINT
width
,
UINT
height
,
D3DFORMAT
format
,
BOOL
lockable
,
BOOL
discard
,
UINT
level
,
DWORD
usage
,
D3DPOOL
pool
,
D3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
)
DECLSPEC_HIDDEN
;
IDirect3DSurface8Impl
*
unsafe_impl_from_IDirect3DSurface8
(
IDirect3DSurface8
*
iface
)
DECLSPEC_HIDDEN
;
struct
d3d8_surface
*
unsafe_impl_from_IDirect3DSurface8
(
IDirect3DSurface8
*
iface
)
DECLSPEC_HIDDEN
;
struct
d3d8_vertexbuffer
{
...
...
dlls/d3d8/device.c
View file @
ec466ff3
...
...
@@ -449,7 +449,7 @@ static HRESULT WINAPI d3d8_device_SetCursorProperties(IDirect3DDevice8 *iface,
UINT
hotspot_x
,
UINT
hotspot_y
,
IDirect3DSurface8
*
bitmap
)
{
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DSurface8Impl
*
bitmap_impl
=
unsafe_impl_from_IDirect3DSurface8
(
bitmap
);
struct
d3d8_surface
*
bitmap_impl
=
unsafe_impl_from_IDirect3DSurface8
(
bitmap
);
HRESULT
hr
;
TRACE
(
"iface %p, hotspot_x %u, hotspot_y %u, bitmap %p.
\n
"
,
...
...
@@ -532,7 +532,7 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource)
wined3d_resource_get_desc
(
resource
,
&
desc
);
if
(
desc
.
pool
==
WINED3D_POOL_DEFAULT
)
{
IDirect3DSurface8Impl
*
surface
;
struct
d3d8_surface
*
surface
;
if
(
desc
.
resource_type
!=
WINED3D_RTYPE_SURFACE
)
{
...
...
@@ -541,7 +541,7 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource)
}
surface
=
wined3d_resource_get_parent
(
resource
);
if
(
surface
->
ref
)
if
(
surface
->
ref
count
)
{
WARN
(
"Surface %p (resource %p) in pool D3DPOOL_DEFAULT blocks the Reset call.
\n
"
,
surface
,
resource
);
return
D3DERR_DEVICELOST
;
...
...
@@ -615,7 +615,7 @@ static HRESULT WINAPI d3d8_device_GetBackBuffer(IDirect3DDevice8 *iface,
{
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
iface
);
struct
wined3d_surface
*
wined3d_surface
=
NULL
;
IDirect3DSurface8Impl
*
surface_impl
;
struct
d3d8_surface
*
surface_impl
;
HRESULT
hr
;
TRACE
(
"iface %p, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.
\n
"
,
...
...
@@ -836,7 +836,7 @@ static HRESULT d3d8_device_CreateSurface(struct d3d8_device *device, UINT width,
IDirect3DSurface8
**
surface
,
UINT
usage
,
D3DPOOL
pool
,
D3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
)
{
IDirect3DSurface8Impl
*
object
;
struct
d3d8_surface
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, width %u, height %u, format %#x, lockable %#x, discard %#x, level %u, surface %p,
\n
"
...
...
@@ -844,8 +844,7 @@ static HRESULT d3d8_device_CreateSurface(struct d3d8_device *device, UINT width,
device
,
width
,
height
,
format
,
lockable
,
discard
,
level
,
surface
,
usage
,
pool
,
multisample_type
,
multisample_quality
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DSurface8Impl
));
if
(
!
object
)
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
{
FIXME
(
"Failed to allocate surface memory.
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
...
...
@@ -920,8 +919,8 @@ static HRESULT WINAPI d3d8_device_CopyRects(IDirect3DDevice8 *iface,
IDirect3DSurface8
*
src_surface
,
const
RECT
*
src_rects
,
UINT
rect_count
,
IDirect3DSurface8
*
dst_surface
,
const
POINT
*
dst_points
)
{
IDirect3DSurface8Impl
*
src
=
unsafe_impl_from_IDirect3DSurface8
(
src_surface
);
IDirect3DSurface8Impl
*
dst
=
unsafe_impl_from_IDirect3DSurface8
(
dst_surface
);
struct
d3d8_surface
*
src
=
unsafe_impl_from_IDirect3DSurface8
(
src_surface
);
struct
d3d8_surface
*
dst
=
unsafe_impl_from_IDirect3DSurface8
(
dst_surface
);
enum
wined3d_format_id
src_format
,
dst_format
;
struct
wined3d_resource_desc
wined3d_desc
;
struct
wined3d_resource
*
wined3d_resource
;
...
...
@@ -1042,7 +1041,7 @@ static HRESULT WINAPI d3d8_device_UpdateTexture(IDirect3DDevice8 *iface,
static
HRESULT
WINAPI
d3d8_device_GetFrontBuffer
(
IDirect3DDevice8
*
iface
,
IDirect3DSurface8
*
dst_surface
)
{
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DSurface8Impl
*
dst_impl
=
unsafe_impl_from_IDirect3DSurface8
(
dst_surface
);
struct
d3d8_surface
*
dst_impl
=
unsafe_impl_from_IDirect3DSurface8
(
dst_surface
);
HRESULT
hr
;
TRACE
(
"iface %p, dst_surface %p.
\n
"
,
iface
,
dst_surface
);
...
...
@@ -1064,8 +1063,8 @@ static HRESULT WINAPI d3d8_device_SetRenderTarget(IDirect3DDevice8 *iface,
IDirect3DSurface8
*
render_target
,
IDirect3DSurface8
*
depth_stencil
)
{
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DSurface8Impl
*
rt_impl
=
unsafe_impl_from_IDirect3DSurface8
(
render_target
);
IDirect3DSurface8Impl
*
ds_impl
=
unsafe_impl_from_IDirect3DSurface8
(
depth_stencil
);
struct
d3d8_surface
*
rt_impl
=
unsafe_impl_from_IDirect3DSurface8
(
render_target
);
struct
d3d8_surface
*
ds_impl
=
unsafe_impl_from_IDirect3DSurface8
(
depth_stencil
);
struct
wined3d_surface
*
original_ds
=
NULL
;
HRESULT
hr
;
...
...
@@ -1129,7 +1128,7 @@ static HRESULT WINAPI d3d8_device_GetRenderTarget(IDirect3DDevice8 *iface, IDire
{
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
iface
);
struct
wined3d_surface
*
wined3d_surface
;
IDirect3DSurface8Impl
*
surface_impl
;
struct
d3d8_surface
*
surface_impl
;
HRESULT
hr
;
TRACE
(
"iface %p, render_target %p.
\n
"
,
iface
,
render_target
);
...
...
@@ -1160,7 +1159,7 @@ static HRESULT WINAPI d3d8_device_GetDepthStencilSurface(IDirect3DDevice8 *iface
{
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
iface
);
struct
wined3d_surface
*
wined3d_surface
;
IDirect3DSurface8Impl
*
surface_impl
;
struct
d3d8_surface
*
surface_impl
;
HRESULT
hr
;
TRACE
(
"iface %p, depth_stencil %p.
\n
"
,
iface
,
depth_stencil
);
...
...
@@ -2802,7 +2801,7 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
enum
wined3d_pool
pool
,
UINT
level
,
enum
wined3d_cubemap_face
face
,
struct
wined3d_surface
**
surface
)
{
struct
d3d8_device
*
device
=
device_from_device_parent
(
device_parent
);
IDirect3DSurface8Impl
*
d3d_surface
;
struct
d3d8_surface
*
d3d_surface
;
BOOL
lockable
=
TRUE
;
HRESULT
hr
;
...
...
@@ -2827,8 +2826,8 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
wined3d_surface_incref
(
*
surface
);
d3d_surface
->
container
=
container_parent
;
IUnknown_Release
(
d3d_surface
->
parent
D
evice
);
d3d_surface
->
parent
D
evice
=
NULL
;
IUnknown_Release
(
d3d_surface
->
parent
_d
evice
);
d3d_surface
->
parent
_d
evice
=
NULL
;
IDirect3DSurface8_Release
(
&
d3d_surface
->
IDirect3DSurface8_iface
);
d3d_surface
->
forwardReference
=
container_parent
;
...
...
@@ -2842,7 +2841,7 @@ static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_par
struct
wined3d_surface
**
surface
)
{
struct
d3d8_device
*
device
=
device_from_device_parent
(
device_parent
);
IDirect3DSurface8Impl
*
d3d_surface
;
struct
d3d8_surface
*
d3d_surface
;
HRESULT
hr
;
TRACE
(
"device_parent %p, container_parent %p, width %u, height %u, format %#x, multisample_type %#x,
\n
"
...
...
@@ -2873,7 +2872,7 @@ static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_pa
DWORD
multisample_quality
,
BOOL
discard
,
struct
wined3d_surface
**
surface
)
{
struct
d3d8_device
*
device
=
device_from_device_parent
(
device_parent
);
IDirect3DSurface8Impl
*
d3d_surface
;
struct
d3d8_surface
*
d3d_surface
;
HRESULT
hr
;
TRACE
(
"device_parent %p, width %u, height %u, format %#x, multisample_type %#x,
\n
"
...
...
dlls/d3d8/surface.c
View file @
ec466ff3
This diff is collapsed.
Click to expand it.
dlls/d3d8/swapchain.c
View file @
ec466ff3
...
...
@@ -109,7 +109,7 @@ static HRESULT WINAPI d3d8_swapchain_GetBackBuffer(IDirect3DSwapChain8 *iface,
{
struct
d3d8_swapchain
*
swapchain
=
impl_from_IDirect3DSwapChain8
(
iface
);
struct
wined3d_surface
*
wined3d_surface
=
NULL
;
IDirect3DSurface8Impl
*
surface_impl
;
struct
d3d8_surface
*
surface_impl
;
HRESULT
hr
;
TRACE
(
"iface %p, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.
\n
"
,
...
...
dlls/d3d8/texture.c
View file @
ec466ff3
...
...
@@ -284,7 +284,7 @@ static HRESULT WINAPI d3d8_texture_2d_GetSurfaceLevel(IDirect3DTexture8 *iface,
{
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
IDirect3DSurface8Impl
*
surface_impl
;
struct
d3d8_surface
*
surface_impl
;
TRACE
(
"iface %p, level %u, surface %p.
\n
"
,
iface
,
level
,
surface
);
...
...
@@ -308,7 +308,7 @@ static HRESULT WINAPI d3d8_texture_2d_LockRect(IDirect3DTexture8 *iface, UINT le
{
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
IDirect3DSurface8Impl
*
surface_impl
;
struct
d3d8_surface
*
surface_impl
;
HRESULT
hr
;
TRACE
(
"iface %p, level %u, locked_rect %p, rect %p, flags %#x.
\n
"
,
...
...
@@ -331,7 +331,7 @@ static HRESULT WINAPI d3d8_texture_2d_UnlockRect(IDirect3DTexture8 *iface, UINT
{
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
IDirect3DSurface8Impl
*
surface_impl
;
struct
d3d8_surface
*
surface_impl
;
HRESULT
hr
;
TRACE
(
"iface %p, level %u.
\n
"
,
iface
,
level
);
...
...
@@ -654,7 +654,7 @@ static HRESULT WINAPI d3d8_texture_cube_GetCubeMapSurface(IDirect3DCubeTexture8
{
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DCubeTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
IDirect3DSurface8Impl
*
surface_impl
;
struct
d3d8_surface
*
surface_impl
;
UINT
sub_resource_idx
;
TRACE
(
"iface %p, face %#x, level %u, surface %p.
\n
"
,
iface
,
face
,
level
,
surface
);
...
...
@@ -681,7 +681,7 @@ static HRESULT WINAPI d3d8_texture_cube_LockRect(IDirect3DCubeTexture8 *iface,
{
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DCubeTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
IDirect3DSurface8Impl
*
surface_impl
;
struct
d3d8_surface
*
surface_impl
;
UINT
sub_resource_idx
;
HRESULT
hr
;
...
...
@@ -707,7 +707,7 @@ static HRESULT WINAPI d3d8_texture_cube_UnlockRect(IDirect3DCubeTexture8 *iface,
{
struct
d3d8_texture
*
texture
=
impl_from_IDirect3DCubeTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
IDirect3DSurface8Impl
*
surface_impl
;
struct
d3d8_surface
*
surface_impl
;
UINT
sub_resource_idx
;
HRESULT
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