Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f97163f4
Commit
f97163f4
authored
Apr 07, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
May 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Hold a reference to the wined3d swapchain from d3d9 swapchain surfaces.
parent
eae87051
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
d3d9_private.h
dlls/d3d9/d3d9_private.h
+1
-0
surface.c
dlls/d3d9/surface.c
+7
-0
No files found.
dlls/d3d9/d3d9_private.h
View file @
f97163f4
...
...
@@ -176,6 +176,7 @@ struct d3d9_surface
IDirect3DDevice9Ex
*
parent_device
;
IUnknown
*
container
;
struct
d3d9_texture
*
texture
;
struct
wined3d_swapchain
*
swapchain
;
};
struct
wined3d_rendertarget_view
*
d3d9_surface_acquire_rendertarget_view
(
struct
d3d9_surface
*
surface
)
DECLSPEC_HIDDEN
;
...
...
dlls/d3d9/surface.c
View file @
f97163f4
...
...
@@ -70,6 +70,8 @@ static ULONG WINAPI d3d9_surface_AddRef(IDirect3DSurface9 *iface)
if
(
surface
->
wined3d_rtv
)
wined3d_rendertarget_view_incref
(
surface
->
wined3d_rtv
);
wined3d_texture_incref
(
surface
->
wined3d_texture
);
if
(
surface
->
swapchain
)
wined3d_swapchain_incref
(
surface
->
swapchain
);
}
return
refcount
;
...
...
@@ -103,6 +105,10 @@ static ULONG WINAPI d3d9_surface_Release(IDirect3DSurface9 *iface)
if
(
surface
->
wined3d_rtv
)
wined3d_rendertarget_view_decref
(
surface
->
wined3d_rtv
);
if
(
surface
->
swapchain
)
wined3d_swapchain_decref
(
surface
->
swapchain
);
/* Releasing the texture may free the d3d9 object, so do not access it
* after releasing the texture. */
wined3d_texture_decref
(
surface
->
wined3d_texture
);
/* Release the device last, as it may cause the device to be destroyed. */
...
...
@@ -363,6 +369,7 @@ struct d3d9_surface *d3d9_surface_create(struct wined3d_texture *wined3d_texture
surface
->
container
=
container
;
surface
->
wined3d_texture
=
wined3d_texture
;
surface
->
sub_resource_idx
=
sub_resource_idx
;
surface
->
swapchain
=
wined3d_texture_get_swapchain
(
wined3d_texture
);
if
(
surface
->
container
&&
SUCCEEDED
(
IUnknown_QueryInterface
(
surface
->
container
,
&
IID_IDirect3DBaseTexture9
,
(
void
**
)
&
texture
)))
...
...
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