src/libANGLE/Debug.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi d193d51b 2024-06-17T22:46:08 Replace issue ids post migration to new issue tracker This change replaces anglebug.com/NNNN links. Bug: None Change-Id: I8ac3aec8d2a8a844b3d7b99fc0a6b2be8da31761 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637912 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c3a1cae4 2024-04-15T14:58:55 Use angle::SimpleMutex everywhere in libGLESv2 Only cases left that use std::mutex are: - Share group and the context ErrorSet mutexes as they need try_lock() - Anywhere mutexes are used in conjunction with std::condition_variables (as they explicitly require std::mutex) Bug: angleproject:8667 Change-Id: Ib6d68938b0886f9e7c43e023162557990ecfb300 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5453294 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 34c8778b 2023-09-26T13:45:06 Use atomic counters early in perf warning macros Before this CL, snprintf was called repeatedly to format the warning message which was then discarded after 4 logs. snprintf showed up in profiling at ~2% and this CL appears to yield an ~8% power improvement in one of the traces (egypt_1500). A mutex was previously used to avoid the race condition on the static sRepeatCount variable. This CL avoids the need for that by using static atomics instead. Also updated the Debug macro to use the VK macro vararg approach so that formatting only happens when the message is actually logged. Bug: b/302112423 Change-Id: Ia8a18361cfb5a9f2aa19ff939499754ba861efb7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4886388 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Shahbaz Youssefi 2a524390 2023-07-13T13:04:37 Make insertion/retrieval of Debug messages thread-safe Bug: angleproject:8135 Bug: angleproject:8224 Change-Id: I5ad53b6bb57fe3ee2a261d4e52b7027736fddfd1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4681843 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 79f5b73a 2023-07-12T12:55:51 Make error handling and debug messages thread safe Bug: angleproject:8135 Bug: angleproject:8224 Change-Id: I1527b6a02d917724034873b5206f2006ae0eaf05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678284 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill fd45cec3 2022-10-10T20:59:58 Entry Points: Move enum helper to registry_xml. This will make it accessible to other generators. Bug: angleproject:7752 Change-Id: I91bc9a4d6c919266ea329f66d271bf881d99d17a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963364 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
YuxinHu 2aa5286d 2021-10-12T17:05:48 Add Entry Point name to validation errors Add gl/gles entry point names to validation error messages some special cases: 1. Debug::insertPerfWarning() is invoked from multiple places, such as TextureVK, ContextVK, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 2.ErrorSet::hangleError() is invoked from multiple Context*.cpp files, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 3. Debug::insertMessage(), Debug::popGroup(), Debug::pushGroup() can be invoked from more than one GL entry points, e.g. Debug::pushGroup() can be invoked from either GL_APIENTRY GL_PushDebugGroup() or GL_APIENTRY GL_PushDebugGroupKHR() through context->pushDebugGroup() call. Right now the same entry point name glPushDebugGroup will be printed out in the error message for both cases. However, we should be able to tell the actual entry point by checking which version: KHR version or core version the application uses, and this helps avoid the confusion. For now we will let the same entry point name getting printed for both cases. Bug: angleproject:6523 Change-Id: I64a5463d9168d8444d376d1f428c3b3d894f2ea9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3215063 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Jamie Madill 7004523a 2020-10-02T23:51:57 KHR_debug: Fix off-by-one message length. The dEQP tests were timing out due to the "get message" call skipping messages. The get call had a bufSize that ANGLE was rejecting as too small because it didn't include the null terminator. The dEQP test would pass but would always take ten seconds. I noticed this when debugging the ANGLE test launcher and seeing batch timeouts. Bug: angleproject:5130 Change-Id: Ie9f949218590b98a11f6c10b1f86074e90dbca17 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2447039 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 32de9efe 2020-09-17T12:03:12 Guard against race in perf warnings. Expose the "debug" mutex so insertPerfWarning can use it. This was detected using TSAN and MultithreadingTest. Bug: b/168744561 Change-Id: Idde95a7b217f21f007893192a4a1f0a69b4ed3a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415184 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Shahbaz Youssefi 295d2ccd 2020-08-24T14:46:31 Vulkan: Generate perf warnings on suboptimal paths Using KHR_debug features, this change creates a performance-warning-generation macro and employs it in a handful of locations to provide useful feedback to application developers. The warnings added in this change are not exhaustive. Bug: angleproject:3461 Bug: angleproject:4900 Change-Id: Id62435d170d90c5be9c1c5cab2d6779ccb58345e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2372628 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
James Dong 3f8975e1 2019-06-12T13:11:57 Debug: suppress INFO log level in tests Disables INFO level log messages in tests, including GL errors. Bug: angleproject:3525 Change-Id: Ib16871b9faaff54964dd2770e1791372b1b79361 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1656293 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: James Dong <dongja@google.com>
James Dong c74c3d81 2019-06-05T10:55:40 DEBUG: Log all debug messages to console Logs all debug messages produced by GL and EGL. This is helpful for debugging when the application does not register a debug callback. Validation errors produce log messages with level INFO, and internal errors produce log messages with level WARN. Bug: angleproject:3505 Change-Id: I269055aec49e1d77edeedb482fa6873c8f79f853 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1645817 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Geoff Lang 75359664 2018-04-11T01:42:27 Implement EGL_KHR_debug. BUG=angleproject:1618 Change-Id: I790944b49badc910b6c72266469fcb8e86ac4252 Reviewed-on: https://chromium-review.googlesource.com/1019387 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang e1a057e8 2018-06-07T15:09:00 Fully format some files. Change-Id: Id6ea245849696d4c6d7eabc6860c0ac424dd8013 Reviewed-on: https://chromium-review.googlesource.com/1091309 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4fb8a8bd 2018-06-01T16:47:57 Move the EGL-based initial state to the gl::State constructor. This is a small refactor to allow State::initialize to be called without needing the EGL context creation attributes. BUG=angleproject:2464 Change-Id: Ifa167cc83f652435ecc00a0a73e4c6c4a3295430 Reviewed-on: https://chromium-review.googlesource.com/1083312 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 427064d2 2018-04-13T16:20:34 Fix perf regression with checkStatus. Returning an Error was costing us performance in extra error checks. This intead uses the Context to process the Error immediately, and returns a value from isComplete and checkStatus. Improves performance in draw call validation. Bug: chromium:822235 Change-Id: I0793fc690e86137425fed593d45083e40aee8db9 Reviewed-on: https://chromium-review.googlesource.com/1011370 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill acf2f3ad 2017-11-21T19:22:44 Apply Chromium style fixes. This addresses several minor code quality issues that are validated in Chromium, but not yet applied to ANGLE: * constructors and destructors must be defined out-of-line * auto is not allowed for simple pointer types * use override everywhere instead of virtual * virtual functions must also be defined out-of-line Slightly reduces binary size for me (~2k on Win, 150k on Linux). Bug: angleproject:1569 Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6 Reviewed-on: https://chromium-review.googlesource.com/779959 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 70d0f499 2015-12-10T17:45:46 Implement GL_KHR_debug. BUG=angleproject:520 Change-Id: I9ced3e7ab1515feddf2ec103c26b2610a45b1784 Reviewed-on: https://chromium-review.googlesource.com/319830 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 66988745 2015-12-22T19:39:19 Revert "Implement GL_KHR_debug." This reverts commit 6c521b7a70a53b1c9f7762e53e34b5a8146b0f7b. Change-Id: I6ff981198e31f34d3e405edea6277ee75516d6ee Reviewed-on: https://chromium-review.googlesource.com/319820 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6c521b7a 2015-12-10T17:45:46 Implement GL_KHR_debug. BUG=angleproject:520 Change-Id: I78d14cc8c94f5cef58604220f0ca847473b25bf8 Reviewed-on: https://chromium-review.googlesource.com/317820 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>