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
817f915b
Commit
817f915b
authored
May 03, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
May 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simplify wined3d_context_destroy().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e5e79bb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
18 deletions
+16
-18
context.c
dlls/wined3d/context.c
+16
-18
No files found.
dlls/wined3d/context.c
View file @
817f915b
...
...
@@ -2302,7 +2302,6 @@ BOOL wined3d_adapter_gl_create_context(struct wined3d_context *context,
void
wined3d_context_destroy
(
struct
wined3d_context
*
context
)
{
struct
wined3d_device
*
device
=
context
->
device
;
BOOL
destroy
;
TRACE
(
"Destroying ctx %p
\n
"
,
context
);
...
...
@@ -2320,29 +2319,28 @@ void wined3d_context_destroy(struct wined3d_context *context)
return
;
}
if
(
context
->
tid
==
GetCurrentThreadId
()
||
!
context
->
current
)
{
context_destroy_gl_resources
(
context
);
TlsSetValue
(
wined3d_context_tls_idx
,
NULL
);
destroy
=
TRUE
;
}
else
device
->
shader_backend
->
shader_free_context_data
(
context
);
device
->
adapter
->
fragment_pipe
->
free_context_data
(
context
);
heap_free
(
context
->
texture_type
);
device_context_remove
(
device
,
context
);
if
(
context
->
current
&&
context
->
tid
!=
GetCurrentThreadId
())
{
/* Make a copy of gl_info for context_destroy_gl_resources use, the one
in wined3d_adapter may go away in the meantime */
struct
wined3d_gl_info
*
gl_info
=
heap_alloc
(
sizeof
(
*
gl_info
));
struct
wined3d_gl_info
*
gl_info
;
/* Make a copy of gl_info for context_destroy_gl_resources() use, the
* one in wined3d_adapter may go away in the meantime. */
gl_info
=
heap_alloc
(
sizeof
(
*
gl_info
));
*
gl_info
=
*
context
->
gl_info
;
context
->
gl_info
=
gl_info
;
context
->
destroyed
=
1
;
destroy
=
FALSE
;
return
;
}
device
->
shader_backend
->
shader_free_context_data
(
context
);
device
->
adapter
->
fragment_pipe
->
free_context_data
(
context
);
heap_free
(
context
->
texture_type
);
device_context_remove
(
device
,
context
);
if
(
destroy
)
heap_free
(
context
);
context_destroy_gl_resources
(
context
);
TlsSetValue
(
wined3d_context_tls_idx
,
NULL
);
heap_free
(
context
);
}
const
DWORD
*
context_get_tex_unit_mapping
(
const
struct
wined3d_context
*
context
,
...
...
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