src/libANGLE/WorkerThread.cpp


Log

Author Commit Date CI Message
Jamie Madill 1ab8b75a 2020-08-28T14:45:15 Enable -Wreturn-std-move-in-c++11. Only one fix needed. Bug: skia:7647 Change-Id: I048d54ed67fbb09f4dce6c918db26ea63e7127a8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376719 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Etienne Bergeron 6fc53fdb 2020-06-30T18:08:21 Fix typos in comment This CL fix typo in a comment introduced recently. There is no functional change. Bug: chromium:1091259 Change-Id: I56f1963514b87b2a93859a6db707be093e865e28 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2276748 Commit-Queue: Etienne Bergeron <etienneb@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Etienne Bergeron a935c65a 2020-06-24T00:09:45 Fix delegate Worker Thread Pool creation This error was introduced while fixing nits in the previous CL. The Delegate Pool was not created at all and always fallback to the Async thread pool instead. Bug: chromium:1091259 Change-Id: I5036836b5d792372636f21e936a03906eb587f67 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2262573 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Etienne Bergeron 9e83c151 2020-06-04T19:53:36 Active the delegate worker pool for chromium (3/3) This CL is activating the delegate WorkerPool in Chromium. Must land after: https://chromium-review.googlesource.com/c/angle/angle/+/2231708 Related CLs: 1) https://chromium-review.googlesource.com/c/angle/angle/+/2231708 2) https://chromium-review.googlesource.com/c/chromium/src/+/2231864 3) [this CL] Bug: chromium:1091259 Change-Id: I62c7175fec2846fee014702d8561eeaf48ca93de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2231710 Commit-Queue: Etienne Bergeron <etienneb@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Etienne Bergeron 707868ae 2020-06-04T19:46:08 Implement a WorkerPool delegate to execute background task (1/3) This CL is adding a WorkerPool delegate to allow an embedder to post task on a custom thread pool. The target for this code is Chromium. The plan is to post tasks into the Chromium ThreadPool. Related CLs: 1) [this] 2) https://chromium-review.googlesource.com/c/chromium/src/+/2231864 3) https://chromium-review.googlesource.com/c/angle/angle/+/2231710 Bug: chromium:1091259 Change-Id: Ib990b06d4672b6f859d04b97ac4311a7a80ef7a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2231708 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Etienne Bergeron d80d9044 2020-06-08T14:56:14 Reland "Add trace event to angle Program compilation API" This reverts commit be04c04729df41e359ebce625690af4368f12142. Reason for revert: The appropriate fix for ASAN is landed here: https://chromium-review.googlesource.com/ c/angle/angle/+/2233410 Original change's description: > Revert "Add trace event to angle Program compilation API" > > This reverts commit 7685a79eb4a38c212b67d4a830958d69b409bc4c. > > Reason for revert: Causing TSAN failures, see issue. > > Bug: chromium:1091723 > > Original change's description: > > Add trace event to angle Program compilation API > > > > Bug: chromium:1064662 > > Change-Id: I2ee48718ff3946ab9307ba27177a02858bf436b0 > > Reviewed-on: https://chromium-review.googlesource.com/ c/angle/angle/+/2230789 > > Commit-Queue: Etienne Bergeron <etienneb@chromium.org> > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > TBR=etienneb@chromium.org,jmadill@chromium.org > > Change-Id: I92148677ac53c1ff7a9bc880e0a0834a03fc92ea > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:1064662 > Reviewed-on: https://chromium-review.googlesource.com/ c/angle/angle/+/2231870 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=etienneb@chromium.org,jmadill@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: chromium:1091723, chromium:1064662 Change-Id: I6e2ccfcb29fcddc5e0bffee43d3a737c8a6a75ea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2235915 Commit-Queue: Etienne Bergeron <etienneb@chromium.org> Reviewed-by: Etienne Bergeron <etienneb@chromium.org>
Jamie Madill be04c047 2020-06-05T15:15:26 Revert "Add trace event to angle Program compilation API" This reverts commit 7685a79eb4a38c212b67d4a830958d69b409bc4c. Reason for revert: Causing TSAN failures, see issue. Bug: chromium:1091723 Original change's description: > Add trace event to angle Program compilation API > > Bug: chromium:1064662 > Change-Id: I2ee48718ff3946ab9307ba27177a02858bf436b0 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2230789 > Commit-Queue: Etienne Bergeron <etienneb@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=etienneb@chromium.org,jmadill@chromium.org Change-Id: I92148677ac53c1ff7a9bc880e0a0834a03fc92ea No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:1064662 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2231870 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Etienne Bergeron 7685a79e 2020-06-04T14:16:05 Add trace event to angle Program compilation API Bug: chromium:1064662 Change-Id: I2ee48718ff3946ab9307ba27177a02858bf436b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2230789 Commit-Queue: Etienne Bergeron <etienneb@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 7d53c60b 2019-02-15T21:06:42 ParallelCompile: use the native extensions This enhances to use the native parallel compile extensions if available. Bug: 873724 Change-Id: I0aaed314accd75e1bfa596b322225b56d729d3a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1475234 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c09ae15c 2019-02-01T14:16:32 Enable -Wextra-semi and -Wextra-semi-stmt. This will prevent users from accidentally making semicolon errors in the future. Bug: chromium:926235 Change-Id: I79a6fa376fb1ad8f0fcf1b65b1f572a035d1f4e9 Reviewed-on: https://chromium-review.googlesource.com/c/1446493 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
jchen10 a100d8f4 2018-12-29T16:39:55 ParallelCompile: add GL backend support For GL backend, at first each worker thread must have a naitve context for its own to work in. These worker contexts have to be shared from the main context, so that all shader and program objects are seen in any context. This extends backend displays to create and destroy the worker contexts. RendererGL manages and allocates them to the worker threads. ShaderImpl has a new compile method added to do the actual glCompile work in worker thread. The ProgramGL's link method is broken down by introducing the LinkEventGL class. Bug: chromium:849576 Change-Id: Idc2c51b4b6c978781ae77810e62c480acc67ebb5 Reviewed-on: https://chromium-review.googlesource.com/c/1373015 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ab2bfa81 2019-01-15T19:06:47 Enable Chromium clang style plugin for libANGLE. This fixes a few style warnings: * auto should not deduce to raw pointer type * inlined virtual methods are not allowed * non-trivial constructors and destructors should be explicit * inlined non-trivial constructors should not be in-class * missing override keywords Bug: angleproject:3069 Change-Id: I3b3e55683691da3ebf6da06a5d3c729c71b6ee53 Reviewed-on: https://chromium-review.googlesource.com/c/1407640 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
jchen10 7ae70d8f 2018-07-06T13:47:01 ParallelCompile: Parallelize D3D linking This adds a new linking state to Program. If a Program is in linking state, on the one hand the foreground thread may continue issuing more GL calls, and on the other hand the background linking threads may be accessing Program internally too. Without a proper constraint there must be conflicts between them. For this purpose, we block any further GL calls to Program until it's actually linked. In addition, we prohibit parallel linking an active program, so that ProgramD3D does not have to worry about such similar conflicts. Also changes the WorkerThread to support limiting the number of concurrently running worker threads. BUG=chromium:849576 Change-Id: I52618647539323f8bf27201320bdf7301c4982e6 Reviewed-on: https://chromium-review.googlesource.com/1127495 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 01074255 2016-11-28T15:55:51 D3D: Implement multi-thread shader compilation. Choose to use std::async for now to implement multi-threaded compiles. This should work across platforms and also be usable for other threading tasks. Note that std::async does not have a good way to wait for multiple std::futures. Also the Linux compile of std::async is broken due to a bug in an old STL version, so disable it on this platform. The implementation uses a static polymorphism approach, which should have very good performance (no virtual calls). This design leaves the door open for other future implementations, such as a Win32 thread pool, or one based on angle::Platform. BUG=angleproject:422 Change-Id: Ia2f13c3af0339efaca1d19b40b3e08ecca61b8e8 Reviewed-on: https://chromium-review.googlesource.com/413712 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>