|
44c6effd
|
2023-09-20T11:21:49
|
|
Fix potential timeout of FixedQueue.ConcurrentPushPop test
The test some times times out in bots. I think what happens is that when
dequeue thread went to sleep and then wake up, during sleep the enqueue
thread already finished and exited (maybe because of timer runs out),
then it will forever stuck in the while loop. This CL adds the check for
other thread is finished or not and exit while loop if other thread has
finished.
Bug: b/301283364
Change-Id: Id6d846600b1749ce0bcb7b080b3b8ce3ad3d1dc4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4879083
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
044612ec
|
2023-02-27T14:59:29
|
|
Vulkan: Remove iterator from FixedQueue class
Previously there was code that still walking each element of FixedQueue,
that was mostly removed in previous CLs. The only remaining usage is for
assertion which the value is minimal. This CL removes the iterator from
FixedQueue so that it behaves just like queue, thus avoiding potential
risk of misuse.
Bug: b/255411748
Change-Id: I4c0debf5b6c8b603e384c681f1a123c2ee06dcbb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4294695
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
8374bf5f
|
2023-02-13T20:35:32
|
|
Fix bug in FixedQueue::clear() and refactoring.
- bug: "mSize" used to end the loop but also changed inside the loop by
call to the "pop()" method.
- refactoring: "mBackIndex" name is not correct, because variable
references to the "index for next write", in other words - to the
element past "back" (last written). Renamed to "mEndIndex" to match
the "std" terminology.
Bug: b/267348918
Test: angle_unittests --gtest_filter="FixedQueue.Clear"
Change-Id: Ic65291a7ff2ff6f4eed223ca80fef187e42df3e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4245420
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
11951f2f
|
2023-01-31T09:56:16
|
|
Vulkan: Add FixedQueue class for CommandProcessor::mTask
This CL adds FixedQueue class. It uses std::array for the storage. It
supports concurrent push and pop from two different threads. If producer
want to push from two different threads, then proper mutex must be used
to ensure the access is serialized. Similarly if consumers want to pop
from two different threads, a mutex must be used to ensure serialized
access. Caller must ensure queue is not empty before pop and not full
before push.
This CL switches CommandProcessor::mTasks to FixedQueue and moved
mSubmissionMutex to protect the serialized submission (i.e, pop from
queue). mWorkerMutex is still used to protect push operation. With this
change, we now supports continued enqueue to mTask of CommandProcessor
while other context is doing
CommandProcessor::waitForResourceUseToBeSubmitted().
Bug: b/267348918
Change-Id: I6c5fe288436daa7e0f3bcbbcd16c5d2e5e27f2e9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4210653
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|