src/tests/test_utils/MultiThreadSteps.h


Log

Author Commit Date CI Message
Shahbaz Youssefi 9d99f85f 2023-09-14T15:01:14 Add multithreaded texture upload test Bug: angleproject:8341 Change-Id: I8561a64fb28681509a1d65c490888dfa1a423835 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864467 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Roman Lavrov ca2378b7 2023-03-08T18:44:58 Assert that waitForStep steps go in increasing order. This should make race conditions like the one in https://crrev.com/c/4321809 much more obvious from the logs and catch some of the issues when writing or updates tests. The test that has to be updated here is an example why we probably don't want to just replace `== step` with `>= step` Bug: angleproject:8071 Change-Id: I2c740931046bb5a9115474b7d67f76e9a21c30a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4322049 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 3dfc8004 2022-06-08T14:24:48 Vulkan: Optimize sync followed by swap Previously, inserting a sync object immediately caused a submission. That was done in https://chromium-review.googlesource.com/c/angle/angle/+/3200274 to be able to wait until the sync object is signaled without having to wait for whatever is recorded after it until a flush naturally happens. Some applications issue a glFenceSync right before eglSwapBuffers. The submission incurred by glFenceSync disallowed the optimizations that eglSwapBuffers would have done, leading to performance degradations. This could have been avoided if glFenceSync was issued right after eglSwapBuffers, but that's not the case with a number of applications. In this change, when a fence is inserted: - For EGL sync objects, a submission is issued regardless - For GL sync objects, a submission is issued if there is no render pass open - For GL sync objects, the submission is deferred if there is an open render pass. This is done by marking the render pass closed, and flagging the context as having a deferred flash. If the context that issued the fence sync issues another draw call, the render pass is naturally closed and the submission is performed. If the context that issued the fence sync causes a submission, it would have a chance to modify the render pass before doing so. For example, it could apply swapchain optimizations before swapping, or add a resolve attachment for blit. If the context that issued the fence sync doesn't cause a submission before another context tries to access it (get status, wait, etc), the other context will flush its render pass and cause a submission on its behalf. This is possible because the deferral of submission is done only for GL sync objects, and those are only accessible by other contexts in the same share group. Bug: angleproject:7379 Change-Id: I3dd1c1bfd575206d730dd9ee2e33ba2254318521 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3695520 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 460618ad 2021-08-20T18:34:10 Refactor EGLMultiThreadSteps.h -> MultiThreadSteps.h The class ThreadSynchronization is very useful when synchronizing multiple threads in ANGLE tests, so it's being moved from egl_tests/EGLMultiThreadSteps.h to test_utils/MultiThreadSteps.h. Bug: angleproject:5971 Change-Id: I5df469aa68b79cf72d95e0276f42ab33a091314e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3111887 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>