src/common/debug.cpp


Log

Author Commit Date CI Message
Akihiko Odaki 31a090ca 2022-11-01T22:09:44 Debug: Handle LOG_EVENT on Apple platform Trace() lacked the code path to handle LOG_EVENT for Apple platform, leading to the "unreachable" code path. Fix the problem by logging the message as info-level with the OS interface, as done for Android. Bug: angleproject:7802 Change-Id: I45811102c07c9f65c5a828f71c37bd8d0cd672e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3996521 Auto-Submit: 小田喜陽彦 <akihiko.odaki@gmail.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Antonio Maiorano 3cc948ad 2022-09-29T21:09:11 Scope LogMessage debug mutex lock to avoid deadlock on ANGLE_CRASH In the LogMessage destructor, in debug builds, the g_debugMutex gets locked; however, if ANGLE_CRASH() is called at the bottom of the function, and SEH (via /EHsc) is used (such as in googletest), then the lock destructor will not get called, and the mutex will not be released. If another LogMessage is created subsequently, the process will hang on attempting to lock the mutex again. This is exactly what happened when this Dawn unit test failed, and would hang for about 2 hours until the runner timed out: http://go/bbid/8801856579635182833 This CL scopes the lock to not include the ANGLE_CRASH() call (and the break into debugger). Bug: angleproject:7715 Change-Id: Ib31ad9c0641a521e28f1179c079ba1555c3274e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3928211 Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov c2220ecf 2022-06-13T16:11:25 Always log FATAL, ERR messages is_debug=false in gn args together with angle_assert_always_on=false (default) results in no logs in logcat, which makes sense if you know that logs are conditional on ANGLE_ENABLE_ASSERTS but is pretty confusing when running into this accidentally. Bug: None Change-Id: I67499a34cd3d02fd7d17680a4cb62d263883b301 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3703619 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com>
Cody Northrop e3c44919 2022-03-24T11:32:10 Debug: Add angle_enable_trace_events Include the following GN arg to print all GLES and EGL commands: angle_enable_trace_events = true Bug: angleproject:7126 Change-Id: I78eb061c10ed519d6a0b0357eea11567d1cfb518 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3551656 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
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>
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>
Kenneth Russell b1f094eb 2020-12-04T17:30:34 Log to stderr for warnings and more severe messages. This helps the WinCairo port of WebKit use ANGLE; warning messages sent to stdout are causing layout test failures. Bug: angleproject:5432 Change-Id: Idc6d3061a2dbf13d5f118285aa9b8438542966aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2576038 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Ian Elliott 968fccb2 2020-12-02T13:28:30 Vulkan: Use VK_EXT_device_memory_report extension This CL can enable and use the VK_EXT_device_memory_report extension. This is disabled by default. To enable, link with the required extension, enable one or both of two features, AND build with the following GN arg: angle_enable_trace = true The two added features are: - logMemoryReportStats provides per-swap statistics - logMemoryReportCallbacks provides per-callback logging If either or both of the features are enabled, if the VK_EXT_device_memory_report extension is available, it is enabled. Bug: b/173636655 Change-Id: Ic5cf6c06efdb34f2313ef143853b3cc90f55faa5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2543506 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
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>
Ian Elliott e2ecb2dd 2020-11-03T19:26:00 Enable logging API commands to Android logcat This enables logging API commands to Android logcat. It is enabled via the following GN arg: angle_enable_android_api_logcat = true On desktop, API commands can continue to be logged to the "angle_debug.txt" file via a different mechanism, with the GN arg: angle_enable_trace = true Bug: b/170249632 Change-Id: Id52e75f966a97692ec6d69eb3d254ba295a151c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519094 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Charlie Lao <cclao@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 a5c9e672 2020-10-29T12:24:58 Add newline when using OutputDebugStringA logging. Prior changes had made it so we no longer were spacing out the output correctly. Bug: None Change-Id: Icf81b579271f2b4c8fa5a1d90d323dc062f23585 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2507635 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Jamie Madill 068617d6 2020-10-05T20:42:57 Fix debug message formatting. Also includes a refactor of GLenum utils. Bug: angleproject:5131 Change-Id: Ic2d974ef5612b3609ae66bcca087cc0442f43888 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2447042 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Elliott bc4ec4c1 2020-10-05T17:10:18 Vulkan: Plumb OpenGL ES commands to AGI/debuggers Use vkCmd*DebugUtilsLabelEXT() calls to delimit all GLES commands, and group them under GLES draw/dispatch calls. Plumb calls from the EVENT macro (for every GL entrypoint) to vkCmd*DebugUtilsLabelEXT() via a newly-implemented DebugAnnotatorVk class. Use a new dirty bit so that cached entrypoints are associated with a triggering draw/dispatch command. The DebugAnnotatorVk::beginEvent() method saves a string in a vector of all GL commands in ContextVk. The dirty bit converts the strings into begin-end vkCmd*DebugUtilsLabelEXT() pairs. The DebugAnnotatorVk::endEvent() method makes the final vkCmdEndDebugUtilsLabelEXT() call for a draw/dispatch command. Enable the OGL->VK mapping feature by setting "angle_enable_trace = true" in GN args. Bug: b/162068318 Bug: b/169243237 Change-Id: I61b6a8d113168c0ce578d6efd002d8a393659aba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451517 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
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>
Jamie Madill 6534a6f8 2020-10-02T01:10:54 Revert "Vulkan:Add debug labels for OpenGL calls" This reverts commit 3705fc41315b50a64299ecb1d75015a33fefd6aa. Reason for revert: Causes errors on Debug bots. See bug. Bug: angleproject:5121 Original change's description: > Vulkan:Add debug labels for OpenGL calls > > Implement the DebugAnnotatorVk class, and plumb the EVENT macro in the > GL entrypoints to save a string of call info in the vector of all > GL calls in ContextVk. > > Then add a vkCmdBeginDebugUtilsLabelEXT() call that includes the > OpenGL draw/dispatch call prior to any Vulkan Draw or Dispatch calls. > Also embedded under that label add a second > vkCmdBeginDebugUtilsLabelEXT() call labeled "OpenGL Commands" that > includes all of the OpenGL calls leading up to the draw/dispatch. > Each individual OpenGL call is then given its own > vkCmdBegin/EndDebugUtilsLabelEXT() pair so that the complete sequence > of GL calls leading up to a draw call is visible for each Draw. > > Enable the OGL->VK mapping feature by setting > "angle_enable_trace = true" in GN args. > > Note: This will create an ANGLE APK on Android that generally won't > work with games, unless launched by AGI (which provides the debug > utils extension). A future version will disable these labels unless > the debug utils extension is found. > > Bug: b/162068318 > Bug: b/169243237 > Change-Id: I09886f17fa9287528c12552698738ea1fe2a4b8c > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2427557 > Commit-Queue: Ian Elliott <ianelliott@google.com> > Reviewed-by: Tim Van Patten <timvp@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> TBR=courtneygo@google.com,ianelliott@google.com,timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: b/162068318 Bug: b/169243237 Change-Id: I772d549213e1ad64ae58a1937e5de0f7ea740084 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444094 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Ian Elliott 3705fc41 2020-09-28T21:40:57 Vulkan:Add debug labels for OpenGL calls Implement the DebugAnnotatorVk class, and plumb the EVENT macro in the GL entrypoints to save a string of call info in the vector of all GL calls in ContextVk. Then add a vkCmdBeginDebugUtilsLabelEXT() call that includes the OpenGL draw/dispatch call prior to any Vulkan Draw or Dispatch calls. Also embedded under that label add a second vkCmdBeginDebugUtilsLabelEXT() call labeled "OpenGL Commands" that includes all of the OpenGL calls leading up to the draw/dispatch. Each individual OpenGL call is then given its own vkCmdBegin/EndDebugUtilsLabelEXT() pair so that the complete sequence of GL calls leading up to a draw call is visible for each Draw. Enable the OGL->VK mapping feature by setting "angle_enable_trace = true" in GN args. Note: This will create an ANGLE APK on Android that generally won't work with games, unless launched by AGI (which provides the debug utils extension). A future version will disable these labels unless the debug utils extension is found. Bug: b/162068318 Bug: b/169243237 Change-Id: I09886f17fa9287528c12552698738ea1fe2a4b8c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2427557 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@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>
Yuly Novikov e1ccac7f 2020-02-11T17:45:02 Don't print INFO level log messages in Release by default. Even with dcheck_always_on. INFO level log messages will still be printed in Debug or when angle_enable_trace is enabled. Bug: angleproject:3525 Change-Id: Ic3807f94307af2878aee78426c969ab846ae3881 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2050890 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Kenneth Russell 1031d2c6 2020-01-03T14:28:26 Upstream Mac logging changes from WebKit. Use os_log_with_type in ANGLE's logging facility rather than fprintf. Bug: angleproject:4263 Change-Id: I0c418fc5544001bf4f47ff511d05de2f0ebaa1de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1987145 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: James Darpinian <jdarpinian@chromium.org> Commit-Queue: Kenneth Russell <kbr@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>
Jamie Madill b8482ab7 2019-08-15T09:49:29 Clean up trace output. Removes the "EVENT: " prefix from every trace message. Also removes the extra blank line between trace entries. And fixes a missing space in EGL_WaitSyncKHR. Bug: angleproject:3815 Change-Id: Id6321357a56477da29de121abb51c721b11d99da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1756084 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Courtney Goeltzenleuchter b8ec98fe 2019-08-08T10:19:50 Fix build issue with tracing enabled Global destructors are no longer allowed, thus need to use NoDestructor template on static objects to build correctly. Bug: angleproject:3790 Change-Id: I54b81d21b40649cb014636c7ed147f2c8cab33df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1744199 Reviewed-by: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: James Darpinian <jdarpinian@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 0febee5b 2019-05-15T17:03:52 Break debugger on assertion failure. This adds a few simple system utility functions. We can check if a debugger is attached and break into the debugger. Most of the code is adapted from Chromium's base/debug. Bug: angleproject:3162 Change-Id: I9cb39d42865a543fbf3201222dd8227318b32ad5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1615353 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@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 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>
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>
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 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>
Yuly Novikov 6807f826 2018-01-25T20:19:27 Print more logs when using default Platform Some logs prior to Test Platform initialization were getting lost. 1. Also print WARN() to stdout 2. Use Android specific logging facilities BUG=angleproject:1660 Change-Id: I8424958426809567396ef24cedc2d427a3a21959 Reviewed-on: https://chromium-review.googlesource.com/887944 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: 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>
Jamie Madill 44653302 2017-05-17T11:03:44 Use fprintf(stderr) instead of std::cerr. This allows us to include <ostream> instead of <iostream> to avoid including a static initializer. BUG=angleproject:2037 Change-Id: Ib7e84a15018fa951bad1c87ffec4bfb0c896749f Reviewed-on: https://chromium-review.googlesource.com/507627 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: 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>
Jamie Madill 75066e7a 2017-02-15T17:26:13 Clean up EVENT() logging. These don't need newlines, or a severity prefix. BUG=angleproject:1660 Change-Id: I8a01c55a7e3d8915f48c2a29f43ddc0a37eb64f3 Reviewed-on: https://chromium-review.googlesource.com/443353 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
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>
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>
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 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>
Cooper Partin 7318b7cb 2015-01-08T09:15:35 Fixed failed compilation for WinRT to use OutputDebugStringA for non wide strings. Change-Id: If012660d4b895399fe5e3226dea25a8c7f78c8ac Reviewed-on: https://chromium-review.googlesource.com/239504 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Jamie Madill <jmadill@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>
Geoff Lang 8bc361e1 2014-11-20T16:23:31 Support compiling libANGLE as a static or shared library. BUG=angle:733 Change-Id: If27d3330534bce0f5b691010ea7d97bcb7579122 Reviewed-on: https://chromium-review.googlesource.com/231052 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-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>
Jamie Madill b60fe31f 2014-09-26T14:56:41 Fix the ANGLE_ENABLE_TRACE build. We needed to include angleutils.cpp in libtranslator for this to compile. Also allow the event helpers to record API calls even if ANGLE_ENABLE_PERF is off. BUG=angle:513 Change-Id: I2646d5ebeae536a4a7f1cd7ecaf0ce019ce5ff76 Reviewed-on: https://chromium-review.googlesource.com/219756 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang da5777cf 2014-07-11T09:52:58 Create an Error object to represent GL errors. BUG=angle:520 Change-Id: I1a54e6f308b5b0f310c725a7771af737a77ecd42 Reviewed-on: https://chromium-review.googlesource.com/209619 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 44fa7594 2014-05-30T11:50:07 Refactor platform related functionality into platform.h and tls.h. Since libGLESv2 and libEGL will eventually be cross platform, it will be useful to have platform defines and TLS functions that work everywhere. BUG=angle:664 Change-Id: Ia357925a0992d82e8b446d88d32a1984d319e6e8 Reviewed-on: https://chromium-review.googlesource.com/202133 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2515c520 2014-03-07T10:28:43 Fix compile errors on pre-C++11 compilers. BUG=angle:575 Change-Id: Ibad77fda193c850c29483aa56d0d2275c131429a Reviewed-on: https://chromium-review.googlesource.com/189163 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang feee44bf 2014-03-05T11:34:31 Keep the debug log file open and flush with each message. Instead of opening and closing the debug log file with each message, keep it open permanently and flush it with each message, allowing the OS to flush to disk as needed. With debug logging enabled, performance is improved by 100x! Also, dynamically size the output buffer to the max message size. When running all the samples, the largest debug message was 318 characters so an initial size of 512 (instead of 32768) seems reasonable. BUG=angle:575 Change-Id: If4a1387431fc2d32a6b2d1f9ca1f2590473feb86 Reviewed-on: https://chromium-review.googlesource.com/188713 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 83217796 2014-01-16T09:52:38 Remove system.h. The gyp files already define NOMINMAX and WIN32_LEAN_AND_MEAN. windows.h is also included via the D3D includes. This ends up speeding up the build process significantly by not having windows.h included in nearly every file. Also fixes issues on non-windows systems by not having stdarg.h included in debug.cpp. Change-Id: Id32d9aac37a5a29df832a062dd8024302a798a1c Reviewed-on: https://chromium-review.googlesource.com/183251 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@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 6850947e 2013-10-07T17:06:30 Added a define that removes d3d includes from the common directory so that d3d9 headers are not included in the translator project.
shannon.woods@transgaming.com 486d9e9b 2013-02-28T23:15:41 Remove a lot of unnecessary include files and break include chains. This should speed up incremental compile times when modifying headers, by reducing the number of dependencies. TRAC #22518 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1937 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com a9b96d0d 2013-01-25T21:56:18 Include windows.h from one place to ensure that min and max macros are not defined. These conflict with the STL functions of the same name. This is to make the standalone ANGLE gyp build work again. Review URL: https://codereview.appspot.com/7211043 Also includes r1729 which adds the missing new file. git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1790 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 5dc3b8b4 2012-11-28T19:43:49 Don't call gl::output unless perf is enabled. gl::output allocates a pretty large stack buffer, so it has to call _chkstk. This is rather slow, so avoid calling gl::output if perf and tracing are disabled. BUG= Review URL: https://codereview.appspot.com/6843043 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1471 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 95a758f3 2012-07-12T15:17:06 Remove dos-style line-endings (EOL changes only) git-svn-id: https://angleproject.googlecode.com/svn/trunk@1218 736b8ea6-26fd-11df-bfd4-992fa37f6226
jbauman@chromium.org d08aa75e 2012-01-20T23:50:06 Increase size of output buffer for pix to 32768 We output entire hlsl shaders into this buffer, so 4096 bytes was too small. BUG= TEST= Review URL: https://codereview.appspot.com/5532094 git-svn-id: https://angleproject.googlecode.com/svn/trunk@953 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com eef0e27c 2011-10-12T16:19:36 Fix link errors caused by static use of perf related functions even when ANGLE_DISABLE_PERF is defined. Bug=225 Author: Mark Callow git-svn-id: https://angleproject.googlecode.com/svn/trunk@788 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 73bec982 2011-05-12T18:15:03 Cache result of D3DPERF_GetStatus. I profiled the WebGL acquarium with AMD CodeAnalyst and it turns out this function got a lot of hits. Top 10 before change: CS:EIP Symbol + Offset 64-bit Timer samples 0x62a87260 CBatchFilterI::ProcessBatch 13.41 0x62a171f1 D3DPERF_GetStatus 6.04 0x629ce831 CD3DBase::SetVertexShaderConstantF_FP 5.12 0x62a88bea CBatchFilterI::GetBatchBufferPointer<_LH_SETPIXELSHADERCONSTIMM_TOKEN_SMALL> 4.61 0x6298060b UpdateViewportCache 4.2 0x6298da3a CD3DBase::UpdateTextures 3.58 0x6298db6b CD3DDDIDX10::SetTexture 2.76 0x6298df1d CD3DDDIDX10::InsertStreamSource 2.46 0x629d1c1a CD3DBase::SetPixelShaderConstantF_FP 2.25 0x6297efc4 CD3DHal::SetSamplerState_FP 2.05 10 functions, 186 instructions, Total: 454 samples, 46.47% of shown samples, 2.51% of total session samples And after: CS:EIP Symbol + Offset 64-bit Timer samples 0x69317260 CBatchFilterI::ProcessBatch 13.87 0x69318bea CBatchFilterI::GetBatchBufferPointer<_LH_SETPIXELSHADERCONSTIMM_TOKEN_SMALL> 5.84 0x6921060b UpdateViewportCache 5.29 0x6925e831 CD3DBase::SetVertexShaderConstantF_FP 4.93 0x6921da3a CD3DBase::UpdateTextures 4.38 0x6921e034 CD3DBase::SetStreamSource_FP 3.65 0x69261c1a CD3DBase::SetPixelShaderConstantF_FP 3.65 0x69227651 CD3DBase::DrawIndexedPrimitive 2.74 0x6920efc4 CD3DHal::SetSamplerState_FP 2.37 0x6925e9f7 CD3DBase::SetVertexShaderConstantIntF 2.37 10 functions, 152 instructions, Total: 269 samples, 49.09% of shown samples, 0.80% of total session samples UpdateViewportCache looks like it might be low hanging fruit as well. Review URL: http://codereview.appspot.com/4535049 git-svn-id: https://angleproject.googlecode.com/svn/trunk@648 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
apatrick@chromium.org c1693978 2010-10-06T02:34:39 Made debug log filename compile time configurable. Define TRACE_OUTPUT_FILE macro to change filename. Default remains "debug.txt" for Visual Studio solution based build. Gyp based build uses "angle-debug.txt". Review URL: http://codereview.appspot.com/2327043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@445 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 442b7deb 2010-05-12T03:41:01 Re-enable debug tracing by default TRAC #12158 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@263 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com a54da4e5 2010-05-07T13:03:28 Implemented inline structure construction TRAC #12109 Based on Alok Priyadarshi's approach for structure construction in OutputGLSL.cpp Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@245 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com e7e43fb9 2010-04-22T13:35:23 Make it easier to disable tracing TRAC #11979 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Andrew Lewycky git-svn-id: https://angleproject.googlecode.com/svn/trunk@178 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com bbf56f75 2010-04-20T18:52:13 Use directory qualified #include files Trac #11408 Signed-off-by: Andrew Lewycky Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@165 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 5903aeb1 2010-03-17T13:11:57 Move Common -> src/common Trac #11406 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@34 736b8ea6-26fd-11df-bfd4-992fa37f6226