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
e5ab987d
Commit
e5ab987d
authored
Mar 22, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simplify context_resource_released().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
70f017ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
24 deletions
+11
-24
context.c
dlls/wined3d/context.c
+9
-21
resource.c
dlls/wined3d/resource.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-2
No files found.
dlls/wined3d/context.c
View file @
e5ab987d
...
...
@@ -1055,34 +1055,22 @@ static void context_queue_fbo_entry_destruction(struct wined3d_context *context,
list_add_head
(
&
context
->
fbo_destroy_list
,
&
entry
->
entry
);
}
void
context_resource_released
(
const
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
,
enum
wined3d_resource_type
type
)
void
context_resource_released
(
const
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
)
{
struct
wined3d_texture
*
texture
;
UINT
i
;
unsigned
int
i
;
if
(
!
device
->
d3d_initialized
)
return
;
switch
(
type
)
for
(
i
=
0
;
i
<
device
->
context_count
;
++
i
)
{
case
WINED3D_RTYPE_TEXTURE_2D
:
case
WINED3D_RTYPE_TEXTURE_3D
:
texture
=
texture_from_resource
(
resource
);
for
(
i
=
0
;
i
<
device
->
context_count
;
++
i
)
{
struct
wined3d_context
*
context
=
device
->
contexts
[
i
];
if
(
context
->
current_rt
.
texture
==
texture
)
{
context
->
current_rt
.
texture
=
NULL
;
context
->
current_rt
.
sub_resource_idx
=
0
;
}
}
break
;
struct
wined3d_context
*
context
=
device
->
contexts
[
i
];
default:
break
;
if
(
&
context
->
current_rt
.
texture
->
resource
==
resource
)
{
context
->
current_rt
.
texture
=
NULL
;
context
->
current_rt
.
sub_resource_idx
=
0
;
}
}
}
...
...
dlls/wined3d/resource.c
View file @
e5ab987d
...
...
@@ -222,7 +222,7 @@ static void wined3d_resource_destroy_object(void *object)
struct
wined3d_resource
*
resource
=
object
;
wined3d_resource_free_sysmem
(
resource
);
context_resource_released
(
resource
->
device
,
resource
,
resource
->
type
);
context_resource_released
(
resource
->
device
,
resource
);
wined3d_resource_release
(
resource
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
e5ab987d
...
...
@@ -2171,8 +2171,7 @@ void *context_map_bo_address(struct wined3d_context *context, const struct wined
struct
wined3d_context
*
context_reacquire
(
const
struct
wined3d_device
*
device
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
context_release
(
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
context_resource_released
(
const
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
,
enum
wined3d_resource_type
type
)
DECLSPEC_HIDDEN
;
void
context_resource_released
(
const
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
void
context_restore
(
struct
wined3d_context
*
context
,
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
)
DECLSPEC_HIDDEN
;
BOOL
context_set_current
(
struct
wined3d_context
*
ctx
)
DECLSPEC_HIDDEN
;
...
...
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