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
a63f7b1c
Commit
a63f7b1c
authored
Jun 14, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx10: Add ID3DX10ThreadPump:PurgeAllItems implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
parent
3c5cae06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
2 deletions
+44
-2
async.c
dlls/d3dx10_43/async.c
+44
-2
No files found.
dlls/d3dx10_43/async.c
View file @
a63f7b1c
...
...
@@ -845,10 +845,52 @@ static HRESULT WINAPI thread_pump_ProcessDeviceWorkItems(ID3DX10ThreadPump *ifac
return
S_OK
;
}
static
void
purge_list
(
struct
list
*
list
,
LONG
*
count
)
{
struct
work_item
*
work_item
;
while
(
!
list_empty
(
list
))
{
work_item
=
LIST_ENTRY
(
list_head
(
list
),
struct
work_item
,
entry
);
list_remove
(
&
work_item
->
entry
);
work_item_free
(
work_item
,
TRUE
);
if
(
count
&&
!
InterlockedDecrement
(
count
))
RtlWakeAddressAll
(
count
);
}
}
static
HRESULT
WINAPI
thread_pump_PurgeAllItems
(
ID3DX10ThreadPump
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
E_NOTIMPL
;
struct
thread_pump
*
thread_pump
=
impl_from_ID3DX10ThreadPump
(
iface
);
LONG
v
;
TRACE
(
"iface %p.
\n
"
,
iface
);
for
(;;)
{
AcquireSRWLockExclusive
(
&
thread_pump
->
io_lock
);
purge_list
(
&
thread_pump
->
io_queue
,
&
thread_pump
->
processing_count
);
thread_pump
->
io_count
=
0
;
ReleaseSRWLockExclusive
(
&
thread_pump
->
io_lock
);
AcquireSRWLockExclusive
(
&
thread_pump
->
proc_lock
);
purge_list
(
&
thread_pump
->
proc_queue
,
&
thread_pump
->
processing_count
);
thread_pump
->
proc_count
=
0
;
ReleaseSRWLockExclusive
(
&
thread_pump
->
proc_lock
);
AcquireSRWLockExclusive
(
&
thread_pump
->
device_lock
);
purge_list
(
&
thread_pump
->
device_queue
,
NULL
);
thread_pump
->
device_count
=
0
;
v
=
thread_pump
->
processing_count
;
ReleaseSRWLockExclusive
(
&
thread_pump
->
device_lock
);
if
(
!
v
)
break
;
RtlWaitOnAddress
(
&
thread_pump
->
processing_count
,
&
v
,
sizeof
(
v
),
NULL
);
}
return
S_OK
;
}
static
HRESULT
WINAPI
thread_pump_GetQueueStatus
(
ID3DX10ThreadPump
*
iface
,
...
...
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