src/common/platform.h


Log

Author Commit Date CI Message
James Darpinian 012d1519 2019-10-31T16:50:23 Stop using __has_include<Cocoa/Cocoa.h> __has_include seems to cause problems with goma builds. Instead, detect iOS vs MacOS using TargetConditionals.h. Also use plain C++ instead of Objective-C++ when possible. Bug: angleproject:3439 Bug: 1015591 Change-Id: I816624e0cdc54ad3a18d3891b4efecf6fe640574 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1894243 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Jamie Madill c898ec1a 2019-11-04T15:20:18 Add EGL GGP extensions. This CL adds two new extensions: * EGL_ANGLE_ggp_stream_descriptor: Introduces a new attribute to CreateWindowSurface. Allows the app to pass in a stream descriptor to VkCreateSurfaceKHR. Mirrors VK_GGP_stream_descriptor_surface. * EGL_ANGLE_swap_with_frame_token: Introduces a new function 'eglSwapBuffersWithFrameTokenANGLE'. This allows the app to pass a GGP frame token down to vkQueuePresentKHR. Mirrors VK_GGP_frame_token. Bug: angleproject:4078 Change-Id: I4313ac4c264e68999905049f661bc64b44f72fab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1897315 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Nathan Zabriskie 5d9c4ee3 2019-09-17T15:36:25 Add D3D11on12 device option This CL adds a new D3D11on12 device option which runs the D3D11 API on top of D3D12. This is done to aid in preliminary investigations into the feasibility of creating a full D3D12 backend implementation. Bug: angleproject:3919 Change-Id: I0ad4250eb3c93b0b74274c904aac74f03753c7ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1814404 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 11dc1635 2019-09-18T14:46:23 Add support for generating UWP (Windows Store) projects again Until late 2017, ANGLE supported Windows Store apps on Windows 8.1, Windows Phone 8.1, and Windows 10 (via the Universal Windows Platform, aka UWP). Unfortunately ANGLE deprecated support for Windows Store when it switched from GYP to GN in 2017. Since then, users have been able to use Microsoft\angle for their UWP apps but this isn't ideal since it's based on a 2017 copy of Google\angle. This PR bring back support for UWPs, so that UWP users can use Google\angle again. Specifically it: - Adds support for generating UWP projects via GN - Adds helper/util functions specific to UWP (they're mostly similar to the desktop Windows helpers) - Fixes some existing Windows Store code that's rotted since 2017 - Disables async shader compilation for UWPs, since its implementation calls wait on the UI thread (which is forbidden in UWPs) - Renames 'ANGLE_ENABLE_WINDOWS_STORE' to 'ANGLE_ENABLE_WINDOWS_UWP', since ANGLE only support UWPs now - Fixes misc other related issues (such as dependencies on D3D9 headers in API-agnostic code) Note that this doesn't bring back support for Windows/Phone 8.1. BUG=angleproject:3922 Change-Id: Ia79ae05a5e0e0a0625eb633bf1928722dfd3e85f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1811871 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 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>
Michael Spang 229fc83d 2019-01-21T18:09:15 Vulkan: Port renderer to Fuchsia (reland) Add DisplayVk and WindowSurfaceVk subclasses for Fuchsia to the vulkan renderer, as well as an implementation of OSWindow that renders fullscreen for the test suite. Disallow use of the vulkan loader from third_party as Fuchsia uses a fork of the loader and has not sent those changes upstream yet. Add a small wayland-inspired library libfuchsia-egl to provide a type "struct fuchsia_egl_window" to use as EGLNativeWindowType. This type combines a zx_handle_t to an image pipe channel and a surface size. Image pipes can only be used once to create a VkSurfaceKHR. This means we have to recreate the pipe in tests that call eglCreateWindowSurface more than once with a single OSWindow, or the second call will fail. Add a resetNativeWindow() method to accomplish this. Reland disabling -Wextra-semi. BUG=angleproject:2475 TEST=angle_end2end_tests on Fuchsia Change-Id: Ie91715bcd760c6c04d4b8a02a91daa71e32ee30c Reviewed-on: https://chromium-review.googlesource.com/c/1467603 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3f0ff409 2019-02-12T03:08:51 Revert "Vulkan: Port renderer to Fuchsia" This reverts commit 991d1cfb5e5a2f20a46961da3ad85b95da30b88a. Reason for revert: Failing compile on the fuchsia bots on the ANGLE auto-roller. https://ci.chromium.org/p/chromium/builders/luci.chromium.try/fuchsia_x64/209198 In file included from ../../third_party/angle/util/fuchsia/ScenicWindow.cpp:10: In file included from ../../third_party/angle/util/fuchsia/ScenicWindow.h:13: In file included from gen/third_party/fuchsia-sdk/sdk/fidl/fuchsia/ui/policy/cpp/fidl.h:5: In file included from ../../third_party/fuchsia-sdk/sdk/pkg/fidl_cpp/include/lib/fidl/cpp/internal/header.h:12: ../../third_party/fuchsia-sdk/sdk/pkg/fit/include/lib/fit/function.h:135:6: error: extra ';' after member function definition [-Werror,-Wextra-semi] }; ^ 1 error generated. Original change's description: > Vulkan: Port renderer to Fuchsia > > Add DisplayVk and WindowSurfaceVk subclasses for Fuchsia to the vulkan > renderer, as well as an implementation of OSWindow that renders > fullscreen for the test suite. > > Disallow use of the vulkan loader from third_party as Fuchsia uses a fork > of the loader and has not sent those changes upstream yet. > > Add a small wayland-inspired library libfuchsia-egl to provide a type > "struct fuchsia_egl_window" to use as EGLNativeWindowType. This type > combines a zx_handle_t to an image pipe channel and a surface size. > > Image pipes can only be used once to create a VkSurfaceKHR. This means we > have to recreate the pipe in tests that call eglCreateWindowSurface more > than once with a single OSWindow, or the second call will fail. Add a > resetNativeWindow() method to accomplish this. > > BUG=angleproject:2475 > TEST=angle_end2end_tests on Fuchsia > > Change-Id: I71a613a362dd1c8aada49a3c02ae461e064457bf > Reviewed-on: https://chromium-review.googlesource.com/c/1446496 > Commit-Queue: Michael Spang <spang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=spang@chromium.org,geofflang@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: I2d9abefa9db5363ba63a17c1773d0e147040d055 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2475 Reviewed-on: https://chromium-review.googlesource.com/c/1465761 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Michael Spang 991d1cfb 2019-01-21T18:09:15 Vulkan: Port renderer to Fuchsia Add DisplayVk and WindowSurfaceVk subclasses for Fuchsia to the vulkan renderer, as well as an implementation of OSWindow that renders fullscreen for the test suite. Disallow use of the vulkan loader from third_party as Fuchsia uses a fork of the loader and has not sent those changes upstream yet. Add a small wayland-inspired library libfuchsia-egl to provide a type "struct fuchsia_egl_window" to use as EGLNativeWindowType. This type combines a zx_handle_t to an image pipe channel and a surface size. Image pipes can only be used once to create a VkSurfaceKHR. This means we have to recreate the pipe in tests that call eglCreateWindowSurface more than once with a single OSWindow, or the second call will fail. Add a resetNativeWindow() method to accomplish this. BUG=angleproject:2475 TEST=angle_end2end_tests on Fuchsia Change-Id: I71a613a362dd1c8aada49a3c02ae461e064457bf Reviewed-on: https://chromium-review.googlesource.com/c/1446496 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7fa8824b 2018-11-26T13:22:57 Update clang-format settings. To allow for extern "C" declarations to not break on a brace. This preserves the current code style. Also add indented preprocessor definitions. This makes the formatting of "platform.h" much nicer. Bug: angleproject:2971 Change-Id: I392babe0c8d67539a8e026a36a023a7404bb63c2 Reviewed-on: https://chromium-review.googlesource.com/c/1347452 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jeff Gilbert c0b82333 2018-09-26T18:04:05 Polyfill BitCount for ARM/ARM64 on MSVC. Also _WIN64 implies _WIN32. Bug: angleproject:2858 Change-Id: I63e2ffd2e9e304171ea6adb99836733981cc1813 Reviewed-on: https://chromium-review.googlesource.com/1248441 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Thomas Miller cb4ae446 2018-08-02T08:19:09 Make Angle compile for Arm64 Windows Change-Id: Iee947a5abf4a833f155f7cb100577c92323a34e5 Reviewed-on: https://chromium-review.googlesource.com/1160863 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 7b19a49b 2018-04-20T09:31:52 Use LIKELY and UNLIKELY macros to wrap error generation. BUG=609673 Change-Id: I247f561712e30aa10bad77fabf614501d596915e Reviewed-on: https://chromium-review.googlesource.com/1021995 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4fba4a97 2017-12-05T10:36:05 Include the D3D11 headers on Windows when OpenGL is enabled. The OpenGL backend on Windows uses D3D11 to implement several interop extensions. Without this change, there are compile failures when the D3D11 backend is disabled. BUG=angleproject:2276 Change-Id: I69ad524ca84aa0aa399cfc0b601315f3ee65ed16 Reviewed-on: https://chromium-review.googlesource.com/809186 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Tom Anderson 23cd4add 2017-11-10T14:54:37 Add missing include to stddef.h on arm Change-Id: I28771a550a3188993635f55803093fc49590ceb1 Reviewed-on: https://chromium-review.googlesource.com/764887 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e7c5f4f0 2017-10-30T07:16:43 Fix compilation on mips devices. We need to include stddef explicity for size_t. BUG=angleproject:2167 Change-Id: I66e75b8d29e94aa9b8427e39827a0267649bb0ec Reviewed-on: https://chromium-review.googlesource.com/743702 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Martin Radev 74a0000f 2017-07-11T11:27:09 Request a D3D11.1 device and D3D11.3 context The patch extends Renderer11 so that a D3D11.1 device and D3D11.3 context can be created. This is necessary for using the D3D11.3 feature called VPAndRTArrayIndexFromAnyShaderFeedingRasterizer. BUG=angleproject:2062 BUG=angleproject:2145 TEST=angle_end2end_tests Change-Id: I84c761b2897d7d911686f5b6d79cb93e233015a0 Reviewed-on: https://chromium-review.googlesource.com/591448 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jerome Duval d2e87929 2017-07-12T15:42:34 Enable Haiku in platform-specific headers. 1. src/common/platform.h updated to define ANGLE_PLATFORM_POSIX on Haiku. 2. include/EGL/eglplatform.h updated to add stubs typedefs for platform-specific primitives for Haiku. Change-Id: I28775e909ad9cabec1c474ff4fe0a241eb05d6a1 Reviewed-on: https://chromium-review.googlesource.com/573022 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Sergey Ulanov 145e3cbb 2017-06-29T12:36:21 Enable Fuchsia in platform-specific headers. Two simple fixes to make libANGLE compile for Fuchsia: 1. Added stubs typedefs for platform-specific primitives in EGL/eglplatform.h for Fuchsia. 2. src/common/platform.h updated to define ANGLE_PLATFORM_POSIX on Fuchsia. Change-Id: I5f053de46632ac3f12bb93e57eeb94c3a34c867c Reviewed-on: https://chromium-review.googlesource.com/563758 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Brian Osman 63d82626 2017-01-06T14:05:18 Fix preprocessor typo for enabling Windows Runtime Library BUG=angleproject:530 Change-Id: Id93bd4f3f82bc0a6a0cbe4b55bc310d11266a2bd Reviewed-on: https://chromium-review.googlesource.com/425938 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 47c0e048 2016-11-30T13:44:45 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 <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Martin Radev ee7e1e21 2016-07-18T15:39:47 Add ES31 entry points as function stubs Entry points were generated using scripts which take the new function declarations from gl31.h, find the newly added functions and output the new function declarations and defitions. BUG=angleproject:1442 TEST=angle_unittests Change-Id: I2d77eb4cc24873a31cb2745b7b82bf611d5058c6 Reviewed-on: https://chromium-review.googlesource.com/361291 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang 5695fc99 2016-07-05T14:47:30 Clean up the SSE detection logic. * Include the correct header right in the SSE check in platform.h. * Don't use separate SSE versions of the load functions, have them use SSE automatically. BUG=612205 Change-Id: I70f9a5513e144db4d16c1f3ad922debeb6c50268 Reviewed-on: https://chromium-review.googlesource.com/358108 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jacek Caban e842eabd 2015-03-26T16:50:35 Fixed compilation with mingw. Change-Id: I027cedc383efbd215e55a7ddf4e41eb1c368a1ae Reviewed-on: https://chromium-review.googlesource.com/262590 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jacek Caban <cjacek@gmail.com>
Austin Kinross 2bdcbb9a 2015-01-16T11:12:15 Enable Windows Phone 8.1 project generation Change-Id: Iab44f6d634bdcd01348aa49de28b96c3b6086df7 Reviewed-on: https://chromium-review.googlesource.com/241945 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Jamie Madill dd806c2b 2015-01-14T14:26:35 Use emmintrin.h for SSE includes. This header should work on all available platforms, instead of the platform-specific intrin.h or x86intrin.h. BUG=angle:773 Change-Id: Ia012053064838f9893aa647d872e136a47cfad1a Reviewed-on: https://chromium-review.googlesource.com/240552 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Cooper Partin ffe38e1c 2015-01-14T08:32:19 Fixed WinRT ARM build break. ARM cannot use SSE. Change-Id: I9a55d37db148f82b255e2c7ff414e79259e2c4e1 Reviewed-on: https://chromium-review.googlesource.com/240476 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0875f85d 2015-01-12T16:27:11 Don't use SSE functions on Android. These methods are unavailable on ARM platforms. Also fix a sequencing bug that caused us to incorrectly define the Android platform as Linux. BUG=angle:773 Change-Id: Id2b47acdd5b574c618ac86641a1a8238fbb4a2c3 Reviewed-on: https://chromium-review.googlesource.com/240095 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 01675d80 2015-01-05T16:09:08 Use correct SSE header on OSX. This fixes the compile errors in loadImageSSE2.cpp. BUG=angle:773 This reverts commit a93192369eb448e932bcdd1e08ae791aacfbe0c4. Change-Id: I31bc419cd3930ae129903b935f49a3c9b27fc887 Reviewed-on: https://chromium-review.googlesource.com/238448 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kenneth Russell 0c219b81 2014-11-19T11:17:03 Trivial change to allow translator to be compiled via Emscripten. BUG=none Change-Id: Ifdb02d4b7c061f403f50d2e1fbea4ab117462475 Reviewed-on: https://chromium-review.googlesource.com/230813 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Kenneth Russell <kbr@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 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>
Cooper Partin 88d3b8cb 2014-10-08T10:41:56 Added IInspectable EGLNativeWindowType and ICoreWindow support Change-Id: I6dd7fef72a73572d4a3deda7ce36a11da3a75c81 Reviewed-on: https://chromium-review.googlesource.com/224366 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e020bed5 2014-10-20T16:16:46 Revert "Added IInspectable EGLNativeWindowType and ICoreWindow support" Causing regressions in the build: http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/20182 This reverts commit 756aebfc7afa6d0de14e96637ef396dd7b290c2d. Change-Id: I2f4bdb5aeb429c9bbc5e655a1761704f33737841 Reviewed-on: https://chromium-review.googlesource.com/224221 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin 756aebfc 2014-10-08T10:41:56 Added IInspectable EGLNativeWindowType and ICoreWindow support Change-Id: I34e443b1e194800460e441ac6cee42cf68430564 Reviewed-on: https://chromium-review.googlesource.com/224302 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Shannon Woods 8858cf0a 2014-10-17T20:53:32 Revert "Added IInspectable EGLNativeWindowType and ICoreWindow support" due to build failures on Chromium FYI bots. This reverts commit 406a3be91cc8175df95bd390425e35830778f2d5. Change-Id: Ica2abd2e557a4fd9852d85b7fc018e3d272b6edf Reviewed-on: https://chromium-review.googlesource.com/224051 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Cooper Partin 406a3be9 2014-10-08T10:41:56 Added IInspectable EGLNativeWindowType and ICoreWindow support Change-Id: I9ad82b7819bcca1c05e7aa60dc2baec4a7bc403c Reviewed-on: https://chromium-review.googlesource.com/222360 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shannon Woods fb839475 2014-06-16T13:21:41 Fix ifdef complaints in clang BUG=angle:677 Change-Id: Iee457dfc0990e5ffd61932b1f286f3c0208568bc Reviewed-on: https://chromium-review.googlesource.com/203427 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Shannon Woods <shannonwoods@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>