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
b5d225e4
Commit
b5d225e4
authored
Apr 19, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Avoid unmapping the module while the CS thread is still running.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b7140a21
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
cs.c
dlls/wined3d/cs.c
+11
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/cs.c
View file @
b5d225e4
...
@@ -2451,7 +2451,7 @@ static DWORD WINAPI wined3d_cs_run(void *ctx)
...
@@ -2451,7 +2451,7 @@ static DWORD WINAPI wined3d_cs_run(void *ctx)
queue
->
tail
=
queue
->
head
=
0
;
queue
->
tail
=
queue
->
head
=
0
;
TRACE
(
"Stopped.
\n
"
);
TRACE
(
"Stopped.
\n
"
);
return
0
;
FreeLibraryAndExitThread
(
cs
->
wined3d_module
,
0
)
;
}
}
struct
wined3d_cs
*
wined3d_cs_create
(
struct
wined3d_device
*
device
)
struct
wined3d_cs
*
wined3d_cs_create
(
struct
wined3d_device
*
device
)
...
@@ -2490,9 +2490,19 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
...
@@ -2490,9 +2490,19 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
goto
fail
;
goto
fail
;
}
}
if
(
!
(
GetModuleHandleExW
(
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
,
(
const
WCHAR
*
)
wined3d_cs_run
,
&
cs
->
wined3d_module
)))
{
ERR
(
"Failed to get wined3d module handle.
\n
"
);
CloseHandle
(
cs
->
event
);
HeapFree
(
GetProcessHeap
(),
0
,
cs
->
data
);
goto
fail
;
}
if
(
!
(
cs
->
thread
=
CreateThread
(
NULL
,
0
,
wined3d_cs_run
,
cs
,
0
,
NULL
)))
if
(
!
(
cs
->
thread
=
CreateThread
(
NULL
,
0
,
wined3d_cs_run
,
cs
,
0
,
NULL
)))
{
{
ERR
(
"Failed to create wined3d command stream thread.
\n
"
);
ERR
(
"Failed to create wined3d command stream thread.
\n
"
);
FreeLibrary
(
cs
->
wined3d_module
);
CloseHandle
(
cs
->
event
);
CloseHandle
(
cs
->
event
);
HeapFree
(
GetProcessHeap
(),
0
,
cs
->
data
);
HeapFree
(
GetProcessHeap
(),
0
,
cs
->
data
);
goto
fail
;
goto
fail
;
...
...
dlls/wined3d/wined3d_private.h
View file @
b5d225e4
...
@@ -3253,6 +3253,7 @@ struct wined3d_cs
...
@@ -3253,6 +3253,7 @@ struct wined3d_cs
struct
wined3d_device
*
device
;
struct
wined3d_device
*
device
;
struct
wined3d_fb_state
fb
;
struct
wined3d_fb_state
fb
;
struct
wined3d_state
state
;
struct
wined3d_state
state
;
HMODULE
wined3d_module
;
HANDLE
thread
;
HANDLE
thread
;
DWORD
thread_id
;
DWORD
thread_id
;
...
...
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