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
feb35006
Commit
feb35006
authored
Sep 03, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove wined3d_device_get_back_buffer.
parent
f010e5d8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
43 deletions
+48
-43
device.c
dlls/d3d8/device.c
+23
-10
device.c
dlls/d3d9/device.c
+25
-10
device.c
dlls/wined3d/device.c
+0
-20
wined3d.spec
dlls/wined3d/wined3d.spec
+0
-1
wined3d.h
include/wine/wined3d.h
+0
-2
No files found.
dlls/d3d8/device.c
View file @
feb35006
...
...
@@ -724,25 +724,38 @@ static HRESULT WINAPI d3d8_device_GetBackBuffer(IDirect3DDevice8 *iface,
UINT
backbuffer_idx
,
D3DBACKBUFFER_TYPE
backbuffer_type
,
IDirect3DSurface8
**
backbuffer
)
{
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
iface
);
struct
wined3d_surface
*
wined3d_surface
=
NULL
;
struct
wined3d_swapchain
*
swapchain
;
struct
wined3d_resource
*
wined3d_resource
;
struct
wined3d_texture
*
wined3d_texture
;
struct
d3d8_surface
*
surface_impl
;
HRESULT
hr
;
TRACE
(
"iface %p, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.
\n
"
,
iface
,
backbuffer_idx
,
backbuffer_type
,
backbuffer
);
/* No need to check for backbuffer == NULL, Windows crashes in that case. */
wined3d_mutex_lock
();
hr
=
wined3d_device_get_back_buffer
(
device
->
wined3d_device
,
0
,
backbuffer_idx
,
(
enum
wined3d_backbuffer_type
)
backbuffer_type
,
&
wined3d_surface
);
if
(
SUCCEEDED
(
hr
)
&&
wined3d_surface
&&
backbuffer
)
if
(
!
(
swapchain
=
wined3d_device_get_swapchain
(
device
->
wined3d_device
,
0
)))
{
surface_impl
=
wined3d_surface_get_parent
(
wined3d_surface
);
*
backbuffer
=
&
surface_impl
->
IDirect3DSurface8_iface
;
IDirect3DSurface8_AddRef
(
*
backbuffer
)
;
wined3d_mutex_unlock
(
);
*
backbuffer
=
NULL
;
return
D3DERR_INVALIDCALL
;
}
wined3d_mutex_unlock
();
return
hr
;
if
(
!
(
wined3d_texture
=
wined3d_swapchain_get_back_buffer
(
swapchain
,
backbuffer_idx
,
(
enum
wined3d_backbuffer_type
)
backbuffer_type
)))
{
wined3d_mutex_unlock
();
*
backbuffer
=
NULL
;
return
D3DERR_INVALIDCALL
;
}
wined3d_resource
=
wined3d_texture_get_sub_resource
(
wined3d_texture
,
0
);
surface_impl
=
wined3d_resource_get_parent
(
wined3d_resource
);
*
backbuffer
=
&
surface_impl
->
IDirect3DSurface8_iface
;
IDirect3DSurface8_AddRef
(
*
backbuffer
);
wined3d_mutex_unlock
();
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d8_device_GetRasterStatus
(
IDirect3DDevice8
*
iface
,
D3DRASTER_STATUS
*
raster_status
)
...
...
dlls/d3d9/device.c
View file @
feb35006
...
...
@@ -746,26 +746,41 @@ static HRESULT WINAPI d3d9_device_GetBackBuffer(IDirect3DDevice9Ex *iface, UINT
UINT
backbuffer_idx
,
D3DBACKBUFFER_TYPE
backbuffer_type
,
IDirect3DSurface9
**
backbuffer
)
{
struct
d3d9_device
*
device
=
impl_from_IDirect3DDevice9Ex
(
iface
);
struct
wined3d_surface
*
wined3d_surface
=
NULL
;
struct
wined3d_swapchain
*
wined3d_swapchain
;
struct
wined3d_resource
*
wined3d_resource
;
struct
wined3d_texture
*
wined3d_texture
;
struct
d3d9_surface
*
surface_impl
;
HRESULT
hr
;
TRACE
(
"iface %p, swapchain %u, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.
\n
"
,
iface
,
swapchain
,
backbuffer_idx
,
backbuffer_type
,
backbuffer
);
/* No need to check for backbuffer == NULL, Windows crashes in that case. */
wined3d_mutex_lock
();
hr
=
wined3d_device_get_back_buffer
(
device
->
wined3d_device
,
swapchain
,
backbuffer_idx
,
(
enum
wined3d_backbuffer_type
)
backbuffer_type
,
&
wined3d_surface
);
if
(
SUCCEEDED
(
hr
)
&&
wined3d_surface
&&
backbuffer
)
if
(
!
(
wined3d_swapchain
=
wined3d_device_get_swapchain
(
device
->
wined3d_device
,
swapchain
)))
{
surface_impl
=
wined3d_surface_get_parent
(
wined3d_surface
);
*
backbuffer
=
&
surface_impl
->
IDirect3DSurface9_iface
;
IDirect3DSurface9_AddRef
(
*
backbuffer
)
;
wined3d_mutex_unlock
(
);
*
backbuffer
=
NULL
;
return
D3DERR_INVALIDCALL
;
}
wined3d_mutex_unlock
();
return
hr
;
if
(
!
(
wined3d_texture
=
wined3d_swapchain_get_back_buffer
(
wined3d_swapchain
,
backbuffer_idx
,
(
enum
wined3d_backbuffer_type
)
backbuffer_type
)))
{
wined3d_mutex_unlock
();
*
backbuffer
=
NULL
;
return
D3DERR_INVALIDCALL
;
}
wined3d_resource
=
wined3d_texture_get_sub_resource
(
wined3d_texture
,
0
);
surface_impl
=
wined3d_resource_get_parent
(
wined3d_resource
);
*
backbuffer
=
&
surface_impl
->
IDirect3DSurface9_iface
;
IDirect3DSurface9_AddRef
(
*
backbuffer
);
wined3d_mutex_unlock
();
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d9_device_GetRasterStatus
(
IDirect3DDevice9Ex
*
iface
,
UINT
swapchain
,
D3DRASTER_STATUS
*
raster_status
)
{
...
...
dlls/wined3d/device.c
View file @
feb35006
...
...
@@ -3183,26 +3183,6 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d
return
device
->
state
.
textures
[
stage
];
}
HRESULT
CDECL
wined3d_device_get_back_buffer
(
const
struct
wined3d_device
*
device
,
UINT
swapchain_idx
,
UINT
backbuffer_idx
,
enum
wined3d_backbuffer_type
backbuffer_type
,
struct
wined3d_surface
**
backbuffer
)
{
struct
wined3d_texture
*
texture
;
struct
wined3d_resource
*
resource
;
struct
wined3d_swapchain
*
swapchain
;
TRACE
(
"device %p, swapchain_idx %u, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.
\n
"
,
device
,
swapchain_idx
,
backbuffer_idx
,
backbuffer_type
,
backbuffer
);
if
(
!
(
swapchain
=
wined3d_device_get_swapchain
(
device
,
swapchain_idx
)))
return
WINED3DERR_INVALIDCALL
;
if
(
!
(
texture
=
wined3d_swapchain_get_back_buffer
(
swapchain
,
backbuffer_idx
,
backbuffer_type
)))
return
WINED3DERR_INVALIDCALL
;
resource
=
wined3d_texture_get_sub_resource
(
texture
,
0
);
*
backbuffer
=
wined3d_surface_from_resource
(
resource
);
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_device_get_device_caps
(
const
struct
wined3d_device
*
device
,
WINED3DCAPS
*
caps
)
{
TRACE
(
"device %p, caps %p.
\n
"
,
device
,
caps
);
...
...
dlls/wined3d/wined3d.spec
View file @
feb35006
...
...
@@ -49,7 +49,6 @@
@ cdecl wined3d_device_end_stateblock(ptr ptr)
@ cdecl wined3d_device_evict_managed_resources(ptr)
@ cdecl wined3d_device_get_available_texture_mem(ptr)
@ cdecl wined3d_device_get_back_buffer(ptr long long long ptr)
@ cdecl wined3d_device_get_base_vertex_index(ptr)
@ cdecl wined3d_device_get_clip_plane(ptr long ptr)
@ cdecl wined3d_device_get_clip_status(ptr ptr)
...
...
include/wine/wined3d.h
View file @
feb35006
...
...
@@ -2154,8 +2154,6 @@ HRESULT __cdecl wined3d_device_end_scene(struct wined3d_device *device);
HRESULT
__cdecl
wined3d_device_end_stateblock
(
struct
wined3d_device
*
device
,
struct
wined3d_stateblock
**
stateblock
);
void
__cdecl
wined3d_device_evict_managed_resources
(
struct
wined3d_device
*
device
);
UINT
__cdecl
wined3d_device_get_available_texture_mem
(
const
struct
wined3d_device
*
device
);
HRESULT
__cdecl
wined3d_device_get_back_buffer
(
const
struct
wined3d_device
*
device
,
UINT
swapchain_idx
,
UINT
backbuffer_idx
,
enum
wined3d_backbuffer_type
backbuffer_type
,
struct
wined3d_surface
**
backbuffer
);
INT
__cdecl
wined3d_device_get_base_vertex_index
(
const
struct
wined3d_device
*
device
);
HRESULT
__cdecl
wined3d_device_get_clip_plane
(
const
struct
wined3d_device
*
device
,
UINT
plane_idx
,
struct
wined3d_vec4
*
plane
);
...
...
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