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
be13e91c
Commit
be13e91c
authored
Oct 24, 2023
by
Elizabeth Figura
Committed by
Alexandre Julliard
Nov 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Store the texture's parent device as a d3d8_device pointer.
parent
9b48143c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
d3d8_private.h
dlls/d3d8/d3d8_private.h
+1
-1
surface.c
dlls/d3d8/surface.c
+1
-1
texture.c
dlls/d3d8/texture.c
+9
-10
No files found.
dlls/d3d8/d3d8_private.h
View file @
be13e91c
...
...
@@ -243,7 +243,7 @@ struct d3d8_texture
IDirect3DBaseTexture8
IDirect3DBaseTexture8_iface
;
struct
d3d8_resource
resource
;
struct
wined3d_texture
*
wined3d_texture
,
*
draw_texture
;
IDirect3DDevice8
*
parent_device
;
struct
d3d8_device
*
parent_device
;
struct
list
rtv_list
;
};
...
...
dlls/d3d8/surface.c
View file @
be13e91c
...
...
@@ -372,7 +372,7 @@ static const struct wined3d_parent_ops d3d8_view_wined3d_parent_ops =
struct
d3d8_device
*
d3d8_surface_get_device
(
const
struct
d3d8_surface
*
surface
)
{
IDirect3DDevice8
*
device
;
device
=
surface
->
texture
?
surface
->
texture
->
parent_devi
ce
:
surface
->
parent_device
;
device
=
surface
->
texture
?
&
surface
->
texture
->
parent_device
->
IDirect3DDevice8_ifa
ce
:
surface
->
parent_device
;
return
impl_from_IDirect3DDevice8
(
device
);
}
...
...
dlls/d3d8/texture.c
View file @
be13e91c
...
...
@@ -30,7 +30,7 @@ static ULONG d3d8_texture_incref(struct d3d8_texture *texture)
{
struct
d3d8_surface
*
surface
;
IDirect3DDevice8_AddRef
(
texture
->
parent_devi
ce
);
IDirect3DDevice8_AddRef
(
&
texture
->
parent_device
->
IDirect3DDevice8_ifa
ce
);
wined3d_mutex_lock
();
LIST_FOR_EACH_ENTRY
(
surface
,
&
texture
->
rtv_list
,
struct
d3d8_surface
,
rtv_entry
)
{
...
...
@@ -51,7 +51,7 @@ static ULONG d3d8_texture_decref(struct d3d8_texture *texture)
if
(
!
ref
)
{
IDirect3DDevice8
*
parent_device
=
texture
->
parent_devi
ce
;
IDirect3DDevice8
*
parent_device
=
&
texture
->
parent_device
->
IDirect3DDevice8_ifa
ce
;
struct
d3d8_surface
*
surface
;
wined3d_mutex_lock
();
...
...
@@ -70,11 +70,10 @@ static ULONG d3d8_texture_decref(struct d3d8_texture *texture)
static
void
d3d8_texture_preload
(
struct
d3d8_texture
*
texture
)
{
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
texture
->
parent_device
);
wined3d_mutex_lock
();
if
(
texture
->
draw_texture
)
wined3d_device_update_texture
(
device
->
wined3d_device
,
texture
->
wined3d_texture
,
texture
->
draw_texture
);
wined3d_device_update_texture
(
texture
->
parent_device
->
wined3d_device
,
texture
->
wined3d_texture
,
texture
->
draw_texture
);
else
wined3d_resource_preload
(
wined3d_texture_get_resource
(
texture
->
wined3d_texture
));
wined3d_mutex_unlock
();
...
...
@@ -135,7 +134,7 @@ static HRESULT WINAPI d3d8_texture_2d_GetDevice(IDirect3DTexture8 *iface, IDirec
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
device
);
*
device
=
texture
->
parent_devi
ce
;
*
device
=
&
texture
->
parent_device
->
IDirect3DDevice8_ifa
ce
;
IDirect3DDevice8_AddRef
(
*
device
);
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
...
...
@@ -436,7 +435,7 @@ static HRESULT WINAPI d3d8_texture_cube_GetDevice(IDirect3DCubeTexture8 *iface,
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
device
);
*
device
=
texture
->
parent_devi
ce
;
*
device
=
&
texture
->
parent_device
->
IDirect3DDevice8_ifa
ce
;
IDirect3DDevice8_AddRef
(
*
device
);
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
...
...
@@ -760,7 +759,7 @@ static HRESULT WINAPI d3d8_texture_3d_GetDevice(IDirect3DVolumeTexture8 *iface,
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
device
);
*
device
=
texture
->
parent_devi
ce
;
*
device
=
&
texture
->
parent_device
->
IDirect3DDevice8_ifa
ce
;
IDirect3DDevice8_AddRef
(
*
device
);
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
...
...
@@ -1103,8 +1102,8 @@ static HRESULT d3d8_texture_init(struct d3d8_texture *texture, struct d3d8_devic
}
wined3d_mutex_unlock
();
texture
->
parent_device
=
&
device
->
IDirect3DDevice8_ifa
ce
;
IDirect3DDevice8_AddRef
(
texture
->
parent_devi
ce
);
texture
->
parent_device
=
devi
ce
;
IDirect3DDevice8_AddRef
(
&
texture
->
parent_device
->
IDirect3DDevice8_ifa
ce
);
return
D3D_OK
;
}
...
...
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