src/common/debug.h


Log

Author Commit Date CI Message
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>
Shahbaz Youssefi 97cb3eb8 2024-04-16T10:25:49 Split ASSERT and logs into separate header This is because SimpleMutex.h wants to ASSERT, which was defined in debug.h. That file has a function that returns a reference to a mutex that would eventually be changed to SimpleMutex. The circular dependency cannot be resolved with a forward declaration with SimpleMutex being defined with `using`. Bug: angleproject:8667 Change-Id: I9a3acb6d07c6702048b47a72d8411b0fc2166922 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5458631 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 9f4bddd8 2023-08-24T10:54:43 Cleanup: remove unused ANGLE_ASSERT_IMPL Bug: b/297343154 Change-Id: Iccde6b93fd26aa5b575a11d0ac61c59f03508567 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4810192 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Roman Lavrov <romanl@google.com>
Le Hoang Quyen d64c54e3 2022-09-26T21:25:18 D3D11: Make DebugAnnotator11 thread safe. Bug: chromium:1366778 Change-Id: I50662895be8ec40de4ded8c4f84bde59ae40e98b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3917936 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Eddie Hatfield 91976352 2022-06-21T15:41:02 Use C++17 attributes instead of custom macros Bug: angleproject:6747 Change-Id: Iad6c7cd8a18d028e01da49b647c5d01af11e0522 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3718999 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Faye Zhang c608df69 2022-05-23T17:19:02 Code Cleanup In Debug.h, we unconditionally set UNREACHABLE_IS_NORETURN to 0. Since UNREACHABLE_IS_NORETURN is only used in #if directives and it is always false, we can remove all uses of UNREACHABLE_IS_NORETURN. Bug: angleproject:6134 Change-Id: I3aa88d802099d70990eae697d4f056a3f650b48d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3661376 Commit-Queue: Faye Zhang <ffz@google.com> Auto-Submit: Faye Zhang <ffz@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Faye Zhang <ffz@google.com>
Shahbaz Youssefi 7a85d114 2022-03-25T15:01:17 Use [[nodiscard]] on RAII classes Scoped* classes provide an RAII way of adding cleanup/restore state/etc in a robust way. Unfortunatley, it's very easy to mistakenly leave the variable name, leading to the destructor being called immediately instead of at the end of the scope: { ScopedX(parameters); // instead of ScopedX x(parameters); // Code here is run after destructor } The [[nodiscard]] attribute, if specified on the ScopedX class would lead to a warning (turned to error with -Werror). This change does that for classes named *Scoped* in ANGLE. Bug: chromium:1103817 Change-Id: I65c9922c9b4eba1f9c033e093fe8fe534648ab62 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3552092 Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Patrick To b3ed4780 2021-12-21T17:20:19 Change Windows display initialization from ANSI to wide version Bug: angleproject:6846 Change-Id: I2aee8f4b5b7546fc707705e435251fa9861e27d0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3352866 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 9d11a341 2021-12-16T13:47:04 Vulkan: Fix Vulkan SCB vs multiple subpasses vkCmdNextSubpass must be called on the primary command buffer, so the render pass command buffers need to be split on subpass boundaries. This is only done when using Vulkan secondary command buffers. Bug: angleproject:6811 Change-Id: I087fff305c757c78e87bfde4410e7de6bd1a6ba6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3344774 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Hans Wennborg 6ce67886 2021-10-28T13:45:18 Drop -Wweak-template-vtables Clang is dropping suport for this flag, see bug. Bug: chromium:1264351 Change-Id: I09b3d42889eecb8e786c52c205f28507fc797c5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3250885 Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bruce Dawson fbf8d1ea 2021-10-07T13:53:05 Remove windows.h from common/platform.h Windows.h is expensive and causes lots of namespace pollution with the macros that it defines. This change removes windows.h from platform.h and debug.h and adds the necessary typedes and new include of windows.h to let Chromium build. This reduces the number of Angle translation units that include windows.h by about a third, from 624 to 440. Significant further reductions will be difficult because of translation units that genuinely need windows.h. Earlier versions of this change made it clear that the DeleteFile and GetCurrentTime macros were renaming Angle functions. These angle functions were renamed which makes this change much simpler. Bug: angleproject:6283 Change-Id: Icddc8f98b19485e563b2cf616bba2ad4ea49228e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212639 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Ian Elliott ab19e742 2021-08-04T18:41:51 Match DebugAnnotator::{begin|end}Event() calls The tests for whether ScopedPerfEventHelper::~ScopedPerfEventHelper() should call DebugAnnotator::endEvent() were not valid: - The test in ScopedPerfEventHelper::begin() simply checks whether a DebugAnnotator has been initialized. - In addition, ScopedPerfEventHelper::~ScopedPerfEventHelper() also checks whether DebugAnnotator::getStatus() returns true, which will always be false when the generic LoggingAnnotator is pluged in. - The check in ScopedPerfEventHelper::~ScopedPerfEventHelper() must take into account whether EGL_Initialize() or EGL_Terminate() changed g_debugAnnotator, and whether ScopedPerfEventHelper::begin() called DebugAnnotator::beginEvent(), and so a matching endEvent() should be called. The check in ScopedPerfEventHelper::~ScopedPerfEventHelper() is now simplified. Bug: angleproject:6158 Change-Id: I7fbd19cd0a372ef3ce3600c5d3fc50234b53ca38 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3072564 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 2b86e2d6 2021-07-19T10:30:57 GN: Update dcheck/assert conditions. In preparation for a Chromium change that makes dchecks enabled by default in Release builds, we'll keep ASSERT disabled in Release by default. We add a new flag 'angle_assert_always_on' for controlling ANGLE ASSERT behaviour. Also slightly refactors the direct SPIR-V generation GN. Chromium CL: https://crrev.com/c/2893204 Bug: chromium:1225701 Change-Id: I01a6def28d7c21e771e9800889a6b9c274972de2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035447 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Dirk Pranke <dpranke@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9bbcd86a 2021-01-25T10:52:35 Capture/Replay: Fix instanced array client data. Enables a bunch of self-tests. Bug: angleproject:5530 Change-Id: Idd14574ba0f3d44124e153ccb32fec7318baf217 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2647745 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9528641b 2020-11-23T15:47:09 EGL: Generalize the entry point enum. This both generalizes the GL entry point enum to include other APIs like EGL and inserts the EGL and WGL entry points into the enum. This will faciliate EGL entry point auto-generation and also frame capture for EGL entry points. Bug: angleproject:2621 Change-Id: Iaf4310e03b3d55839dd1328362fb29dcef918fab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2555861 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 06a9d529 2020-11-04T19:57:27 Add build flag to control runtime annotator checks. This restores the prior path where angle_enable_trace would let ANGLE write a debug.txt file without needing environment variables or run-time annotator attachments. Bug: b/170249632 Change-Id: I28693f038572638eb6531c5bb8e42d6cc7a65451 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2523912 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Jamie Madill 3e5b6f81 2020-10-31T12:33:28 Enable writing histogram-set-json-format. This uses the protobuf histogram functionality to build up a histogram set. The test suites then output the histograms to JSON. This is only implemented for angle_perftests. Bug: angleproject:5161 Change-Id: Ia5a7868e8d8dcf4f13d83115ae622828c63ef0d9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2482295 Reviewed-by: Brian Sheedy <bsheedy@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Elliott e89c8f7c 2020-10-22T13:16:29 Add run-time check in EVENT() to disable debug markers To avoid a large performance impact from adding Vulkan debug-util markers for every GLES entrypoint, the EVENT() macro needs a run-time check that avoids constructing a ScopedPerfEventHelper object. Test: angle_perftests -v --local-output --gtest_filter="TracePerfTest.Run/*nba*" Bug: b/170249632 Change-Id: I422111cdf6f6f713800e7ac587e66582bd00359f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2491009 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Ian Elliott f074d61a 2020-09-28T21:40:57 Plumb EntryPoint & Context to DebugAnnotator/EVENT() This makes it easier to plumb debug labels to a future DebugAnnotatorVk class. Bug: b/162068318 Bug: b/169243237 Change-Id: I01e3779569c27c91252dc2874f6deaec526afd6f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451516 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Ian Elliott 981a401e 2020-09-25T08:00:28 Add Context* to EVENT() & DebugAnnotator::beginEvent() This will make it easier for us to record GLES calls and log them with Vulkan vkCmd*DebugUtilsLabelEXT() Bug: b/162068318 Change-Id: I6bddf086ef39cbaca313409802bbb4f2da0d85cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2432193 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Jamie Madill 30fc7ff2 2020-09-16T13:49:54 Show file in internal errors. Just showing the line and function isn't as useful. Bug: angleproject:3162 Change-Id: Ic8c2425a7a7e9992d2a569abd8ea0b7731fa69c6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2407834 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 3486ec96 2020-09-10T17:55:28 Enable -Wweak-template-vtables. Needs one suppression due to Clang warning about multiple vtables in a cpp file. Bug: skia:7647 Change-Id: If7f318b7539d23f783b0ef6d6478ce24a0b72bc7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404746 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 5c56f228 2020-08-28T14:45:14 Enable two override suggestion warnings. -Wsuggest-destructor-override and -Wsuggest-override. Bug: skia:7647 Change-Id: Iaac1baa8f34fdf210baf2fdbe811a582b3ac2d14 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376717 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
James Darpinian 82f2cf31 2020-01-09T15:12:35 Require DEBUG_TRACE to enable expensive state validation ANGLE_STATE_VALIDATION_ENABLED is expensive, adding a lot of overhead to draw calls in debug mode. It's causing some of WebKit's layout tests to time out. Instead of enabling it for all debug builds, let's only enable it when ANGLE_ENABLE_DEBUG_TRACE is specified. Bug: angleproject:3900 Change-Id: I9866d7afbb5666f35c56539820d591953bdf7650 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1994440 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Jamie Madill 16370a65 2019-10-24T12:55:11 Enable "-Winconsistent-missing-destructor-override". This is purely a code style and consistency warning. Enabled to support building in Skia. Bug: angleproject:4046 Change-Id: Ibdcd06ded0195123e52c693851c43d0864e54ad1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877480 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 859ca039 2019-10-24T12:55:08 Enable "-Wshadow-field". This warning verifies we don't give variables names that shadow fields. This is another good warning to enable that Skia requires. This CL also fixes a small number of points in code that used this bad pattern. We have to disable the warning for Glslang for now. Bug: angleproject:4046 Change-Id: I072a686e3023b60cfafa778525fe712ce1fb5a50 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877476 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 70d79b76 2019-09-11T11:43:55 GL: Add state validation functions to GL backend These functions validate that the driver's reported state matches ANGLE's internal state. Can be useful for debugging Bug: angleproject:3900 Change-Id: I35d15e991986dcab114939c551a88549f09bd263 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1797254 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3c6b2e16 2019-08-23T15:12:32 More improvements to trace logging. - output 'glDrawArrays' instead of 'DrawArrays' - output context IDs for multithreaded scenarios - output to trace even when platform logging is on - fix newlines in trace file output Bug: angleproject:3815 Change-Id: Ie07c5c91d9eae6204aaf6f6319ef318b88d292aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1761163 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
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 ea49f6f5 2019-06-06T12:58:27 Debug: Add LOG_INFO logging level Will be used for logging GL/EGL debug messages. Bug: angleproject:3505 Change-Id: I10ff32dd4f9227cabac2f3d9425b0428e7af1398 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1648714 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill cf4c6b70 2019-05-09T11:33:39 Print current file in ASSERT macro failures. Bug: angleproject:3436 Change-Id: If912ae75c96c34b27967f592910c2ee3403b24cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1602178 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yi Xu 926f1caa 2019-05-01T14:03:05 Add support for GCC Compilers Add support for GCC Compilers, so it can be build on Ubuntu. BUG=angleproject:3392 Change-Id: I2f5ac7355a40f52123bd465f86b1e966c59c943d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592062 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Yi Xu <yiyix@chromium.org>
James Darpinian 38e28257 2019-03-13T16:11:15 Fix ASSERT macro not printing message ANGLE's ASSERT macro was often not printing the error message before crashing. The printing happens in the destructor of a temporary object, but the temporary object is not guaranteed to be destroyed before ASSERT calls __builtin_trap(). This change fixes it by introducing a new FATAL log severity that moves the __builtin_trap() call into the destructor after the message is printed. Bug: 780507, angleproject:2215 Change-Id: Ica91e00d67cc95d7b59c3d59e6925ac3a93c19c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1521839 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
jchen10 23ed69cb 2019-01-23T10:36:34 Make WARN() and ERR() thread safe This adds a global mutex lock to protect logging messages from worker threads. BUG=922936 Change-Id: I42e2a7b560da6f6a8b120b74252adce115ccda20 Reviewed-on: https://chromium-review.googlesource.com/c/1429479 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Geoff Lang <geofflang@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>
Yuly Novikov 5fe7c5b9 2019-01-17T12:16:34 Include common/platform.h where used Bug: 922443 Change-Id: I35b9e34266d4a15f8d0769c2770801b1b0511398 Reviewed-on: https://chromium-review.googlesource.com/c/1418091 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 7fa8824b 2018-11-26T13:22:57 Update clang-format settings. To allow for extern "C" declarations to not break on a brace. This preserves the current code style. Also add indented preprocessor definitions. This makes the formatting of "platform.h" much nicer. Bug: angleproject:2971 Change-Id: I392babe0c8d67539a8e026a36a023a7404bb63c2 Reviewed-on: https://chromium-review.googlesource.com/c/1347452 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tobin Ehlis 573f76b3 2018-05-03T11:10:44 Debug: Add Systrace Markers Update ScopedPerfEventHelper class to add systrace markers by default. This change unifies ANGLE EVENT* macro system so that at the base level in LoggingAnnotator class, systrace markers will be added by default. Modify the base DebugLogger to use char* by default and move any conversions to wchar_t to the Windows specializations where wchar is used. This limits type conversions to only where they're needed. This change also includes some new TRACE_EVENT() calls in the VK backend which will result in systrace markers for those calls on the Android platform. The new build flag "angle_enable_trace" is added to enable the tracing calls. Bug: angleproject:2528 Change-Id: Icefc197d4407e1cd31338710e37865abae6a0b15 Reviewed-on: https://chromium-review.googlesource.com/c/1042785 Commit-Queue: Tobin Ehlis <tobine@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 763cec07 2018-10-26T14:19:54 Vulkan: Add warnings for cache struct packing. This adds diagnostic warnings for packed cache structures. It ensures the packed versions of the structures don't have any unexpected misalignments or inserted members. This gives us consistent behaviour and ensures all memory is initialized. Implemented for Clang/GCC/MSVC. Bug: angleproject:2522 Change-Id: I6ec453a40d292e4a498319ffa767988a502d225e Reviewed-on: https://chromium-review.googlesource.com/c/1302533 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi a390ebd9 2018-10-18T13:04:40 Add compiler printf attribute to relevant functions Relands 27a472c60 with reinterpret_cast changed to C-style cast to support types that are pointers on some platforms and integers on others. This commit includes fixes to undefined behavior caught by this attribute. The following changes have been made: - 0x%0.8p is changed to %016 PRIxPTR. Both 0 and . have undefined behavior with p. Additionally, %p already prints 0x with both gcc and clang. This results in a small output change: void *x = (void *)0x1234; void *y = (void *)0x1234567890abcdef; printf("|%0.8p|\n", x); printf("|%0.8p|\n", y); printf("|%016" PRIxPTR "|\n", (uintptr_t)x); printf("|%016" PRIxPTR "|\n", (uintptr_t)y); prints: |0x00001234| |0x1234567890abcdef| |0x0000000000001234| |0x1234567890abcdef| - %d used for GLintptr, GLsizeiptr, EGLTime and EGLnsecsANDROID is changed to %llu and the relevant argument is cast to unsigned long long. This is due to these types being typedefs to unknown types (on Linux for example, these are unsigned long, and my guess would be unsigned long long on Windows where long is 32 bits). - %llu is used for GLuint64, which could be unsigned long (as is on Linux). Those arguments are cast to unsigned long long. - %p is used for some EGLNative types, but those types may not be a pointer. Those arguments are cast to uintptr_t and printed as above. Bug: angleproject:2928 Change-Id: Idf9f705c3d00f69e41e7603453016276a2e13a64 Reviewed-on: https://chromium-review.googlesource.com/c/1300913 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill e9503ae9 2018-10-25T17:55:04 Revert "Add compiler printf attribute to relevant functions" This reverts commit 27a472c601aa542f48ca5944fb769e2971a0594f. Reason for revert: Causing failures on 32-bit Linux configs: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8931673733828416640/+/steps/compile/0/stdout ../../third_party/angle/src/libGLESv2/entry_points_egl.cpp:257:11: error: reinterpret_cast from 'EGLNativeWindowType' (aka 'unsigned long') to 'uintptr_t' (aka 'unsigned int') is not allowed reinterpret_cast<uintptr_t>(win), reinterpret_cast<uintptr_t>(attrib_list)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/angle/src/common/debug.h:230:112: note: expanded from macro 'EVENT' #define EVENT(message, ...) gl::ScopedPerfEventHelper scopedPerfEventHelper("%s" message "\n", __FUNCTION__, ##__VA_ARGS__); ^~~~~~~~~~~ ../../third_party/angle/src/libGLESv2/entry_points_egl.cpp:314:11: error: reinterpret_cast from 'EGLNativePixmapType' (aka 'unsigned long') to 'uintptr_t' (aka 'unsigned int') is not allowed reinterpret_cast<uintptr_t>(pixmap), reinterpret_cast<uintptr_t>(attrib_list)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original change's description: > Add compiler printf attribute to relevant functions > > This commit includes fixes to undefined behavior caught by this > attribute. The following changes have been made: > > - 0x%0.8p is changed to %016 PRIxPTR. Both 0 and . have undefined behavior with > p. Additionally, %p already prints 0x with both gcc and clang. This > results in a small output change: > > void *x = (void *)0x1234; > void *y = (void *)0x1234567890abcdef; > > printf("|%0.8p|\n", x); > printf("|%0.8p|\n", y); > > printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(x)); > printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(y)); > > prints: > > |0x00001234| > |0x1234567890abcdef| > |0x0000000000001234| > |0x1234567890abcdef| > > - %d used for GLintptr, GLsizeiptr, EGLTime and EGLnsecsANDROID is > changed to %llu and the relevant argument is cast to unsigned long > long. This is due to these types being typedefs to unknown types (on > Linux for example, these are unsigned long, and my guess would be > unsigned long long on Windows where long is 32 bits). > - %llu is used for GLuint64, which could be unsigned long (as is on > Linux). Those arguments are cast to unsigned long long. > - %p is used for some EGLNative types, but those types may not be a > pointer. Those arguments are cast to uintptr_t and printed as above. > > Bug: angleproject:2928 > Change-Id: I63e9e998c72701ce8582f1ebf25d6374be9090e4 > Reviewed-on: https://chromium-review.googlesource.com/c/1289232 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: I4f3cea64977bee9f889db6c995371bd2bbc6d81b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2928 Reviewed-on: https://chromium-review.googlesource.com/c/1299480 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 27a472c6 2018-10-18T13:04:40 Add compiler printf attribute to relevant functions This commit includes fixes to undefined behavior caught by this attribute. The following changes have been made: - 0x%0.8p is changed to %016 PRIxPTR. Both 0 and . have undefined behavior with p. Additionally, %p already prints 0x with both gcc and clang. This results in a small output change: void *x = (void *)0x1234; void *y = (void *)0x1234567890abcdef; printf("|%0.8p|\n", x); printf("|%0.8p|\n", y); printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(x)); printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(y)); prints: |0x00001234| |0x1234567890abcdef| |0x0000000000001234| |0x1234567890abcdef| - %d used for GLintptr, GLsizeiptr, EGLTime and EGLnsecsANDROID is changed to %llu and the relevant argument is cast to unsigned long long. This is due to these types being typedefs to unknown types (on Linux for example, these are unsigned long, and my guess would be unsigned long long on Windows where long is 32 bits). - %llu is used for GLuint64, which could be unsigned long (as is on Linux). Those arguments are cast to unsigned long long. - %p is used for some EGLNative types, but those types may not be a pointer. Those arguments are cast to uintptr_t and printed as above. Bug: angleproject:2928 Change-Id: I63e9e998c72701ce8582f1ebf25d6374be9090e4 Reviewed-on: https://chromium-review.googlesource.com/c/1289232 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 6f1dc51b 2018-10-04T14:36:04 Vulkan: Use a specialized macro for wrapped vulkan calls Vulkan wrapper functions are fairly straightforward. They call the Vulkan function and return immediately. The specialized macros introduced in this commit take care of the final return for brevity of the warpper. Additionally, this commit gets rid of ANGLE_EMPTY_STATEMENT in favor of the more robust macro definition using do {} while (0). Bug: none Change-Id: Ia7c68962d1aeee2c06ef210122b345b1a2e54f08 Reviewed-on: https://chromium-review.googlesource.com/c/1262020 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 306b6c16 2018-07-27T08:12:49 D3D11: Use angle::Result error pattern. 1/3 This CL improves performance on the draw call microbenchmark by 10% when no-oping driver calls. Bug: angleproject:2738 Change-Id: I4f5c11db90d9056ce4557b2a4432bc55b42b5bba Reviewed-on: https://chromium-review.googlesource.com/1150093 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang b0e9ddb5 2018-05-23T11:30:04 Refactor a hex streaming into a generic FmtHex function. The length of the printed value can be determined from size of the type. BUG=angleproject:2546 Change-Id: I39a4f9550f381dd82183f50019b3f7d117c52472 Reviewed-on: https://chromium-review.googlesource.com/1070220 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 42cf958c 2018-05-17T15:39:16 Make UNIMPLEMENTED a warning. Having UNIMPLEMENTED be an error was problematic in a few places. Some tests would pass despite hitting the macro. We were relying on this in a bunch of places. Making it a warning is an easier solution than fixing all of the cases. Going forward we can fix the warnings and make warnings produce test failures. This is similar to enabling warnings as errors in C++ code. Bug: angleproject:2552 Change-Id: Iaf0479cd6bd6a9e85aaccbbee13c322166ff7b5a Reviewed-on: https://chromium-review.googlesource.com/1064724 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill c6dbc253 2018-04-30T19:07:56 Scope ANGLE_UNUSED_VARIABLE. Renames the macro to be more ANGLE-ey. Refactoring only. Bug: angleproject:1671 Change-Id: I8f2dd227c7e2025886ec66e85efa877ea261d0ad Reviewed-on: https://chromium-review.googlesource.com/1036209 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ec982e18 2018-04-30T19:06:43 Fix ASSERT macro generating extra code in MSVC. Even on the highest optimization level MSVC was still generating extra code in Release for ASSERT macros. This realigns the code more with Chromium by using a streaming eating macro with the expression at the end. Now no code should be generating. I believe this did not affect Clang builds. Bug: angleproject:1671 Change-Id: I099c59cf0b28ae3ffc08b864982e67559901724e Reviewed-on: https://chromium-review.googlesource.com/1036208 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov aecfa71b 2018-04-20T11:18:59 Print more logs 1. Really print WARN with default platform 2. Print UNREACHABLE, was getting lost because ~LogMessage was not reached BUG=angleproject:1660 Change-Id: I56fad24895adfec8d81539c6628e65ec2f9e7722 Reviewed-on: https://chromium-review.googlesource.com/1021592 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Nico Weber b5db2b49 2018-02-12T15:31:56 Enable -Wimplicit-fallthrough for ANGLE. Also teach MSVC that ANGLE_CRASH() can't return. Also fix instances of the warning in build configurations where UNREACHABLE() can return (e.g. release without dcheck_always_on or debug). If the UNREACHABLE()s are truly unreachable, this change has no behavior change. Bug: chromium:810767 Change-Id: I68f3587cf3e268c3ef634dce7ae3d70399859d0f Reviewed-on: https://chromium-review.googlesource.com/914842 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org>
Jamie Madill 457ded9b 2017-09-22T16:58:44 Print FILE in more debug info messages. Applies to UNREACHABLE and UNIMPLEMENTED. This helps track down the offending line more easily. BUG=angleproject:2167 Change-Id: I97eb80677a6dd432a04f5e7516c3db3de8e7128a Reviewed-on: https://chromium-review.googlesource.com/679999 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov c4d18aac 2017-03-09T18:45:02 Use ErrorStream everywhere Eliminates one more usage of FormatString and its static initializer. Add more ErrorStream types and replace gl::Error and egl::Error with them. BUG=angleproject:1644 Change-Id: Ib498d0ae4b81a332ec71aed7cf709993b154e6bb Reviewed-on: https://chromium-review.googlesource.com/505429 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov f5bb220f 2017-02-17T23:25:17 Restore Default Platform logging to stderr Was lost in https://chromium-review.googlesource.com/434188 Also, don't reset pre-set Platform to Default, otherwise Chrome's platform gets reset. BUG=angleproject:1660, angleproject:1892 Change-Id: I052c86c513c8d89d2420a4724a8bd0dc7446c7c2 Reviewed-on: https://chromium-review.googlesource.com/444928 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov bcb3f9ba 2017-01-27T22:45:18 Direct logging to Platform when available All logging should be done via ERR() and WARN(), which call angle::Platform's logError and logWarning, if there is current Platform which supports logging. Otherwise, ERR() is directed to std::cerr. Misc fixes to keep tests passing. BUG=angleproject:1660, angleproject:1644 Change-Id: I2bca33a021537185d0c236a3083789af3236b5f3 Reviewed-on: https://chromium-review.googlesource.com/434188 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov d73f852f 2017-01-13T17:48:57 Reland "Replace gl::trace logging with Chromium style logging" Removing one usage of FormatString() and its static buffer. And preparation for Platform logging. Fix incorrect enabling of ERR() calls in UNIMPLEMENTED() and UNREACHABLE(), resulting in increased code size and <iostream> adding 5 static initializers to chrome because of cerr referenced in statically linked translator. BUG=angleproject:1660 Change-Id: I7caa18036118d532e0544f75278602559172ae04 Reviewed-on: https://chromium-review.googlesource.com/431457 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6a6b09c9 2017-01-12T21:52:29 Revert "Replace gl::trace logging with Chromium style logging" Failing Chromium static initializers check: FAILED linux-release-64/sizes/chrome-si/initializers: actual 8, expected 7, better lower Possibly due to the static initializer for std::array for the log severity types. We should change it to POD. BUG=angleproject:1660 This reverts commit afcc41cee4ff63e7f6c9e60e55fc061adbba7dd4. Change-Id: Ifb362a4af78542608397c7a0b19e6afe076f2cf3 Reviewed-on: https://chromium-review.googlesource.com/427235 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov afcc41ce 2016-12-13T12:59:39 Replace gl::trace logging with Chromium style logging Removing one usage of FormatString() and its static buffer. And preparation for Platform logging. BUG=angleproject:1660 Change-Id: I58192988ad16196706fe48d0c0ab0fd1a10c0210 Reviewed-on: https://chromium-review.googlesource.com/424173 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 9dbd6262 2016-11-22T11:19:35 Don't put newlines in macros that call ERR, it already adds one. BUG=angleproject:1442 Change-Id: Ia4b4a3f9dc870a53b6c793c6bfc07b76d6b19673 Reviewed-on: https://chromium-review.googlesource.com/413038 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2f6435e0 2016-11-02T10:43:21 Change UNIMPLEMENTED to not assert by default. It is not feasible to run dEQP against ES 3.1 on the bots without removing this assertion. Messages will still be logged and UNREACHABLE will still generate assertion failures when the behaviour is needed. This matches the behaviour of Chromium's NOTIMPLEMENTED macro. Remove the ANGLE_TEST_CONFIG macro, it was not doing anything useful anymore. BUG=angleproject:1442 Change-Id: I76376817a87e1a75ad1a938e1db1d7763e094372 Reviewed-on: https://chromium-review.googlesource.com/406928 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 60e6edfa 2016-10-31T12:17:19 Make ASSERT reference the conditional expression. This should prevent further unexpected bot breakage due to unreferenced variables in the ASSERT expression. Also remove the no longer needed variable referencing macro. BUG=angleproject:1586 Change-Id: I127695165bdfe39c51fe8d17e00daf6bf2fa8252 Reviewed-on: https://chromium-review.googlesource.com/404948 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Martin Radev bd3f8780 2016-10-12T17:05:24 Fix GCC 5.4 compilation error when parsing the __clang__ macro The __clang__ macro cannot be directly used with an #if directive if it has not been defined. This causes a compilation error under GCC 5.4 Linux. Change-Id: Ieca752cd9f0e90c82febc35e19e1c1f3c6096de1 Reviewed-on: https://chromium-review.googlesource.com/397220 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 873d00f4 2016-10-06T13:05:57 Change UNREACHABLE to use ASSERT. The ASSERT macro is enabled with ANGLE_RELEASE_ASSERT, so we should use the same behaviour as the normal ASSERT for the other debug macros. Also remove UNREACHABLEs in the format validation code that were being hit silently. Also make some EGL tests skip instead of fail, since they were hitting UNIMPLEMENTED. BUG=angleproject:1332 BUG=angleproject:1540 BUG=angleproject:1340 Change-Id: Ie3347f2bf2459a5831b66827871998d8fbe7d4b2 Reviewed-on: https://chromium-review.googlesource.com/392490 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 596018ce 2016-09-21T12:57:03 translator: Refactor Constant Union shift ops. In preparation for making them robust. BUG=chromium:648135 Change-Id: I88fc87d8887064fda04087c56de05d8725a6fe5f Reviewed-on: https://chromium-review.googlesource.com/387469 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5db69f57 2016-09-15T12:47:32 Add robust math to constant folding. Previously our multiplication and other operators could do overflows, which can lead to security bugs. BUG=chromium:637050 Change-Id: Icee22a87909e205b71bda1c5bc1627fcf5e26e90 Reviewed-on: https://chromium-review.googlesource.com/382678 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill e31fd875 2016-05-27T08:35:36 Enable Release ASSERT in ANGLE. This will mainly affect the Chromium bots. BUG=angleproject:790 Change-Id: I0c4318e83eedba851f15b3b139551cdb6a2fde12 Reviewed-on: https://chromium-review.googlesource.com/346103 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 89853e84 2016-01-28T10:36:36 Clean up unused variable macros. We might want UNUSED_ASSERTION as a special case but the unused trace variable macro was being abused in places. BUG=angleproject:1290 Change-Id: I5f9252b3ff0484d2e859b9fcf68d5d060b28f1fc Reviewed-on: https://chromium-review.googlesource.com/324290 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill eb316923 2016-01-12T10:22:09 Include function in EVENT macro on non-MSVS. Adding the function is very helpful for diagnostic messages. Also change the name of the debug trace capture file to the more distinct angle_debug.txt from debug.txt. Change-Id: I59b3d61568fd3917cd8c4a8125ee1c28d608aa30 Reviewed-on: https://chromium-review.googlesource.com/321871 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 5c079d24 2015-12-07T09:56:32 Don't print assertion expression as a format string. If the assert contained '%' symbols, it would be interpreted as a substituion. BUG=angleproject:1189 Change-Id: Ib347bc1a892397373e7318e032070c0337f110de Reviewed-on: https://chromium-review.googlesource.com/316410 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4d06a24c 2015-06-26T11:12:24 dEQP: Extend GoogleTest support. *re-land after rebase on top of Chrome build fix* This patch will enable a Chromium-side CL to build dEQP/ANGLE with GoogleTest. BUG=angleproject:998 BUG=500736 Change-Id: Id02c66a260b0a7bab3de9cda624fe097322b2d3c Reviewed-on: https://chromium-review.googlesource.com/281824 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Jamie Madill 57cdc69c 2015-06-23T21:03:06 Revert "dEQP: Extend GoogleTest support." Causing runhooks failures: gyp: Undefined variable deqp_path in C:\b\build\slave\GPU_Win_Builder\build\src\third_party\angle\src\tests\tests.gyp BUG=angleproject:998 BUG=500736 This reverts commit 8edd75d1bb6680e7c2018ece9f5c81e3b87bf938. Change-Id: I8cd83bb5871dea81abea61554b182825145298e6 Reviewed-on: https://chromium-review.googlesource.com/281208 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8edd75d1 2015-06-22T15:35:53 dEQP: Extend GoogleTest support. This patch will enable a Chromium-side CL to build dEQP/ANGLE with GoogleTest. BUG=angleproject:998 BUG=500736 Change-Id: Ie480e3319c1bd77dd1de2c964f78ef97297fcfe9 Reviewed-on: https://chromium-review.googlesource.com/280856 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Austin Kinross 6ee1e786 2015-05-29T17:05:37 Implement GL_EXT_debug_marker in D3D9/D3D11 renderers BUG=angleproject:1043 Change-Id: I7f3bfb35050662520b901828d0478719fa8d11b3 Reviewed-on: https://chromium-review.googlesource.com/274054 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Jamie Madill 8c25cdec 2015-04-01T16:37:48 Only check dynamic type in Impl casting helpers. We can use the Impl casting helper methods to clean up dynamic type casting. Change-Id: I5706da74eedd9f3cdc5a728420074a91ad7c95cb Reviewed-on: https://chromium-review.googlesource.com/263520 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6c7a80d8 2015-04-02T13:00:32 Detect RTTI properly on Clang. This was giving a compile error on OSX. Also update the logic slightly. BUG=angleproject:963 Change-Id: I1ac64aa0908a58d9780054084d5c205c61848763 Reviewed-on: https://chromium-review.googlesource.com/263730 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill f0d10f89 2015-03-31T12:56:52 Replace non-copyable macro with a helper class. This class provides a simpler scheme for blocking default copy and assignment operators. It also reduces the amount of code needed since it's inherited to child classes. This also fixes the conflict between our macro and the same-named macro in Chromium code. BUG=angleproject:956 Change-Id: If0dc72aa3f63fbc7b8fa34907418821c64c39e2f Reviewed-on: https://chromium-review.googlesource.com/263257 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Geoff Lang d4475816 2015-03-18T10:53:05 Always use static_assert for compile-time assertions and remove META_ASSERT. BUG=468139 Change-Id: I696ef307f2faa54bb72df66784bc79a055499987 Reviewed-on: https://chromium-review.googlesource.com/260776 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2c7c625a 2015-03-12T14:15:38 Refactor D3D Debug Annotations code. This encapsultates the different implementations and allows us to compile debug.cpp in the common libraries without link errors. BUG=angleproject:513 Change-Id: I16dc4c666fb4266ee5146d64d77eb9925c7584a8 Reviewed-on: https://chromium-review.googlesource.com/256450 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill fd67b1bf 2015-03-10T16:13:24 Move implementation unit tests to angle_unittests. Now that libANGLE is cross-platform, this should work on OSX/Linux and Android. Includes a warning fixes for test comparisons, and fix to our META_ASSERT wrapper macro for clang. BUG=angleproject:773 Change-Id: I6b88a85c62a2e07734ae81fb8276c28c5f8f9f47 Reviewed-on: https://chromium-review.googlesource.com/258300 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 14aa40f0 2015-01-07T15:12:47 Print ERR() errors to the debug output on Windows. We can switch this on for Debug only. This will help developers catch bugs more easily, and will only show up for internal errors and major performance caveats. Currently it's far too easy to miss these messages - it requires manually modifying debug.h, looking at a text file and potentially also running Chromium with an special flag. BUG=angle:663 Change-Id: I75b3bd05fbc75d21607b9957134db8e8990c77b1 Reviewed-on: https://chromium-review.googlesource.com/239191 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 922a9fb3 2014-10-21T14:26:33 Use D3D11 Debug Annotations when D3D9 is unavailable Change-Id: I37ac5fe7f0b2fe5e71bd7f0afca55e9894f3463c Reviewed-on: https://chromium-review.googlesource.com/224512 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross fe14d455 2014-10-20T14:36:18 Add ANGLE_ENABLE_DEBUG_TRACE_TO_DEBUGGER, to output trace to debugger window Change-Id: I7be71c41b0ec3a77f508c90c2de3331c9522a11b Reviewed-on: https://chromium-review.googlesource.com/223592 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross f0360c60 2014-10-20T14:26:13 Rename ANGLE_ENABLE_TRACE -> ANGLE_ENABLE_DEBUG_TRACE Change-Id: Ib70c456c8d01161e370b9165ff4daa2f0f90c840 Reviewed-on: https://chromium-review.googlesource.com/223591 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 570e83cf 2014-10-20T14:13:58 Rename ANGLE_ENABLE_PERF -> ANGLE_ENABLE_DEBUG_ANNOTATIONS Change-Id: I701cd5ee749797428171e9c58a46fce626b9a969 Reviewed-on: https://chromium-review.googlesource.com/223590 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jacek Caban a5521de2 2014-10-01T17:23:46 Fixed mingw compilation. Change-Id: I8ae33c752feb19e291e4a3b128d21a0ced883c90 Reviewed-on: https://chromium-review.googlesource.com/220761 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Shannon Woods 950cb606 2014-09-18T10:01:56 Create test configuration include guards BUG=angle:501 Change-Id: I0281cf6de4fbf8ddd142b7af4ea2917f0a0a1569 Reviewed-on: https://chromium-review.googlesource.com/218840 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Ehsan Akhgari c1cc4c46 2014-07-02T13:09:07 Support building angle with clang-cl This works around http://llvm.org/PR20013. Change-Id: Ibbd8ab4678cf1caf39b329ea304bdbdc21075ddf Reviewed-on: https://chromium-review.googlesource.com/206481 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: <ehsan@mozilla.com>
Jamie Madill bae30a00 2014-06-17T10:45:02 Add a macro for unused trace variables. This fixes the standalone 64-bit Debug build. Change-Id: I348b71a96ada435867367e565bc84b570d2bfb67 Reviewed-on: https://chromium-review.googlesource.com/204292 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 9cd1915c 2014-05-28T15:54:34 Fix warnings about unreferenced local variables. BUG=skia:2272 Change-Id: Ibf03efedc662fea2a389ad2dc5af5b7b014181a8 Reviewed-on: https://chromium-review.googlesource.com/201900 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4f267868 2014-04-17T15:53:37 Fix Linux build. We were missing several header includes necessary for GCC. Also our static assert macro had a bug, preventing us from using the same assert in multiple places. BUG=angle:568 Change-Id: I01bcdef033a9380f436cbf4bd2a9f11b1553887c Reviewed-on: https://chromium-review.googlesource.com/195471 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang f5713124 2013-10-07T17:06:30 Rework tracing and perf defines. Changed ANGLE_DISABLE_* to ANGLE_ENABLE_* for perf and tracing defines so they are disabled by default. Updated the gyp files to only turn on perf by default for windows debug builds. Change-Id: I71706674e6d12fbf4208acc8f100d963b82c7674 Reviewed-on: https://chromium-review.googlesource.com/183250 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 8690da8b 2013-10-08T10:57:09 Merge 49cbc5768c15d930d5d8751f5263e9546a07d037 from master. Fix a typo introduced in "GCC Compiler Fixes". ANGLEBUG=478 BUG= R=shannonwoods@chromium.org Review URL: https://codereview.appspot.com/14155043
Geoff Lang d0f8e82b 2013-09-30T15:21:53 Implement META_ASSERT with static_assert if the compiler supports it. TRAC #23948 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods
shannonwoods@chromium.org eafb069c 2013-05-30T00:20:44 Allow ANGLE developers to toggle unimplemented assertion failures with preprocessor define. TRAC #23089 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2406 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 8b400b1e 2013-01-30T21:53:40 Do not use dynamic_cast if RTTI is disabled. Review URL: https://codereview.appspot.com/7250043 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1808 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 1825d8e5 2012-08-27T16:25:29 Fixed preprocessors errors on GCC - Preprocessor variables need to be separated from string constants to be separated token - Use ##__VA_ARGS__ GCC extension to support empry __VA_ARGS__ (should be no-op on MSVC). See: http://www.delorie.com/gnu/docs/gcc/gcc_44.html for details. The following series fixes compilation on GCC (from mingw-w64) and allows cross compiling the source on Linux. It was tested in Mozilla tree since ANGLE has no support for GCC in its build system. Issue=358 Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@1259 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 3d8115ff 2011-03-09T15:07:33 Improve debug log formatting. TRAC #15791 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@568 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 0f4cefe9 2011-01-26T19:30:57 Map D3D calls and HLSL shaders back to GLES2 calls and GLSL ES shaders in PIX. This makes debugging and profiling using PIX a lot more convenient. The top level of events are the GLES calls with their arguments. Those can be expanded to see the D3D calls that were issued for a particular GLES call. When PIX is attached, the shaders are saved out to temporary files and referenced from the translated HLSL shaders via #line directives. This enabled source level debugging of the original GLSL from PIX for pixel and vertex shaders. The HLSL is also saved to a temporary file so that intrinsic functions like texture2D can be stepped into. It also avoids creating a text file in the current working directory, which has continued to be an issue. I made the dependency on d3d9.dll static again so it can be accessed by GetModuleHandle witihin DllMain. I added an EVENT macro that issues D3DPERF_BeginEvent and D3DPERF_EndEvent around a C++ block. I replaced TRACE with EVENT for all the entry points. I removed the tracing of shader source since the source is visible in PIX. The means by which the filename of the temporary shader file is passed into the shader compiler is a little clunky. I did it that way to avoid changing the function signatures and breaking folks using the translator. I plan to make the compiler respect #pragma optimize so that optimization can be disabled for debugging purposes. For now it just disables shader optimization in debug builds of ANGLE. Review URL: http://codereview.appspot.com/3945043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@541 736b8ea6-26fd-11df-bfd4-992fa37f6226
baustin@google.com 71557745 2011-01-06T21:46:29 Added a compile flag so that writing to the debug log file can be turned off. Review URL: http://codereview.appspot.com/3733043/ git-svn-id: https://angleproject.googlecode.com/svn/trunk@524 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 7664e55a 2010-05-07T14:33:36 Making glsl-translator cross-platform. Removed unnecessary inclusion of windows.h. Review URL: http://codereview.appspot.com/1136042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@249 736b8ea6-26fd-11df-bfd4-992fa37f6226