Commit Graph
74 Commits
Author SHA1 Message Date
Kenneth Russell b1f094eb5f 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 <[email protected]>
Reviewed-by: James Darpinian <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Kenneth Russell <[email protected]>
2020-12-08 20:42:56 +00:00
Ian Elliott 968fccb200 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
2020-12-03 00:18:38 +00:00
Jamie Madill 9528641bf1 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 <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2020-11-30 20:30:09 +00:00
Ian Elliott e2ecb2ddef 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 <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Charlie Lao <[email protected]>
2020-11-07 04:29:17 +00:00
Jamie Madill 06a9d5294d 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 <[email protected]>
Commit-Queue: Ian Elliott <[email protected]>
2020-11-07 03:34:37 +00:00
Jamie Madill a5c9e672ef 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 <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2020-10-29 20:17:14 +00:00
Ian Elliott e89c8f7c36 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 <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2020-10-22 20:58:18 +00:00
Jamie Madill 068617d6cf 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 <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2020-10-07 19:46:23 +00:00
Ian Elliott bc4ec4c11f 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Ian Elliott <[email protected]>
2020-10-06 16:51:09 +00:00
Ian Elliott f074d61a69 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2020-10-06 03:27:26 +00:00
Jamie Madill 6534a6f870 Revert "Vulkan:Add debug labels for OpenGL calls"
This reverts commit 3705fc4131.

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 <[email protected]>
> Reviewed-by: Tim Van Patten <[email protected]>
> Reviewed-by: Jamie Madill <[email protected]>
> Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
> Reviewed-by: Shahbaz Youssefi <[email protected]>

[email protected],[email protected],[email protected],[email protected],[email protected]

# 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 <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2020-10-02 02:16:53 +00:00
Ian Elliott 3705fc4131 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 <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2020-10-01 00:02:37 +00:00
Ian Elliott 981a401e59 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 <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2020-09-29 05:22:14 +00:00
Jamie Madill 32de9efebc 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 <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
2020-09-17 23:44:04 +00:00
Jamie Madill 30fc7ff2c7 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 <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2020-09-16 19:12:38 +00:00
Yuly Novikov e1ccac7ff9 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 <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2020-02-12 00:42:34 +00:00
Kenneth Russell 1031d2c65b 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 <[email protected]>
Reviewed-by: James Darpinian <[email protected]>
Commit-Queue: Kenneth Russell <[email protected]>
2020-01-04 01:51:39 +00:00
Jamie Madill 3c6b2e1613 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 <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
2019-08-23 23:17:26 +00:00
Jamie Madill b8482ab763 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 <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-08-16 21:00:24 +00:00
Stuart Morgan 9d737966ac 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-08-14 23:05:33 +00:00
Courtney Goeltzenleuchter b8ec98fe17 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: James Darpinian <[email protected]>
2019-08-08 18:59:56 +00:00
James Dong ea49f6f5d4 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 <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-06-06 22:25:39 +00:00
Jamie Madill 0febee5b61 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-05-16 21:17:46 +00:00
James Darpinian 38e2825706 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-03-16 02:30:26 +00:00
jchen10 23ed69cb0d 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 <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-02-16 00:36:04 +00:00
Jamie Madill b980c5630e 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 <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2018-11-27 18:27:13 +00:00
Tobin Ehlis 573f76b3ee 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 <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-11-26 15:45:45 +00:00
Geoff Lang b0e9ddb553 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 <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2018-05-23 17:55:27 +00:00
Jamie Madill ec982e18ab 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 <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-05-02 15:34:26 +00:00
Yuly Novikov aecfa71b4a 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 <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2018-04-20 19:04:38 +00:00
Yuly Novikov 6807f82659 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 <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2018-01-26 20:17:57 +00:00
Yuly Novikov c4d18aac0a 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-06-07 20:48:52 +00:00
Jamie Madill 4465330212 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 <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-05-17 19:08:09 +00:00
Yuly Novikov f5bb220f93 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 <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-02-21 23:09:34 +00:00
Jamie Madill 75066e7a35 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 <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-02-16 20:55:05 +00:00
Yuly Novikov bcb3f9baf7 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-02-06 20:35:13 +00:00
Yuly Novikov d73f852f8d 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 <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-01-25 01:09:13 +00:00
Jamie Madill 6a6b09c9b6 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 afcc41cee4.

Change-Id: Ifb362a4af78542608397c7a0b19e6afe076f2cf3
Reviewed-on: https://chromium-review.googlesource.com/427235
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-01-12 23:19:49 +00:00
Yuly Novikov afcc41cee4 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 <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2017-01-12 01:02:47 +00:00
Jamie Madill 60e6edfa7f 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 <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-10-31 20:25:24 +00:00
Jamie Madill e31fd8753b 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 <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-05-27 20:05:05 +00:00
Jamie Madill 89853e8420 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 <[email protected]>
Tested-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-01-28 18:17:17 +00:00
Austin Kinross 6ee1e7866e 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 <[email protected]>
Tested-by: Austin Kinross <[email protected]>
2015-06-15 17:44:17 +00:00
Jamie Madill 2c7c625a5e 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 <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-03-18 14:29:35 +00:00
Cooper Partin 7318b7cb8e 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 <[email protected]>
Tested-by: Cooper Partin <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-01-08 18:36:44 +00:00
Jamie Madill 14aa40f021 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 <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2015-01-07 21:25:35 +00:00
Geoff Lang 8bc361e144 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 <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2014-12-01 19:01:02 +00:00
Austin Kinross 922a9fb336 Use D3D11 Debug Annotations when D3D9 is unavailable
Change-Id: I37ac5fe7f0b2fe5e71bd7f0afca55e9894f3463c
Reviewed-on: https://chromium-review.googlesource.com/224512
Tested-by: Austin Kinross <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2014-10-30 13:32:41 +00:00
Austin Kinross fe14d455c2 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 <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2014-10-28 19:27:20 +00:00
Austin Kinross f0360c6004 Rename ANGLE_ENABLE_TRACE -> ANGLE_ENABLE_DEBUG_TRACE
Change-Id: Ib70c456c8d01161e370b9165ff4daa2f0f90c840
Reviewed-on: https://chromium-review.googlesource.com/223591
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Shannon Woods <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2014-10-28 19:26:57 +00:00