Commit Graph
30 Commits
Author SHA1 Message Date
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
Jamie Madill 7c985f5c4f Make angle::Result an enum.
This moves away from a class type to a value type. This should improve
performance when using angle::Result as a return value. Previously the
generated code would return a pointer instead of a value.

Improves performance in the most targeted microbenchmark by 10%. In
more realistic scanarios it will have a smaller improvement. Also
simplifies the class implementation and usage.

Includes some unrelated code generation changes.

Bug: angleproject:2491
Change-Id: Ifcf86870bf1c00a2f73c39ea6e4f05ca705050aa
Reviewed-on: https://chromium-review.googlesource.com/c/1356139
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-12-07 04:59:23 +00:00
Jamie Madill 4f6592fa4c Remove gl::Error.
Removes several TODOs. Only egl::Error remains.

Also slightly decreases binary size.

Bug: angleproject:2491
Change-Id: I3a9d1c22eb0884ca9e37362463fddd0083faf826
Reviewed-on: https://chromium-review.googlesource.com/c/1337462
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-11-28 00:59:29 +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
Jamie Madill 785e8a0b7d Remove gl::LinkResult.
Instead of returning a small struct from LinkProgram calls we use
angle::Result. Linking can have 3 cases:

- the link was successful -> angle::Result::Continue
- the link failed -> angle::Result::Incomplete
- there was an internal error -> angle::Result::Stop

Note that any unexpected Incomplete is still an error. Each function
that accepts Incomplete must check explicitly.

This is the last user of ErrorOrResult.

Bug: angleproject:2491
Change-Id: Idba23be27efe4b561720a4bdd8fe486b40779497
Reviewed-on: https://chromium-review.googlesource.com/c/1255645
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-10-05 11:14:22 +00:00
Shahbaz Youssefi 996628a4a1 Vulkan: Add support for VkPipelineCache
The cache is initialized from the application's blob cache and is
occasionally written back to it for disk storage.

Bug: angleproject:2516
Change-Id: I4cba4b00a7b9641c2983ef07159bc62cd10a5519
Reviewed-on: https://chromium-review.googlesource.com/1241373
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2018-10-01 15:52:41 +00:00
Jamie Madill 6b873dd796 Add gl::ErrorSet and angle::Result.
gl::ErrorSet can handle errors and is accessible from ContextImpl.
It allows the implementation to mutate the error set without using
the gl::Context directly.

angle::Result is the faster POD return value class. It should generate
optimal code. It can also be used seamlessly with the ANGLE_TRY macro.

Also introduces an internal enum as a workaround for generating and
consuming errors in the back-end. When the internal enum is used as
an error return value the error is not consumed in the front-end. This
is a temporary workaround only.

Bug: angleproject:2491
Bug: angleproject:2713
Change-Id: I6cbdaadd075ccbdf241844cbcbc4ed5c3be40a8b
Reviewed-on: https://chromium-review.googlesource.com/1133200
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Frank Henigman <[email protected]>
2018-07-13 17:06:40 +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
Geoff Lang ee6884e7be Generate generic error messages for Error objects without messages.
Makes sure that the debug output is fired for all generated errors.

BUG=783054

Change-Id: Ia30870cd950c53da892554e0862276d4be5360ac
Reviewed-on: https://chromium-review.googlesource.com/761760
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
2017-11-10 00:03:58 +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
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 4d0bf5579c Vulkan: Initialize the draw surface.
This also involves initializing the swap chain and queue.

BUG=angleproject:1319

Change-Id: Ia3a2141905f17b2cdddddab07336f33a737d4fc1
Reviewed-on: https://chromium-review.googlesource.com/367752
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-01-02 15:50:38 +00:00
Jamie Madill 47c0e04836 Use ComPtr references for D3D objects.
This is an work-in-progress CL to prototype using ComPtr.

It also has a new design for internal errors that doesn't use
FormatString, preferring a stream-based approach.

One thing to be aware of is that the address operator does not
behave as expected with ComPtr - we should use ::AddressOf.

BUG=angleproject:530
BUG=angleproject:1644

Change-Id: If5643e9e5726fd9aa5cbd422fca12ae169eb5b1f
Reviewed-on: https://chromium-review.googlesource.com/415027
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2016-11-30 20:16:55 +00:00
Tibor den Ouden ce95d05bd6 Fixed memory leak in egl::Error and gl::Error
Move assignment operator of both classes contained a memory leak.
Changed type of mMessage from mutable std::string *to mutable
std::unique_ptr<std::string>

BUG=angleproject:1264

Change-Id: I7d1419b2e9f385b36afebfd6371983be33ee9e61
Reviewed-on: https://chromium-review.googlesource.com/319520
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tryjob-Request: Tibor Ouden, den <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2016-01-06 16:01:20 +00:00
Geoff Lang 70d0f4996a Implement GL_KHR_debug.
BUG=angleproject:520

Change-Id: I9ced3e7ab1515feddf2ec103c26b2610a45b1784
Reviewed-on: https://chromium-review.googlesource.com/319830
Tryjob-Request: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2016-01-02 15:09:23 +00:00
Geoff Lang 66988745f2 Revert "Implement GL_KHR_debug."
This reverts commit 6c521b7a70.

Change-Id: I6ff981198e31f34d3e405edea6277ee75516d6ee
Reviewed-on: https://chromium-review.googlesource.com/319820
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-12-22 19:39:40 +00:00
Geoff Lang 6c521b7a70 Implement GL_KHR_debug.
BUG=angleproject:520

Change-Id: I78d14cc8c94f5cef58604220f0ca847473b25bf8
Reviewed-on: https://chromium-review.googlesource.com/317820
Tryjob-Request: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-12-22 15:36:53 +00:00
Jamie Madill e79b1e142f D3D11: Restrict use of MAX_UINT element indexes.
We need to block the app from using MAX_UINT on D3D11 because we can't
disable primitive restart on this platform. Instead generate an
INVALID_OPERATION error, which is spec-compliant in ES3 because the
result is undefined behaviour. This is also compliant with WebGL which
explicitly defines an error here.

BUG=angleproject:597

Change-Id: I7ebc5371b63ff860dc6dddf79939e9629ebb2a3c
Reviewed-on: https://chromium-review.googlesource.com/309638
Reviewed-by: Corentin Wallez <[email protected]>
Tryjob-Request: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-11-05 13:26:37 +00:00
Geoff Lang 45795dbe14 Inline commonly used Error methods and add move operators.
The function call overhead of the constructors and assignement operators
ended up being a hotspot even though the functions didn't do any
significant work.

BUG=angleproject:959

Change-Id: I96769879dabdbba7a222f98d87c5be0a829cb7dd
Reviewed-on: https://chromium-review.googlesource.com/262335
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Nicolas Capens <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-03-30 14:05:17 +00:00
Jamie Madill b929397753 Add UMA histogram for D3D11 init failures.
This will give ANGLE in Chrome a sense of device init calls fails in
D3D11, and why.

BUG=436191

Change-Id: Ia7b1bfa334cec595b6f0265357385d0dcc2d6cbf
Reviewed-on: https://chromium-review.googlesource.com/248632
Reviewed-by: Zhenyao Mo <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-02-26 15:30:11 +00:00
Jamie Madill d2d21dcadc Revert "Resubmit "Compile the D3D11 VS and PS on separate threads at GL link time""
Causes errors in Clang-Win. We can fix the error and then resubmit, but need to do a roll now.

This reverts commit 310184861b.

Change-Id: I1c91b0a97031df33c2261089f6b54ccd3270306b
Reviewed-on: https://chromium-review.googlesource.com/250430
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-02-17 18:09:13 +00:00
Austin Kinross 310184861b Resubmit "Compile the D3D11 VS and PS on separate threads at GL link time"
The original change caused a Chromium build break due to
"__uncaught_exception" not being defined in concrt.h. This is because Chromium
defines "_HAS_EXCEPTIONS=0" in its GYP, but ANGLE doesn't do this.

This change defines "_HAS_EXCEPTIONS=0" in ANGLE's GYP to match Chromium,
and refines it in ProgramD3D.cpp before including <future>.

Change-Id: Ic324702569bac8f4ae1381f308c4f3f11f190f9e
Reviewed-on: https://chromium-review.googlesource.com/244860
Tested-by: Austin Kinross <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-02-02 18:37:12 +00:00
Jamie Madill 198e9e39b2 Fix parity bug in egl::Error::createMessageString.
The check should be "==" instead of "!=". This gave a crash any time
we would generate an Error with a message.

Change-Id: I7c5d57e30053591b4713d8c829e89fd1c0703da0
Reviewed-on: https://chromium-review.googlesource.com/244820
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Austin Kinross <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-01-30 20:30:46 +00:00
Jamie Madill b82e1a9cd6 Fix parity bug in Error::createMessageString.
The check should be "==" instead of "!=". This gave a crash any time
we would generate an Error with a message.

Change-Id: I9217e6237ee8a2d3a4d6caa799b8508edbf4e774
Reviewed-on: https://chromium-review.googlesource.com/244754
Reviewed-by: Austin Kinross <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-01-30 20:23:53 +00:00
Jamie Madill 9d294c33f2 Revert "Compile the D3D11 VS and PS on separate threads at GL link time"
Failing compile on Chromium bots:

FAILED: ninja -t msvc -e environment.x86 -- C:\b\build\goma/gomacc "C:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\angle\src\libANGLE\renderer\d3d\libANGLE.ProgramD3D.obj.rsp /c ..\..\third_party\angle\src\libANGLE\renderer\d3d\ProgramD3D.cpp /Foobj\third_party\angle\src\libANGLE\renderer\d3d\libANGLE.ProgramD3D.obj /Fdobj\third_party\angle\src\libANGLE.cc.pdb 
c:\b\depot_tools\win_toolchain\vs2013_files\vc\include\concrt.h(4774) : error C3861: '__uncaught_exception': identifier not found
ninja: build stopped: subcommand failed.


This reverts commit 6d51f2629a.

Change-Id: Iebb2843dfbc3795290fbb33e1a111ddad59c3126
Reviewed-on: https://chromium-review.googlesource.com/244792
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-01-30 19:58:59 +00:00
Austin Kinross 6d51f2629a Compile the D3D11 VS and PS on separate threads at GL link time
BUG=angle:900

Change-Id: Iad5dbbcc676e2a2b6dfc3d7bc6ab5957154de33e
Reviewed-on: https://chromium-review.googlesource.com/240490
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Austin Kinross <[email protected]>
2015-01-30 19:36:55 +00:00
Austin Kinross 3940a45344 Only call std::string constructor in gl::Error when necessary
std::string's constructor is very expensive in debug builds.
In some applications we have seen it use 10% of the CPU.
This change makes (e)gl::Error store a pointer to an std::string,
and only create a string when necessary.

Change-Id: I78bfbda86568944681517fe32df9d1556e4ebee7
Reviewed-on: https://chromium-review.googlesource.com/240495
Tested-by: Austin Kinross <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2015-01-20 14:55:28 +00:00
Geoff Lang 2b5420c07f Merge libGLESv2 and libEGL classes into libANGLE.
BUG=angle:733

Change-Id: Ic491c971411fe82c56cd97c5c8325ac14ec218df
Reviewed-on: https://chromium-review.googlesource.com/230830
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2014-11-21 19:46:02 +00:00