Граф коммитов

486 Коммитов

Автор SHA1 Сообщение Дата
Rafael Cintron b6a2f6bcf6 Avoid unnecessary loading of D3D9.dll
D3D9.dll is being loaded by ANGLE when using D3D11. This change
removes the D3D9 dependency.

- Delayload D3D9.dll using ldflags in BUILD.gn

- Replace Renderer11 usage of DebugAnnotator9 with DebugAnnotator11.
Using debug annotations with Visual Studio PIX tools now requires Windows 10.

- Refactor DebugAnnotator11 to QI ID3DUserDefinedAnnotation from the
renderer's ID3D11DeviceContext instead of making a 'null' device.

Bug: angleproject:3234
Change-Id: I10a2b537e07cda2094b08abf02b7876bbe5009f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1508643
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-03-08 23:41:43 +00:00
Corentin Wallez 105bc9d7ba Revert "Allow enabling trace annotations"
This reverts commit f094bac949.

Reason for revert: Causes timeouts on Debug bots in the BufferDataTest.NULLData

Original change's description:
> Allow enabling trace annotations
> 
> Tracing was never allowed to happen because getStatus always returned
> false. Also want to allow tracing for release builds for perf analysis.
> 
> Bug: angleproject:3176
> Change-Id: I7aa94ed9fe3d7f67fe6dd10123c9badc7fb49d82
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1475248
> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
> Reviewed-by: Jamie Madill <jmadill@google.com>

TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@google.com,courtneygo@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: angleproject:3176
Change-Id: I91d28d15a092519551811a9a07c01987c9e028e7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1505799
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-03-06 21:18:46 +00:00
Jamie Madill 55959b0bb1 Add glmark2 to build.
glmark2 is a an OpenGL ES 2.0 benchmark licensed under GPL v3.
See https://github.com/glmark2/glmark2

ANGLE can use glmark2 as a metric and guide for optimization. It will
add a number of useful performance tests. This CL adds the initial
build integration.

A follow-up CL will integrate glmark2 into our performance tests. Note
that glmark2 will not be shipped with Chrome or Android. It will only
be used on our test infrastructure.

Note that the data path solution is temporary. When integrated into
ANGLE we will make sure we CWD into the glmark2 directory before
running the benchmark.

Bug: angleproject:3139
Change-Id: I5c4f605221c255ab19abd10b321b5867ab459105
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1449984
Commit-Queue: Jamie Madill <jmadill@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-03-05 18:33:39 +00:00
Courtney Goeltzenleuchter f094bac949 Allow enabling trace annotations
Tracing was never allowed to happen because getStatus always returned
false. Also want to allow tracing for release builds for perf analysis.

Bug: angleproject:3176
Change-Id: I7aa94ed9fe3d7f67fe6dd10123c9badc7fb49d82
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1475248
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@google.com>
2019-03-05 16:04:06 +00:00
Tobin Ehlis 5546fb4fdd Vulkan:Adding custom pool allocator
Migrated pool allocator used by compiler to common.

Planning to use this for ANGLE custom command buffers so this some
refactoring in preparation for that work.

Added a unit test to check PoolAllocator functionality.

Bug: angleproject:2951
Reviewed-on: https://chromium-review.googlesource.com/c/1476953
Reviewed-by: Jamie Madill <jmadill@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
Change-Id: I0b4f3d55ea1799e35c9799c221f7129233f30b24
Reviewed-on: https://chromium-review.googlesource.com/c/1492972
2019-02-28 23:26:27 +00:00
Shahbaz Youssefi 9dc8eafe11 Vulkan: ES3 dEQP suppressions
This re-enables Vulkan ES3 context creation and adds the necessary dEQP
suppressions.

Bug: angleproject:2950
Change-Id: Ic24a9fb4f867f3bce08f101e056f208abf84bb5e
Reviewed-on: https://chromium-review.googlesource.com/c/1483311
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-02-28 05:04:42 +00:00
Yuly Novikov 0546b53807 Revert "Vulkan:Adding custom pool allocator"
This reverts commit 9417174961.

Reason for revert: crashes on Debug bots

Original change's description:
> Vulkan:Adding custom pool allocator
> 
> Migrated pool allocator used by compiler to common.
> 
> Planning to use this for ANGLE custom command buffers so this some
> refactoring in preparation for that work.
> 
> Added a unit test to check PoolAllocator functionality.
> 
> Bug: angleproject:2951
> Change-Id: I29618cfdb065b8a5fefd40719a35d27b1f6e99ef
> Reviewed-on: https://chromium-review.googlesource.com/c/1476953
> Reviewed-by: Jamie Madill <jmadill@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Tobin Ehlis <tobine@google.com>

TBR=ynovikov@chromium.org,jmadill@google.com,tobine@google.com,syoussefi@chromium.org

Change-Id: Id8c522bd1d94154e871211d975e801a55cc9c257
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2951, angleproject:3169
Reviewed-on: https://chromium-review.googlesource.com/c/1487977
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-02-25 22:47:23 +00:00
Tobin Ehlis 9417174961 Vulkan:Adding custom pool allocator
Migrated pool allocator used by compiler to common.

Planning to use this for ANGLE custom command buffers so this some
refactoring in preparation for that work.

Added a unit test to check PoolAllocator functionality.

Bug: angleproject:2951
Change-Id: I29618cfdb065b8a5fefd40719a35d27b1f6e99ef
Reviewed-on: https://chromium-review.googlesource.com/c/1476953
Reviewed-by: Jamie Madill <jmadill@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
2019-02-25 17:41:27 +00:00
Jamie Madill d09546e1ec D3D: Fall back to old compiler DLL.
This is a workaround for Windows 7 users sometimes not having the UCRT
required for the new versions of the MS HLSL compiler. It requires a
specific version of the Windows SDK with the old compiler DLL.

Bug: chromium:920704
Change-Id: Id9adb3b9d569272cbd69a8b4fc99dc160d837dbc
Reviewed-on: https://chromium-review.googlesource.com/c/1403254
Reviewed-by: Jamie Madill <jmadill@google.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Jamie Madill <jmadill@google.com>
2019-02-22 17:30:43 +00:00
Tim Van Patten ee4fa07850 Reland "Create Container ANGLE APK"
This reverts commit 902ceed399.

Reason for revert:

Re-landing this since the Chromium build fix has landed:
https://bugs.chromium.org/p/chromium/issues/detail?id=933783#c29
  Comment 29 by gbeaty@chromium.org, Today (13 minutes ago)
  Tim, you should be able to re-land your change now.

Original change's description:
> Revert "Create Container ANGLE APK"
> 
> This reverts commit e82c857d38.
> 
> Reason for revert:
> This is breaking the ANGLE build in the Chromium build process:
> 
> https://bugs.chromium.org/p/chromium/issues/detail?id=933783#c6
> 
> Original change's description:
> > Create Container ANGLE APK
> > 
> > The ANGLE APK needs to be reverted back to just being a container
> > for the ANGLE shared object libraries, since the rest of the APK
> > contents are in the Android source tree.
> > 
> > Bug: angleproject:3154
> > Test: 'adb sync' the APK on to a device
> > Change-Id: Id245f1e3d269c71054d9759e8ba8be0532afe659
> > Reviewed-on: https://chromium-review.googlesource.com/c/1474341
> > Commit-Queue: Tim Van Patten <timvp@google.com>
> > Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
> 
> TBR=ynovikov@chromium.org,jmadill@google.com,cnorthrop@google.com,courtneygo@google.com,timvp@google.com
> 
> Change-Id: I71a739faa2052a707a06bce616ab43a621d5a4ff
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:3154
> Reviewed-on: https://chromium-review.googlesource.com/c/1478333
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Commit-Queue: Tim Van Patten <timvp@google.com>

TBR=ynovikov@chromium.org,jmadill@google.com,cnorthrop@google.com,courtneygo@google.com,timvp@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: angleproject:3154
Change-Id: If3a9abfb1c00aab3278437a233bef29d5febe5a5
Reviewed-on: https://chromium-review.googlesource.com/c/1480865
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
2019-02-21 20:53:40 +00:00
Tim Van Patten 902ceed399 Revert "Create Container ANGLE APK"
This reverts commit e82c857d38.

Reason for revert:
This is breaking the ANGLE build in the Chromium build process:

https://bugs.chromium.org/p/chromium/issues/detail?id=933783#c6

Original change's description:
> Create Container ANGLE APK
> 
> The ANGLE APK needs to be reverted back to just being a container
> for the ANGLE shared object libraries, since the rest of the APK
> contents are in the Android source tree.
> 
> Bug: angleproject:3154
> Test: 'adb sync' the APK on to a device
> Change-Id: Id245f1e3d269c71054d9759e8ba8be0532afe659
> Reviewed-on: https://chromium-review.googlesource.com/c/1474341
> Commit-Queue: Tim Van Patten <timvp@google.com>
> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>

TBR=ynovikov@chromium.org,jmadill@google.com,cnorthrop@google.com,courtneygo@google.com,timvp@google.com

Change-Id: I71a739faa2052a707a06bce616ab43a621d5a4ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3154
Reviewed-on: https://chromium-review.googlesource.com/c/1478333
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
2019-02-20 16:49:32 +00:00
Tim Van Patten e82c857d38 Create Container ANGLE APK
The ANGLE APK needs to be reverted back to just being a container
for the ANGLE shared object libraries, since the rest of the APK
contents are in the Android source tree.

Bug: angleproject:3154
Test: 'adb sync' the APK on to a device
Change-Id: Id245f1e3d269c71054d9759e8ba8be0532afe659
Reviewed-on: https://chromium-review.googlesource.com/c/1474341
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
2019-02-19 18:58:05 +00:00
Michael Spang 229fc83d68 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>
2019-02-13 00:37:39 +00:00
Yuly Novikov 8edc68e3ff Vulkan: Require Android NDK API level 26, dropping Android N support.
Due to Vulkan Validation Layers breaking Android N backward compatibility.
See http://crrev/c/1405714
and https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/623

Bug: angleproject:3095
Change-Id: I5da306c567cd9a0088149ca9929b38c8ed2cc86a
Reviewed-on: https://chromium-review.googlesource.com/c/1465954
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-02-12 20:14:33 +00:00
Jamie Madill 3f0ff409c7 Revert "Vulkan: Port renderer to Fuchsia"
This reverts commit 991d1cfb5e.

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>
2019-02-12 03:09:10 +00:00
Michael Spang 991d1cfb5e 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>
2019-02-11 22:51:25 +00:00
Jamie Madill 238c19e1a2 Add fuzzer for xxHash.
Local testing did not turn up any crashes.

Bug: angleproject:2983
Change-Id: I5e87ed0768e5bc4454c1a896f96d09ddd92baf44
Reviewed-on: https://chromium-review.googlesource.com/c/1458656
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-02-08 23:14:41 +00:00
Jamie Madill cd4f1fbaab Fix gtest main from including the wrong headers.
We would accidentally propagate include directories to the test
main target. This would show up as compile errors of the form:

In file included from ../../third_party/angle/testing/gtest/include/gtest/gtest.h:10:
../../third_party/angle/third_party/googletest/src/googletest/include/gtest/gtest.h:303:22: error: no member named 'ImplicitlyConvertible' in namespace 'testing::internal'
          !internal::ImplicitlyConvertible<T, AssertionResult>::value>::type*
           ~~~~~~~~~~^

This fixes the GN properties such that we no longer get the wrong
/testing/ and /third_party/googletest/ directories included. This
regressed when glslang was rolled.

Bug: angleproject:3088
Change-Id: I710f767cfe476454c10dacf2103b9203f1b5ee19
Reviewed-on: https://chromium-review.googlesource.com/c/1459596
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-02-08 00:13:12 +00:00
Michael Spang 3521863294 Vulkan: Move vulkan config target to $angle_root:vulkan_config
This will allow us to avoid loading the build file for
//third_party/vulkan-validation-layers on Fuchsia, since we don't want to
build the validation layers on that platform.

BUG=angleproject:2475
TEST=angle_end2end_tests on Fuchsia (with full series)

Change-Id: Ifeb67125f5fcebf2b30ae18b760667ba7c56e4d5
Reviewed-on: https://chromium-review.googlesource.com/c/1456479
Commit-Queue: Michael Spang <spang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-02-06 21:09:38 +00:00
Shahbaz Youssefi 52d861bd49 Disable -Wextra-semi-stmt
Due to bot build failures.  Partially reverts:

c09ae15c0: Enable -Wextra-semi and -Wextra-semi-stmt.

TBR=jmadill@chromium.org

Bug: angleproject:3128
Change-Id: Ia3725e57d28cd899db59e1d8e760ad8ca3d5f70c
Reviewed-on: https://chromium-review.googlesource.com/c/1450659
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-02-02 06:50:48 +00:00
Jamie Madill c09ae15c08 Enable -Wextra-semi and -Wextra-semi-stmt.
This will prevent users from accidentally making semicolon errors in
the future.

Bug: chromium:926235
Change-Id: I79a6fa376fb1ad8f0fcf1b65b1f572a035d1f4e9
Reviewed-on: https://chromium-review.googlesource.com/c/1446493
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-02-01 21:53:28 +00:00
Cezary Kulakowski 4fb738fbc0 Fix for linking of non-component angle_unittests
Bug: chromium:927650
Change-Id: Ib944dee7e537820af53eb12538c33e7d0c4fbd68
Reviewed-on: https://chromium-review.googlesource.com/c/1449631
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-02-01 14:58:05 +00:00
Jamie Madill 0cb3b0f1e0 Vulkan: Use glslang's internal BUILD.gn.
This retires the ANGLE BUILD.gn file for glslang. Also makes a few more
repos sync from Chromium's copy using build overrides. This should
speed up Chrome checkouts slightly.

Bug: angleproject:3088
Change-Id: I530f28d9b13469bbe6471a4c61e7353d599d81ec
Reviewed-on: https://chromium-review.googlesource.com/c/1422545
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-29 02:06:07 +00:00
Tobin Ehlis 47ca1b2fa3 Revert "Vulkan: Adding custom pool allocator"
This reverts commit 05459e06fd.

Reason for revert: Clusterfuzz bugs flagged this commit

Original change's description:
> Vulkan: Adding custom pool allocator
> 
> Copied pool allocator used by compiler to common and hooking it up as
> custom allocator for CommandPools. Modified it to support reallocation.
> 
> RendererVk now has a private poolAllocator and VkAllocationCallbacks
> struct. The allocation callbacks are initialized to static functions
> in RendererVk::initializeDevice() and then passed to CommandPool init()
> and destroy() functions.
> 
> Using the pool allocator saves Command Pool/Buffer clean-up time which
> was showing us as a bottleneck is some cases.
> 
> Bug: angleproject:2951
> Change-Id: I81aa8a7ec60397676fa722d6435029db27947ef4
> Reviewed-on: https://chromium-review.googlesource.com/c/1409867
> Commit-Queue: Tobin Ehlis <tobine@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

TBR=jmadill@chromium.org,tobine@google.com,ianelliott@google.com,syoussefi@chromium.org

Change-Id: I363a351667c4dddef79833061790da90de477e70
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2951
Reviewed-on: https://chromium-review.googlesource.com/c/1430679
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
2019-01-23 16:11:56 +00:00
Tobin Ehlis 05459e06fd Vulkan: Adding custom pool allocator
Copied pool allocator used by compiler to common and hooking it up as
custom allocator for CommandPools. Modified it to support reallocation.

RendererVk now has a private poolAllocator and VkAllocationCallbacks
struct. The allocation callbacks are initialized to static functions
in RendererVk::initializeDevice() and then passed to CommandPool init()
and destroy() functions.

Using the pool allocator saves Command Pool/Buffer clean-up time which
was showing us as a bottleneck is some cases.

Bug: angleproject:2951
Change-Id: I81aa8a7ec60397676fa722d6435029db27947ef4
Reviewed-on: https://chromium-review.googlesource.com/c/1409867
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-01-22 19:29:59 +00:00
Jamie Madill ab2bfa814c Enable Chromium clang style plugin for libANGLE.
This fixes a few style warnings:

 * auto should not deduce to raw pointer type
 * inlined virtual methods are not allowed
 * non-trivial constructors and destructors should be explicit
 * inlined non-trivial constructors should not be in-class
 * missing override keywords

Bug: angleproject:3069
Change-Id: I3b3e55683691da3ebf6da06a5d3c729c71b6ee53
Reviewed-on: https://chromium-review.googlesource.com/c/1407640
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-16 01:44:15 +00:00
Jamie Madill 7098cff5c5 Make BUILD.gn targets into templates.
This allows us to "globally" add and remove certain configs as long as
we use the new templates. This simplifies the logic of adding configs
for stuff like extra warnings and default include dirs. As well it
simplifies removing certain common unwanted configs.

Generally simplifies the logic in BUILD.gn. Will allow for easily
suppressing the clang-plugins config instead of using a global setting
in .gn. Then we can enable the additional warnings config-by-config.

Also fixes some warnings that turned up after we enabled the extra
warnings config in our tests. Also moves the dEQP tests main to be
consistent with the other test main files.

Bug: angleproject:3069
Change-Id: I5a8166cd0f5a7926822c171fcaf473fc86b3ffc1
Reviewed-on: https://chromium-review.googlesource.com/c/1409871
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-16 00:35:58 +00:00
Courtney Goeltzenleuchter c05c141619 Add validation layers to Android apk
The compressed symbol support requires explicitly listing the
libraries, so add validation libraries.

Use list of ANGLE libraries to reduce duplication

Bug: angleproject:2981
Change-Id: Ia8feb58d2a2ee66299b00bbb1fd3a4d9094c0b68
Reviewed-on: https://chromium-review.googlesource.com/c/1394569
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-10 05:31:56 +00:00
Jamie Madill 624ce6a353 Pass GN header visibility check.
Updates angle_util to see the loader includes even if the loader is not
enabled. This makes the GN check happy.

Bug: angleproject:3052
Change-Id: Ifd23070385beefede4358c7b4c1823dc87b5ded8
Reviewed-on: https://chromium-review.googlesource.com/c/1395809
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-05 01:06:14 +00:00
Nico Weber 9db8df4c3e Slightly simplify .def file use.
From `gn help sources`:

  As a special case, a file ending in ".def" will be treated as a Windows
  module definition file. It will be appended to the link line with a
  preceding "/DEF:" string.

This makes the code slightly shorter, and also gives ninja a chance of
re-running the link when the .def file changes since it now knows about
this file.

No intended behavior change.

Change-Id: I5fecb22752508880b726482f7c3da5a75180e446
Reviewed-on: https://chromium-review.googlesource.com/c/1396499
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2019-01-04 21:09:33 +00:00
Jamie Madill 1f56ed2a9b Add WGLWindow and WGL test configs.
WGLWindow lets us use a Windows driver's bindings instead of ANGLE.
This only works if the underlying driver supports OpenGL ES
compatibility.

Also adds the WGL headers, WGL XML, and a specialized WGL loader.

Because of a small driver issue with NVIDIA I added a retry for the WGL
Window initialization.

Bug: angleproject:2995
Change-Id: Ie5148ece470dd03df33015f4919ad1fa79a859ec
Reviewed-on: https://chromium-review.googlesource.com/c/1366021
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-03 21:35:24 +00:00
Jamie Madill ba319ba31c Re-land "Load entry points dynamically in tests and samples."
Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL
headers.

This CL adds a dynamic loader generator based on XML files. It also
refactors the entry point generation script to move the XML parsing
into a helper class.

Additionally this includes a new GLES 1.0 base header. The new
header allows for function pointer types and hiding prototypes.

All tests and samples now load ANGLE dynamically. In the future this
will be extended to load entry points from the driver directly when
possible. This will allow us to perform more accurate A/B testing.

The new build configuration leads to some tests having more warnings
applied. The CL includes fixes for the new warnings.

Bug: angleproject:2995
Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57
Reviewed-on: https://chromium-review.googlesource.com/c/1392382
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-01 18:56:45 +00:00
Yuly Novikov 9f088621eb Revert "Load entry points dynamically in tests and samples."
This reverts commit 03923558a7.

Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624

Original change's description:
> Load entry points dynamically in tests and samples.
> 
> This CL adds a dynamic loader generator based on XML files. It also
> refactors the entry point generation script to move the XML parsing
> into a helper class.
> 
> Additionally this includes a new GLES 1.0 base header. The new
> header allows for function pointer types and hiding prototypes.
> 
> All tests and samples now load ANGLE dynamically. In the future this
> will be extended to load entry points from the driver directly when
> possible. This will allow us to perform more accurate A/B testing.
> 
> The new build configuration leads to some tests having more warnings
> applied. The CL includes fixes for the new warnings.
> 
> Bug: angleproject:2995
> Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
> Reviewed-on: https://chromium-review.googlesource.com/c/1359516
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org

Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2995
Reviewed-on: https://chromium-review.googlesource.com/c/1392381
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-29 20:46:23 +00:00
Jamie Madill 03923558a7 Load entry points dynamically in tests and samples.
This CL adds a dynamic loader generator based on XML files. It also
refactors the entry point generation script to move the XML parsing
into a helper class.

Additionally this includes a new GLES 1.0 base header. The new
header allows for function pointer types and hiding prototypes.

All tests and samples now load ANGLE dynamically. In the future this
will be extended to load entry points from the driver directly when
possible. This will allow us to perform more accurate A/B testing.

The new build configuration leads to some tests having more warnings
applied. The CL includes fixes for the new warnings.

Bug: angleproject:2995
Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
Reviewed-on: https://chromium-review.googlesource.com/c/1359516
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2018-12-29 16:24:36 +00:00
Courtney Goeltzenleuchter 92b16ea262 Re-land: Compress symbols for libraries
Reintroduce commit ffda3e2985.

Android requires system libraries to include symbols to aid
debugging. This CL will compress and attach the symbols from the
unstripped .so and add it to the stripped .so that goes in the apk
when building a release build.

Fix https://crbug.com/916751 introduced by Compress symbol
support CL ffda3e2985.

Bug: angleproject:2981
Change-Id: I8d3ef8e9f0ed44bdd24290f6cd56ba674b79f98c
Reviewed-on: https://chromium-review.googlesource.com/c/1387344
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2018-12-20 20:29:53 +00:00
CJ DiMeglio 96c11cc794 Revert "Compress symbols for libraries"
This reverts commit ffda3e2985.

Reason for revert: https://crbug.com/916751

Original change's description:
> Compress symbols for libraries
> 
> Android requires system libraries to include symbols to aid
> debugging. This CL will compress and attach the symbols from the
> unstripped .so and add it to the stripped .so that goes in the apk
> when building a release build.
> 
> Bug: angleproject:2981
> Change-Id: I51c315627b9183e49b509c27df506bf99bf45f30
> Reviewed-on: https://chromium-review.googlesource.com/c/1376270
> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>

TBR=ynovikov@chromium.org,jmadill@chromium.org,courtneygo@google.com

Change-Id: Ifda891fc5257aa9c9b522bf5a20fda10142e82ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2981
Reviewed-on: https://chromium-review.googlesource.com/c/1385347
Reviewed-by: CJ DiMeglio <lethalantidote@chromium.org>
Commit-Queue: CJ DiMeglio <lethalantidote@chromium.org>
2018-12-19 23:04:28 +00:00
Courtney Goeltzenleuchter ffda3e2985 Compress symbols for libraries
Android requires system libraries to include symbols to aid
debugging. This CL will compress and attach the symbols from the
unstripped .so and add it to the stripped .so that goes in the apk
when building a release build.

Bug: angleproject:2981
Change-Id: I51c315627b9183e49b509c27df506bf99bf45f30
Reviewed-on: https://chromium-review.googlesource.com/c/1376270
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-12-19 18:07:08 +00:00
Jamie Madill 4638dc9def Re-land "Load correct libGLESv2 on Linux and Mac."
Re-land fixes build to ensure commit_id is built before libEGL.

libEGL was implicitly loading libGLESv2 on startup. This is bad
because on platforms like Linux and Mac we could sometimes use the
incorrect rpath. This in turn meant we needed workarounds like using
"_angle" extensions to our shared objects to get the correct loading
behaviour.

Fix this by loading libGLESv2 dynamically in libEGL. We build the
loader automatically from egl.xml. The loader itself is lazily
initialized on every EGL entry point call. This is necessary because
on Linux, etc, there is no equivalent to Windows' DLLMain.

We also use an EGL.h with different generation options so we have the
proper function pointer types. A README is included for instructions
on how to regenerate EGL.h.

The entry point generation script is refactored into a helper class
that is used in the loader generator. Also adds the libGLESv2 versions
of the EGL entry points in the DEF file on Windows. This allows them to
be imported properly in 32-bit configurations.

Also fixes up some errors in ANGLE's entry point definitions. Also
includes a clang-format disable rule for the Khronos headers.

This CL will help us to run ANGLE tests against native drivers.

Bug: angleproject:2871
Bug: chromium:915731
Change-Id: I4192a938d1f4117cea1bf1399c98bda7ac25ddab
Reviewed-on: https://chromium-review.googlesource.com/c/1380511
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-18 18:54:44 +00:00
Jamie Madill 720ca44976 Pass GN header visibility check.
This fixes a few things:

* removes includes that weren't supposed to be present
* scopes some compiler code into white_box_perftests
* makes version.h/commit and angle_common id more visible
* roll zlib to a version that passes check

This should help prevent build problems from popping up in the
downstream Chromium build. We could also potentially look at
including gn check in our CQ recipe.

Bug: chromium:915429
Change-Id: I350f543e16de13c84eb2c43260f4966d47185114
Reviewed-on: https://chromium-review.googlesource.com/c/1380771
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-18 15:25:40 +00:00
Yuly Novikov 175d918a1f Revert "Load correct libGLESv2 on Linux and Mac."
This reverts commit dd815b623e.

Reason for revert: Broke https://luci-milo.appspot.com/p/chromium/builders/luci.chromium.ci/win-rel/8006

Original change's description:
> Load correct libGLESv2 on Linux and Mac.
> 
> libEGL was implicitly loading libGLESv2 on startup. This is bad
> because on platforms like Linux and Mac we could sometimes use the
> incorrect rpath. This in turn meant we needed workarounds like using
> "_angle" extensions to our shared objects to get the correct loading
> behaviour.
> 
> Fix this by loading libGLESv2 dynamically in libEGL. We build the
> loader automatically from egl.xml. The loader itself is lazily
> initialized on every EGL entry point call. This is necessary because
> on Linux, etc, there is no equivalent to Windows' DLLMain.
> 
> We also use an EGL.h with different generation options so we have the
> proper function pointer types. A README is included for instructions
> on how to regenerate EGL.h.
> 
> The entry point generation script is refactored into a helper class
> that is used in the loader generator. Also adds the libGLESv2 versions
> of the EGL entry points in the DEF file on Windows. This allows them to
> be imported properly in 32-bit configurations.
> 
> Also fixes up some errors in ANGLE's entry point definitions. Also
> includes a clang-format disable rule for the Khronos headers.
> 
> This CL will help us to run ANGLE tests against native drivers.
> 
> Bug: angleproject:2871
> Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572
> Reviewed-on: https://chromium-review.googlesource.com/c/1370725
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org

Change-Id: I921b3c45435ab4f05cbc2d1c1172b4185d6257b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2871
Reviewed-on: https://chromium-review.googlesource.com/c/1378887
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-16 19:53:36 +00:00
Jamie Madill dd815b623e Load correct libGLESv2 on Linux and Mac.
libEGL was implicitly loading libGLESv2 on startup. This is bad
because on platforms like Linux and Mac we could sometimes use the
incorrect rpath. This in turn meant we needed workarounds like using
"_angle" extensions to our shared objects to get the correct loading
behaviour.

Fix this by loading libGLESv2 dynamically in libEGL. We build the
loader automatically from egl.xml. The loader itself is lazily
initialized on every EGL entry point call. This is necessary because
on Linux, etc, there is no equivalent to Windows' DLLMain.

We also use an EGL.h with different generation options so we have the
proper function pointer types. A README is included for instructions
on how to regenerate EGL.h.

The entry point generation script is refactored into a helper class
that is used in the loader generator. Also adds the libGLESv2 versions
of the EGL entry points in the DEF file on Windows. This allows them to
be imported properly in 32-bit configurations.

Also fixes up some errors in ANGLE's entry point definitions. Also
includes a clang-format disable rule for the Khronos headers.

This CL will help us to run ANGLE tests against native drivers.

Bug: angleproject:2871
Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572
Reviewed-on: https://chromium-review.googlesource.com/c/1370725
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-12-16 14:04:28 +00:00
Tim Van Patten fdccaa3acb Enhance ANGLE for Android Developer Options
Update ANGLE Developer Options

Update ANGLE developer options to allow selecting the OpenGL driver
(default, ANGLE, native) for each app as well as forcing ANGLE for all
apps.

Bug: angleproject:2962
Test: Verify the default/ANGLE/native values are saved and applied and
used by the loader.

Change-Id: I6737b11bc061318cf8438c8161593ca70239590f
Reviewed-on: https://chromium-review.googlesource.com/c/1354101
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
2018-12-05 21:38:05 +00:00
Cody Northrop 8e6364434a Generate multiple Android APKs
This change moves the generation of Android APKs into a template
function so it can be called multiple times with different parameters.
The two packages generated only differ by package name and APK name,
but this lays the framework for easy future changes.

Bug: angleproject:3004
Change-Id: I6c27d379bfa5f5c2912bf04cb748983787e385ac
Reviewed-on: https://chromium-review.googlesource.com/c/1361381
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
2018-12-04 19:41:22 +00:00
Jamie Madill c10a023a66 Fix fuchsia build of libfeature_support.
This enables the linux path for GetSystemInfo on fuchsia. Tested
locally and fixes the build.

Bug: angleproject:2996
Change-Id: Icc8f282a66ff43ae9c74545a9dcee2d4af8a21e0
Reviewed-on: https://chromium-review.googlesource.com/c/1358632
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-03 17:22:26 +00:00
Tom Tan 5c317537a9 Don't copy d3dcompiler_47.dll when build target is Windows ARM64
Windows ARM64 was first released at 10.0.16299 which contains d3dcompiler_47.dll under %systemroot%\system32, so no need to copy it from Windows SDK. For the same reason, it is also not included as part of redistribute package for Windows ARM64.

Bug: chromium:893460

Change-Id: I175ce831d800ec1f19c767fc172219f6b693fec3
Reviewed-on: https://chromium-review.googlesource.com/c/1357155
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-12-03 14:35:47 +00:00
Ian Elliott a9d579e810 Version-2 API of the A4A opt-in/out (a.k.a. feature-support utilities)
This version-2 API splits up and renames parts of the version-1 API.

Some initial unit tests were added.

The code is now built and tested on Linux, Windows, and Mac (in
addition to Android, which is where it's being used).

Memory leaks were fixed and some memory/list-management TODOs were
also dealt with (associated with an Android bug).

Some review items deferred.  See: angleproject:2993

Bug: angleproject:2794
Bug: b/113346561
Change-Id: Iff307f9347fb05a733fe96b6774fb32d36e25590
Reviewed-on: https://chromium-review.googlesource.com/c/1291837
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2018-11-30 18:20:32 +00:00
Cody Northrop 2c0e06d94b Add temporary icon for ANGLE apk
Even though we don't plan to be launchable, we need to include an
icon for plumbing reasons.  For now I'm using a temporary
icon pulled from our Cubey sample.  When we get something official
we can easily swap it in, and enhance it support multiple dpis.

Bug: angleproject:2991
Change-Id: I2873d74586543c617cfc13fe6582b0b4967cbb22
Reviewed-on: https://chromium-review.googlesource.com/c/1355505
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2018-11-29 19:24:04 +00:00
Yuly Novikov b29fccfe2a Rearrange Android lib deps
Vulkan backend was missing dependency on NativeWindow.

Bug: angleproject:2314

Change-Id: I66675af6f885b57bdb0524a0626dfec0256a21d3
Reviewed-on: https://chromium-review.googlesource.com/c/1354100
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-11-28 17:59:43 +00:00
Tim Van Patten c4e0a1e511 Revert "Enhance ANGLE for Android Developer Options"
This reverts commit fdbdb2b247.

Reason for revert:
I didn't mean to land this quite yet, since we are still working on the Android side of things.   It seems doing CQ+2 merges it while I was trying for just a dry run while replying to Jamie's comments with updates (after checking with Boulder folks, I want CQ+1 next time).

Once the Android changes are ready, I'll work on getting this landed again.

Original change's description:
> Enhance ANGLE for Android Developer Options
> 
> Update ANGLE Developer Options
> 
> Update ANGLE developer options to allow selecting the OpenGL driver
> (default, ANGLE, native) for each app as well as forcing ANGLE for all
> apps.
> 
> Bug: angleproject:2962
> Test: Verify the default/ANGLE/native values are saved and applied and
> used by the loader.
> 
> Change-Id: I6041e7e49ca5cc65f90fc8ae6f1b084e4639d769
> Reviewed-on: https://chromium-review.googlesource.com/c/1330315
> Commit-Queue: Tim Van Patten <timvp@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org,cnorthrop@google.com,tobine@google.com,courtneygo@google.com,ianelliott@google.com,timvp@google.com

Change-Id: If3a4e917973c56b858244a0ca7f1b164143524f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2962
Reviewed-on: https://chromium-review.googlesource.com/c/1354099
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
2018-11-28 16:08:19 +00:00
Tim Van Patten fdbdb2b247 Enhance ANGLE for Android Developer Options
Update ANGLE Developer Options

Update ANGLE developer options to allow selecting the OpenGL driver
(default, ANGLE, native) for each app as well as forcing ANGLE for all
apps.

Bug: angleproject:2962
Test: Verify the default/ANGLE/native values are saved and applied and
used by the loader.

Change-Id: I6041e7e49ca5cc65f90fc8ae6f1b084e4639d769
Reviewed-on: https://chromium-review.googlesource.com/c/1330315
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-11-27 22:59:12 +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 <tobine@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-11-26 15:45:45 +00:00
Brandon Jones b77884b78b Autogenerate Repeated Portions of Blit11
Introduces a script to generate Blit11's
BlitShaderType enum and shader mapping functions.

Bug: angleproject:2870
Change-Id: I5b704f55bdde1706614a519ecb0ee3756f7799e0
Reviewed-on: https://chromium-review.googlesource.com/c/1273725
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2018-11-15 19:10:21 +00:00
Shahbaz Youssefi 749589f8b3 Vulkan: Remaining disjoint timer query functions
The following features where missing in c2b576d9e:

- glGetIntegerv with GL_GPU_DISJOINT_EXT: this is currently impossible
  to query in Vulkan, so 0 is always returned.
- glGetIntegerv with GL_TIMESTAMP_EXT: this is a way to query GPU
  timestamp without performing flushes or waiting for the GPU to finish.
  There is no direct correspondance in Vulkan; it's implemented by
  making a small submission, with no dependency to other submissions, in
  which there is only a timestamp query.

Bug: angleproject:2885
Change-Id: I2341bd610db9084c26b6421c6f8949950ffa4de8
Reviewed-on: https://chromium-review.googlesource.com/c/1299873
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-10-29 20:30:09 +00:00
Shahbaz Youssefi 25224e786f Vulkan: add GPU trace events
RendererVk now tries, as best as it can, to match the CPU and GPU timers
on init as well as every finish().  A clock-sync event is generated for
each such synchronization point.

RendererVk::traceGpuEvent() is a new function that, given a command
buffer, performs timestamp queries corresponding to GPU events.  These
queries are read back when done, without incurring GPU bubbles, at which
point an event is generated with that timestamp.

Bug: angleproject:2908
Change-Id: I08d7d11ff9f8ad6c9f9a9899767c9cd746d0623e
Reviewed-on: https://chromium-review.googlesource.com/c/1296954
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-10-29 15:28:41 +00:00
Jamie Madill 20dc1c9bae Vulkan: Make layers not depend on libvulkan.
On Android the layers were adding a dependency on libvulkan. This
isn't necessary. We can move this dependency up the change to
libANGLE.

Bug: angleproject:2935
Change-Id: I63460c05ca99c5afb6e863af9d6142576aa910b9
Reviewed-on: https://chromium-review.googlesource.com/c/1301721
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-10-26 18:39:51 +00:00
Ian Elliott e4c64c3dc8 Implement new API/interface for the ANGLE feature-support utility.
The original API is designated as version 0.  The new API is
designated as version 1.  A new function is provided for determing the
version of the API that can be used.

Bug: angleproject:2794
Change-Id: I8205b462522cbc34d31643ea14815e187497abed
Reviewed-on: https://chromium-review.googlesource.com/c/1278836
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2018-10-18 22:44:33 +00:00
Courtney Goeltzenleuchter 7d81ae7177 Put feature utility into it's own library
To minimize system impact, have feature configuration utility
live in it's own library.

Bug=angleproject:2418

Change-Id: Ic8e3862965e515ded7e1a6078a7b9f8b92878818
Reviewed-on: https://chromium-review.googlesource.com/c/1269822
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2018-10-09 19:52:11 +00:00
Courtney Goeltzenleuchter e7ece9e22c Do not include ALOGV in release builds
To match behavior of ALOGV in Android system code, disable output
in release builds.

Bug=angleproject:2418

Change-Id: I657ec366249f9d5defe9b05fe298099c47389580
Reviewed-on: https://chromium-review.googlesource.com/c/1269819
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2018-10-09 15:06:27 +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 <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2018-10-01 15:52:41 +00:00
Eric Stevenson c84510f4a3 Angle: Remove obsolete requires_sdk_api_level_23 from BUILD.gn.
Will be removed upstream.

BUG=chromium:688465
Change-Id: If50ac3624a5f692755797eaabcc0c7d6e7408655
Reviewed-on: https://chromium-review.googlesource.com/1244079
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Commit-Queue: Yuly Novikov <ynovikov@google.com>
2018-09-26 15:01:32 +00:00
Courtney Goeltzenleuchter 801719235b Add rules file for ANGLE apk
Provide rules as an asset to the ANGLE apk.
Rules determine the conditions when ANGLE will be used by
Android applications.

Bug=angleproject:2418

Change-Id: I3b8f0c51dc12e039e8c67acbace249abd15ae961
Reviewed-on: https://chromium-review.googlesource.com/1211764
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
2018-09-06 23:17:27 +00:00
Ian Elliott 4d42ef3965 Add A4A opt-in/out logic
This version of the code #ifdef's out the JSON-parsing code (which
dependency was not yet found).  Instead, 2 in-code rules are created
and used (default and run Maps).

Bug: angleproject:2794
Change-Id: I9d8c00459d5e674035f4073ccb839fac8d4d7aa5
Reviewed-on: https://chromium-review.googlesource.com/1200375
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-09-06 18:15:07 +00:00
Ian Elliott abcb2b3b36 Add stubs for A4A opt-in library.
Bug: angleproject:2794
Change-Id: I9ba8abf5fdac4a1bae24bc78ece62337d24e903b
Reviewed-on: https://chromium-review.googlesource.com/1196043
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-08-31 17:17:14 +00:00
Geoff Lang b02fc662fa Lock around all EGL and GL calls with a global mutex.
BUG=angleproject:2464

Change-Id: I0231cc84777272f9cf26298c6a137f1ad3fd51d6
Reviewed-on: https://chromium-review.googlesource.com/1183441
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2018-08-31 16:11:58 +00:00
Frank Henigman 44b2c0b1d3 Avoid rebase_path() in BUILD.gn.
Adjust source paths so we don't need to use rebase_path() on all of them.

BUG=angleproject:1569

Change-Id: I687dbb9378b1f054eb5664320c662fe4c882a82f
Reviewed-on: https://chromium-review.googlesource.com/1194619
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-08-30 18:45:22 +00:00
Frank Henigman ddc41208c1 Rename .gypi -> .gni.
Rename and reformat all gyp files.  They were previously converted to
gn but not renamed to preserve continuity in git.  This rename completes
the removal of all traces of gyp.

BUG=angleproject:1569

Change-Id: I50123105d8881583184ffc564bed65d9fbe4d41c
Reviewed-on: https://chromium-review.googlesource.com/1187885
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-08-29 21:00:11 +00:00
Frank Henigman a7f97a27eb Gyp is dead. Long live gn.
Remove the gyp build.  The .gypi files were not renamed so that diff and
rebase would work on this change.  They will be renamed in a separate
change.

BUG=angleproject:1569

Change-Id: If8a217027633293664b820104f91a4ca5889b24e
Reviewed-on: https://chromium-review.googlesource.com/1187380
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-08-29 19:26:38 +00:00
Takuto Ikuta c93eeaab15 Make angle's commit.h depend on git head
This is for reproducible build of angle related libraries.

Bug: 828669
Change-Id: I807c8fb01b976f6e7a71477ee934b9e0b0cdc684
Reviewed-on: https://chromium-review.googlesource.com/1164814
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-08-07 22:59:34 +00:00
Courtney Goeltzenleuchter 8c1508bc0b Update name of ANGLE Android apk to match expectations
Android build system wants to see pre-built components
like this with naming that indicates what it is.

Bug: angleproject:2702
Change-Id: I84acee78a6ceef5b04c87436c68d41510f6e66c7
Reviewed-on: https://chromium-review.googlesource.com/1155004
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-07-31 16:41:06 +00:00
Ian Elliott d07c52e280 Initial Android implementation of GetSystemInfo
Change-Id: Ia44413aa94906b89d4981063600cd3de0edacee8
Reviewed-on: https://chromium-review.googlesource.com/1108454
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-06-26 16:14:14 +00:00
Yuly Novikov cd70aa422c Always depend on libandroid for angle_util.
libnativewindow doesn't have all the functions angle_util requires,
namely: AConfiguration_*, AInputEvent_*, AInputQueue_*, ALooper_*.
It should be safe to always use libandroid, since angle_util is only
used by tests, thus it won't interfere with AngleLibraries.apk

Bug: angleproject:2418
Change-Id: I8343924629205bfb5d65dafe34db8e2baa987bae
Reviewed-on: https://chromium-review.googlesource.com/1108747
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-06-20 22:22:41 +00:00
Tobin Ehlis b971f499b5 Migrating ANGLE to split LVL repos
Separated the Vulkan Validation Layers, Loader, Tools and Headers into
separate dirs to map to the new separate repo structure.

Bug: angleproject:2558
Change-Id: I422038f7dd7efe8c5b7a49dc5074de5caf40edfa
Reviewed-on: https://chromium-review.googlesource.com/1071880
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-06-13 18:17:16 +00:00
Tom Anderson a4a3c19a43 Remove manual references to exe_and_shlib_deps
After [1], a manual dependency on exe_and_shlib_deps is no longer necessary
since it's automatically added.  This CL removes all remaining manual references
to exe_and_shlib_deps.

[1] d7ed1f0a9c

BUG=chromium:845700

Change-Id: I66bcead6586050bf952c4aa1f4d3f726c88d2277
Reviewed-on: https://chromium-review.googlesource.com/1091231
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2018-06-08 17:28:35 +00:00
Courtney Goeltzenleuchter b001528ffa Use libnativewindow for Android builds
To avoid references to libEGL.so do not link with libandroid,
use libnativewindow instead. libnativewindow is available in
android-26 and newer.
The appropriate library will be selected based on the ndk level
configured. If ndk revision is 26 or higher, we'll link to
libnativewindow otherwise use libandroid.
The ANGLE apk needs to use 26 or higher.

Bug: angleproject:2418
Change-Id: I96509e5d645d132a34734558cd0566f1812b615b
Reviewed-on: https://chromium-review.googlesource.com/1066821
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-05-23 20:27:18 +00:00
Courtney Goeltzenleuchter 4607148c6b Add build-id for all builds to help debugging
Android Studio debugger needs the build-id to be able to
match up symbols with stripped libraries.

Bug: angleproject:2566
Change-Id: Ied6afd09c9ec0d379a16b4a08b56b827af11ca0d
Reviewed-on: https://chromium-review.googlesource.com/1064554
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-05-17 20:58:22 +00:00
Courtney Goeltzenleuchter 96d292d0fb Format cleanup
Bug: angleproject:2339
Bug: angleproject:2455
Change-Id: I12dfd1e95f18a4277f409d694000e0e775c8bffb
Reviewed-on: https://chromium-review.googlesource.com/1064814
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-05-17 20:48:22 +00:00
Jamie Madill 74a763205a Fix libGLESv2 wrong .def file.
The GN was including both libGLESv2.def and _autogen. This fixes the
GN to only include _autogen, and removes the .def include from the
static build target.

Bug: angleproject:2476
Change-Id: I2e856e3bbe875bdadd1add4517cef60a11227047
Reviewed-on: https://chromium-review.googlesource.com/1057451
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Brandon1 Jones <brandon1.jones@intel.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-05-14 15:49:28 +00:00
Olli Etuaho 8073a9511a Enable warning for non-virtual destructors
Virtual functions are removed from TSymbol, so the warning for
non-virtual destructor found in a class with virtual functions can be
enabled.

BUG=angleproject:2417
TEST=angle_unittests

Change-Id: Icd0ea2c77ce826739fbe954137f8ee78e6ef5386
Reviewed-on: https://chromium-review.googlesource.com/1051830
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2018-05-11 06:47:28 +00:00
Jamie Madill d47044ad53 Vulkan: Add framework for internal shaders.
Vulkan intenal shaders are stored in a ShaderLibrary, and this is
owned by the RendererVk. This way the shaders are reused between all
the different Contexts. They are initialized lazily to keep init time
low. They also have an associated Serial (called a ProgramSerial) so
they can be identified in a PipelineDesc (used by the Pipeline cache).

We use a python script to build and invoke the glslang validator, that
also produces SPIR-V binary code snippets. These snippets are gathered
into an auto-generated file that is exposed via an auto-generated
header file. The InternalShaderID enum class gives access to the
internal shaders that are shared through the Vulkan back-end.

This also adds simple clear shaders to be used in masked color clears.
The patch doesn't add any functionality but it is split off from the
color clear functionality to keep the code size down.

Bug: angleproject:2339
Bug: angleproject:2455
Change-Id: Ie83043eda217c9f013817b198c92a3b7ba0878b4
Reviewed-on: https://chromium-review.googlesource.com/1031372
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-05-01 20:39:47 +00:00
Courtney Goeltzenleuchter ddd772455c Add GLESv1_CM to angle library apk
Bug: angleproject:2418

Change-Id: I793d330a2cc92a510b189fa23d14f41f48a7d986
Reviewed-on: https://chromium-review.googlesource.com/1035422
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2018-04-30 18:37:00 +00:00
Courtney Goeltzenleuchter e5db628b75 Cleanup for "Add angle library apk"
Forgot to format BUILD.gn in CL 46978bccd3659
Remove unnecessary android:debuggable setting
Bug: angleproject:2520

Change-Id: I31457c82536827f78e3aa17c02dd8e878f803f04
Reviewed-on: https://chromium-review.googlesource.com/1030259
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-04-26 18:40:36 +00:00
Courtney Goeltzenleuchter 2565d48b47 Add angle library apk
Package up libraries into Android APK.
Libraries must be uncompressed for them to be mmapped properly.
Bug: angleproject:2418

Change-Id: I27817d7a6c5dcd93ca7790c55042c6548f84906f
Reviewed-on: https://chromium-review.googlesource.com/1013057
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-04-25 01:04:02 +00:00
Courtney Goeltzenleuchter ec10096dba Vulkan: Add build toggle for validation layers.
We want to be able to build without validation layers to
make it easier to use in other environments (e.g. Android)
When angle_enable_vulkan is true and
angle_enable_vulkan_validation_layers is true, build the
Vulkan validation layers.

Bug: angleproject:2489

Change-Id: I266ad8f757c5992021f249217f2be58f0148fcbf
Reviewed-on: https://chromium-review.googlesource.com/1005558
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-04-18 17:09:12 +00:00
Jamie Madill eb79e337c9 Vulkan: Do not build mock ICD on Android.
This is causing a GN build error on our Android bots.

Bug: angleproject:2471
Bug: angleproject:2482
Change-Id: I35ffc7972effb9c9ea26ab96cf23985eba1702c3
Reviewed-on: https://chromium-review.googlesource.com/1016700
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-04-18 12:40:41 +00:00
Jamie Madill 08b9e046c1 Vulkan: Disable warning in Mock ICD.
We were missing a "no chromium code" config in the mock ICD.
This was causing a build error, but the build error was mostly
invisible because the mock ICD wasn't being built by default.

Fix this by including it in the angle_vulkan target.

Bug: angleproject:2482
Change-Id: I417d3fbf6a4acd93c06bab61967409730c2ea4ed
Reviewed-on: https://chromium-review.googlesource.com/1012497
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-04-17 00:57:31 +00:00
Courtney Goeltzenleuchter 152152618e Enable unneeded-internal-declaration compiler warning
No longer have issues with unneeded internal declarations
now that Tokenizer.cpp has been updated so re-enable
compiler warning to catch future issues.
BUG:angleproject:2451
Test: build

Change-Id: I30daadc8c7374bcae753a7e69cb9a72855a1f548
Reviewed-on: https://chromium-review.googlesource.com/1007965
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-04-13 21:16:52 +00:00
Yuly Novikov ad4f9642a6 Allow ANGLE libs to have arbitrary suffix.
In order to work with tools which intercept EGL and GLES calls.

BUG=angleproject:2343

Change-Id: I63aec7a56648dc4b3e7f4aff7f7d1608709ba118
Reviewed-on: https://chromium-review.googlesource.com/920652
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2018-03-23 22:09:24 +00:00
Yuly Novikov 40a945f293 Rename vulkan_loader to libvulkan
Also add a build argument to build it as a shared library.

BUG=angleproject:2343

Change-Id: Ia590632b94d71b10d3ee64974fa4f5b4f00c3a70
Reviewed-on: https://chromium-review.googlesource.com/954403
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-03-20 23:18:43 +00:00
Jamie Madill 8d986bf241 Fix missing include files visible to GN.
This should also fix the VS project generation. Thanks to Jeff Gilbert
from Mozilla for sharing a list of missing files.

Bug: angleproject:2360
Change-Id: Ideab28a0169cd7aabb6a7bd3aac3a5832443f023
Reviewed-on: https://chromium-review.googlesource.com/922874
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-02-21 14:20:38 +00:00
Jamie Madill d7ebfb92ba Add missing is_fuchsia to system_utils selection.
This fixes a build break because of 046fa0efc4.
See: https://crrev.com/c/898591

Bug: angleproject:2333
Change-Id: I6a4cb60dd2d2958ea71aaa27f1429233c2787fb4
Reviewed-on: https://chromium-review.googlesource.com/922878
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-02-16 00:31:11 +00:00
Nico Weber b5db2b497b Enable -Wimplicit-fallthrough for ANGLE.
Also teach MSVC that ANGLE_CRASH() can't return.

Also fix instances of the warning in build configurations where
UNREACHABLE() can return (e.g. release without dcheck_always_on
or debug).

If the UNREACHABLE()s are truly unreachable, this change has
no behavior change.

Bug:  chromium:810767

Change-Id: I68f3587cf3e268c3ef634dce7ae3d70399859d0f
Reviewed-on: https://chromium-review.googlesource.com/914842
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2018-02-15 18:54:20 +00:00
Lingfeng Yang 4edce33698 GLES1: macOS: Add rpath to libGLESv1_CM.dylib
This is to fix error messages when running GLES1 samples (and probably
other apps) from different directories than the same one as where
libGLESv1_CM.dylib is located.

BUG=angleproject:2306

Change-Id: I24ab33eb1bc805c1e64efab9a0acbfcf10480d94
Reviewed-on: https://chromium-review.googlesource.com/920926
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
2018-02-15 15:11:05 +00:00
Yuly Novikov bac02d76e9 Vulkan: Fix data_deps on layers
Was broken by https://chromium-review.googlesource.com/900096

BUG=angleproject:2339

Change-Id: I3c28a38619d83e7dcbb2349565517feb1758976c
Reviewed-on: https://chromium-review.googlesource.com/907959
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-02-08 17:04:13 +00:00
Jamie Madill a1134ba865 Vulkan: Relocate third-party libraries. (2/2)
This makes the BUILD.gn source lists a lot simpler, since they no
longer need to use a special path variable, but instead can use the
correct relative paths.

This will lead to further simplifications so we can hopefully upstream
the Vulkan tools BUILD.gn files.

Second part updates the build files and removes the old repositories.

Bug: angleproject:2339
Change-Id: I37f5b42a0854ca49448ecbbb32c19c24df57f452
Reviewed-on: https://chromium-review.googlesource.com/905894
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-02-07 21:33:33 +00:00
Jamie Madill b62a1c2ac8 Vulkan: Reorganize BUILD.gn files.
This moves the SPIRV-Tools and glslang and Validation layers build
files into the root of the dep folder.

Requires an upstream Chrome change to allow for a different path
to execute scrips in GN.

Also removes the vulkan_support subdirectory.

Bug: angleproject:2339
Change-Id: I457b5b05547c092a1e7fef6dd0aaadd8068e2143
Reviewed-on: https://chromium-review.googlesource.com/900096
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-02-06 21:47:01 +00:00
Nico Weber 79de62c665 Explicitly suppress -Wimplicit-fallthrough for angle and its deps.
No behavior change since that warning isn't enabled anywhere yet, and
it's opt-in.  This is a prerequisite for
https://chromium-review.googlesource.com/c/chromium/src/+/895726

Bug: chromium:177475

Change-Id: Ie5ffccd240a65646fe07e7d4475f63c4e8620746
Reviewed-on: https://chromium-review.googlesource.com/895728
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2018-01-31 17:04:02 +00:00
Yuly Novikov 199f42941a Vulkan: Enable on Android
Add Android DisplayVk and WindowSurfaceVk variants.
Build Vulkan backend and validation layers on Android
if toolchain uses required NDK API level.
Fix validation layers discovery to work on Android.

BUG=angleproject:2314
TEST=angle_end2end_tests builds and runs on Nexus 5X, 12 VULKAN tests pass

Change-Id: Iac2ec4ecd6470a7552f9f60c023ba1760aa090c5
Reviewed-on: https://chromium-review.googlesource.com/887797
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-01-30 22:10:20 +00:00
Jamie Madill 5dd4ad896b Vulkan: Add a perf test for the Pipeline cache.
This micro-benchmark can be used to measure the performance impact
of changing the Pipeline cache. For instance, we can check if changing
the size of the hash key affects performance significantly.

Also updates the build files so angle_perftests can see vulkan.h, and
makes the Vulkan headers an explicit source set.

This test currently shows that a lot of time is spent in PMurmurHash,
with some time also spent in memcmp.

Bug: angleproject:2163
Change-Id: Ie8bb3e31d58590f373d28cbbb59f7e372b80cc29
Reviewed-on: https://chromium-review.googlesource.com/884882
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2018-01-29 22:32:40 +00:00
Yuly Novikov e762400446 Fix Android build
After https://chromium-review.googlesource.com/887944
"angle_common" depends on "log" on Android.
Failed to link angle_shader_translator during ANGLE roll.

BUG=angleproject:1660

Change-Id: I9b0730901bdcf9cab64311994d65a577a1358eeb
Reviewed-on: https://chromium-review.googlesource.com/890603
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-01-28 01:56:16 +00:00
Geoff Lang 2aaa7b4e10 Add GLES1 targets and stub entry points.
* Create a new libGLESv1_CM target.
 * Merge all autogenerated extension entry points into one file.
 * Allow creation of ES1 contexts.

BUG=angleproject:2306

Change-Id: I446258363a96a3c37d657089dd7c1cff0fa3cf78
Reviewed-on: https://chromium-review.googlesource.com/865718
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-01-16 19:01:00 +00:00
Frank Henigman e42ec189cc Add angle_link_glx arg to standalone gn build.
Port the angle_link_glx setting of the gyp build to the standalone gn build.
When set to true, libGL will be linked into libANGLE, instead of dlopen-ed.
This is useful when using apitrace.

BUG=angleproject:1569

Change-Id: I16a91504960169efdcde3b2c50b944de148d9ba6
Reviewed-on: https://chromium-review.googlesource.com/821691
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2017-12-15 21:01:57 +00:00
Geoff Lang b944053a0e Add extra warnings for narrowing and bool conversion.
BUG=angleproject:2258

Change-Id: If571820fccca1daba0ea1ac5a204f95b1b3c59f9
Reviewed-on: https://chromium-review.googlesource.com/794093
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2017-11-29 17:22:20 +00:00
Jamie Madill ff7aac5e4f Re-land "Export angle::PlatformMethods."
This should fix undefined function call sanitizer warnings.

Re-land fixes the build and uses proper export annotation. Also fixes
the missing source includes in BUILD.gn for libANGLE so future
changes to Platform.h (and other includes) will get picked up by the
dependency analyzer step.

BUG=chromium:778918

Change-Id: I92cc8a43bbbdc70de50a67f73b223d8f903cd6cd
Reviewed-on: https://chromium-review.googlesource.com/767111
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
2017-11-14 04:34:52 +00:00
Corentin Wallez 163965d5ce BUILD.gn: prepare dEQP test support on Mac
BUG=angleproject:1569

Change-Id: I703f4739726c849950ba103049fa39498a4ff1df
Reviewed-on: https://chromium-review.googlesource.com/744361
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-10-30 21:55:55 +00:00
Corentin Wallez aa9c396b79 Revert "BUILD.gn: prepare dEQP test support on Mac"
This reverts commit 4b8b650c8e.

Reason for revert: causes build failure on the Mac dEQP builder.

Original change's description:
> BUILD.gn: prepare dEQP test support on Mac
> 
> BUG=angleproject:1569
> 
> Change-Id: I77aa55d28b884fa648ff52aedddf3a23fe6e4a8c
> Reviewed-on: https://chromium-review.googlesource.com/713194
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

TBR=fjhenigman@chromium.org,jmadill@chromium.org,cwallez@chromium.org

Change-Id: Idc08cf12294505600890d1c6e43f62c0261631a5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:1569
Reviewed-on: https://chromium-review.googlesource.com/741881
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-10-27 14:55:55 +00:00
Corentin Wallez 4b8b650c8e BUILD.gn: prepare dEQP test support on Mac
BUG=angleproject:1569

Change-Id: I77aa55d28b884fa648ff52aedddf3a23fe6e4a8c
Reviewed-on: https://chromium-review.googlesource.com/713194
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-10-27 04:14:01 +00:00
Yuly Novikov c4f1dd83ff Use angle::BitSetIterator optimizations on arm64 as well
Previously were enabled only on x86_64.
Also change from using target_cpu to current_cpu, as the doc recommends.

BUG=angleproject:1814

Change-Id: Ia7e8e930c76aab5cfb47b75e0ec78902ab313237
Reviewed-on: https://chromium-review.googlesource.com/737438
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2017-10-26 18:48:40 +00:00
Jamie Madill 6d94f064ae Add more complete NULL driver for the GL back-end.
This implements a NULL driver in OpenGL by stubbing out most of the
GL functions in FunctionsGL except a few static "Gets" that are needed
for initialization with Chromium and the tests. It is intended to be
used for performance testing ONLY and will not have correct behaviour.

It also adds a define to enable conditionally excluding the null entry
points for implementations that wish to save on a bit of binary size.

Also fixes some of the typedefs in functionsgl_typesdefs.h that were
turned up after implementing the direct assignment from NULL stub
entry point, generated from gl.xml, to the function pointer with type
defined from functionsgl_typedefs.h.

BUG=angleproject:2188

Change-Id: Ifa1e4739cb471ab6b52a4bf24c16d9eb4b334ac5
Reviewed-on: https://chromium-review.googlesource.com/727530
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-10-22 15:13:56 +00:00
Jonathan Metzman fb9051a588 Switch from use_libfuzzer to using_fuzzing_engine.
The current build configuration causes AFL based fuzzers to be built
with incorrect options.

Bug: 770970
Change-Id: I712dd72a0f680df538e98622032cb13f39ed8c63
Reviewed-on: https://chromium-review.googlesource.com/707933
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-10-20 16:02:26 +00:00
Frank Henigman d0ef13a250 Stand-alone build with gn.
This should do the same things as the stand-alone gyp build, but with gn.
You should switch to gn as gyp support will go away.

You need a recent enough version of gn.  If yours is too old try this one:
  ./buildtools/linux64/gn

If "gclient sync" or anything fails with an ImportError on gyp stuff,
try running it with the following PYTHONPATH in the environment:
  PYTHONPATH=tools/gyp/pylib

BUG=angleproject:1569

Change-Id: I56d19bec2d8b649a7bd65062c656cbfc69ea3dd8
Reviewed-on: https://chromium-review.googlesource.com/642588
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2017-10-18 17:02:13 +00:00
Ben Wagner d736cccf04 Add :extra_warnings to all units in BUILD.gn.
Fix resulting warnings.

Change-Id: Ie251012ee01aa484a8c489f9deeec385a50528f9
Reviewed-on: https://chromium-review.googlesource.com/713695
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-10-12 14:36:57 +00:00
Ben Wagner 211bff3f6c Enable inconsistent-missing-override for Clang
Fix the resulting compile errors.

No-Try: true
Change-Id: I88e74f240b29ecf7b3883b0c5880dcb871e4c3cd
Reviewed-on: https://chromium-review.googlesource.com/710415
Commit-Queue: Ben Wagner <benjaminwagner@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-10-11 13:50:47 +00:00
Yuly Novikov f0be43fee2 Add missing dependency on exe_and_shlib_deps
BUG=chromium:593874, angleproject:2095

Change-Id: I97860f7978d509bb36dfdfb5fac7524e9d24f5fe
Reviewed-on: https://chromium-review.googlesource.com/557599
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2017-06-30 02:39:30 +00:00
Ken Russell fcadd08ad7 Provide build target for angle_shader_translator sample.
This is useful for building the sample within Chromium rather than
in ANGLE's standalone build, which has other requirements like a
full Visual Studio installation.

BUG=angleproject:2095

Change-Id: I785d87ecb5166d8f640a5c8a5f321c3209017cc5
Reviewed-on: https://chromium-review.googlesource.com/553399
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-06-29 15:03:04 +00:00
Jamie Madill 5ea762a660 Consolidate base:: imports.
This merges the mrucache and numerics into one folder, to prevent
having to make two identical versions of logging.

BUG=angleproject:2044

Change-Id: Iba6dab05b21eb9ba0de44f27a90579c590a9a7fd
Reviewed-on: https://chromium-review.googlesource.com/522870
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-06-07 22:56:29 +00:00
Jamie Madill 9216a6e26d Introduce MRUCache.
This library comes from Chromium's base, and is useful for many use
cases in ANGLE. It can replace the custom MRU code we use in the
RenderStateCache. It will also be useful for implementing a program
binary cache.

BUG=angleproject:2044

Change-Id: Iba166fe380d7ed4e3123428b0227b9d299f756d1
Reviewed-on: https://chromium-review.googlesource.com/516384
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2017-05-31 16:02:10 +00:00
Tom Anderson 26098cb2ef Add missing dependencies on exe_and_shlib_deps (angle)
BUG=chromium:723069

Change-Id: I2b3c9be297c2b65955e31f393756ca266cc7c60b
Reviewed-on: https://chromium-review.googlesource.com/514436
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-05-25 18:53:05 +00:00
Jamie Madill e1fd475b09 Apply release asserts config to all dependents.
Our test sets (e.g. angle_perftests) were not having the config
applied.

BUG=angleproject:747

Change-Id: Idd3a2cba214d38a923c1936787f9dec4bd016326
Reviewed-on: https://chromium-review.googlesource.com/487730
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-04-27 15:58:58 +00:00
Frank Henigman 29f148b0ca Support Vulkan on Linux as well as Windows.
Refactor display and surface classes into Win32 and Linux parts and
add Linux parts to gn and gyp builds.

BUG=angleproject:1668

Change-Id: I2a7d29c35f4f42fa0035bd97938d3770f3627672
Reviewed-on: https://chromium-review.googlesource.com/412426
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-04-26 16:54:00 +00:00
Jamie Madill 6de5185898 Optimize angle::BitSetIterator.
Adds a new custom bitset template to handle packing as many bits as
possible into a single variable. Intelligently select the right class
depending on platform features and bit sizes.

For now, always use a packed 64-bit set on 64-bit, instead of using
a 32-bit set for smaller bitsets.

BUG=angleproject:1814

Change-Id: I3ffef815c15515555833f6fc9302d8a4eee5423b
Reviewed-on: https://chromium-review.googlesource.com/471827
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-04-19 21:50:10 +00:00
Corentin Wallez 8f77e5d323 gpu_info_util: Implement GetSystemInfo on Windows
BUG=angleproject:1874

Change-Id: I97a02d2c8b1f7ecb530684464fc02f528d34de7c
Reviewed-on: https://chromium-review.googlesource.com/458965
Reviewed-by: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-03-29 21:35:13 +00:00
Corentin Wallez 16d4e472de BUILD.gn: declare_args() use_lipci
This is the third stage of 05356e35d3
and is necessary for projects putting use_libpci in the gn args, like
headless Chrome.

BUG=angleproject:1874

Change-Id: I03a010ababf08f992f0fb26ff87ddc48afd5a237
Reviewed-on: https://chromium-review.googlesource.com/457277
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-03-20 18:31:46 +00:00
Corentin Wallez 05356e35d3 BUILD.gn: do not redefine use_libpci if already present
We want to move the definition of use_libpci from gpu/config to ANGLE.
To avoid breaking compilation we should do it in three steps:
 - Make ANGLE not redefine use_libpci
 - Remove definition of use_libpci from Chrome
 - Make ANGLE define use_libpci unconditionnaly

This commit is the first step.

BUG=angleproject:1874

Change-Id: I08d0996ca536c51e1617f656171d696f05605725
Reviewed-on: https://chromium-review.googlesource.com/450037
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-03-06 22:58:16 +00:00
Corentin Wallez d83f64f5c8 gpu_info_util: Implement GetSystemInfo on OSX
Also adds a test that prints the gathered information for manual
checking and to help know what the system is when looking at the logs.

BUG=angleproject:1874

Change-Id: Icb0cc390c9808fd8db0f966d667b94dde4b94e62
Reviewed-on: https://chromium-review.googlesource.com/443845
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
2017-02-22 22:50:10 +00:00
Corentin Wallez 878baf9071 gpu_info_util: address comments for CL 438940
BUG=angleproject:1874

Change-Id: I6397d9141a7c25f818ce970212a4a8e8afbd5a27
Reviewed-on: https://chromium-review.googlesource.com/442676
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-02-15 21:02:15 +00:00
Corentin Wallez 7b4e00d20e gpu_info_util: Implement GetSystemInfo on Linux
BUG=angleproject:1874

Change-Id: Id39c26b806e6a7937517235afe0ca60f5087df5b
Reviewed-on: https://chromium-review.googlesource.com/438940
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-02-13 19:47:15 +00:00
Jamie Madill e794cd86d4 Vulkan: Implement new GLSL translator back-end.
The Vulkan GLSL translator back-end will handle validating and
translating our WebGL/ESSL shaders into Vulkan-specific GLSL.

glslang (the Vulkan one) accepts both GLSL and GLSL ES shaders
as inputs, and both the desktop and ESSL back-ends give
incompleteness warnings when used. For now, use the desktop GL
450 as a target for Vulkan GLSL.

The Vulkan-specific changes are currently only to add locations
to every vertex input and fragment output.

BUG=angleproject:1575

Change-Id: I7c3f32f522e9d18e5f8618eb7927336bf4fbdcf2
Reviewed-on: https://chromium-review.googlesource.com/412266
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-01-30 18:53:01 +00:00
Andrew Grieve 949e0700bc Update BUILD.gn to account for Android default linker script change
BUG=681557

Change-Id: I8fb4e50d241e3519b27d57a507d92cc3c15877ef
Reviewed-on: https://chromium-review.googlesource.com/430877
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2017-01-23 23:17:40 +00:00
Jamie Madill dcab56a1b8 Move some file utils to common.
Since common is shared through all ANGLE code (libANGLE/tests/samples)
this is the most general place for these utils, and will give libANGLE
access to them. We'll need them to get the current executable dir for
loading the Vulkan layers.

This also means we'll need to fix the global static variable use when
we have the ability.

BUG=angleproject:1319
BUG=chromium:677841

Change-Id: I7af61920635135b28a2f02f4a8d019ee88c9dd28
Reviewed-on: https://chromium-review.googlesource.com/425440
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-01-05 23:41:59 +00:00
Jamie Madill 80ab03c58d Add angle_white_box_tests for libANGLE render tests.
angle_end2end_tests included tests that used both the entry points
from our shared libraries as well as calling libANGLE classes like
gl::Context directly. Split these into a new test executable.

This also removes the libANGLE code from all the end2end tests.

It's necessary to add static versions of libEGL and libGLESv2 so
that we call safely call methods in libANGLE an the entry points
from the same target.

BUG=angleproject:1660

Change-Id: I6d82021b9300231ddb5fee435e5d77728f8f1292
Reviewed-on: https://chromium-review.googlesource.com/419175
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-01-04 19:24:32 +00:00
Jamie Madill 192745a74e Add varying packing validation for WebGL.
This CL moves the varying packing from the D3D layer up to Program.
This is necessary for WebGL validation, and gives us consistency
for the various back-ends. There may be some additional cleanup work
on the VaryingPacking class, because it does some work that is D3D-
specific.

WebGL requires strict varying packing. Instead of allowing success
unconditionally, it's an explicit error to succeed to pack a set of
varyings that the sample algorithm would fail to pack.

Introduce a new packing mode option to the varying packing class to
handle this different packing style, while keeping our old more
relaxed packing method for ES code.

BUG=angleproject:1675

Change-Id: I674ae685ba573cc2ad7d9dfb7441efa8cb2d55fc
Reviewed-on: https://chromium-review.googlesource.com/423254
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2016-12-23 00:30:50 +00:00
Yuly Novikov a4ab58044a Remove libEGL dependency on libANGLE
libEGL should use libGLESv2 for EGL implementation,
to prevent libANGLE global variables being duplicated.

BUG=angleproject:1660

Change-Id: I84c1e22fcce8f4a21acfb1fcde0c84ebd77204f8
Reviewed-on: https://chromium-review.googlesource.com/422574
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2016-12-22 00:53:39 +00:00
Jamie Madill 327ba857f6 Vulkan: Hook up loader code.
This integrates the build files for the loader SDK, and tests the
compilation by calling InitInstance. There's no current way to
test the runtime behaviour since there's no way for the tests to
initialize the Vulkan back-end, that will come in the next CL.

BUG=angleproject:1319

Change-Id: Ia8bf96ca068eaf40744c9753b59ffaaa5ada8a73
Reviewed-on: https://chromium-review.googlesource.com/367519
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-12-20 16:05:41 +00:00
Jamie Madill 120040e239 D3D: Move some HLSL-specific code to a new folder.
This code doesn't actually call any D3D runtime methods, so it can be
included in our cross platform unit tests. Just include the varying
packing code for now.

BUG=angleproject:1296
BUG=angleproject:1638

Change-Id: I5c0ccccb00e1c13ca98448256be048f7cd0968ce
Reviewed-on: https://chromium-review.googlesource.com/417116
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-12-08 20:49:31 +00:00
Corentin Wallez 64598b53ef Add the ANGLEPlatform entry points to eglGetProcAddress
Reland with a Windows build fix.

We want to move the Chromium initialization of the ANGLE platform from
being Windows-specific to being EGL-specific. Because the mechanisms by
which the ANGLE library is loaded are OS-specific, it is inconvenient to
use dlsym and friends to get the ANGLEPlatform entry points. Instead
we expose the through eglGetProcAddress which is readily available in the
EGL-specific part of Chromium.

BUG=angleproject:1621

Change-Id: I022a39493756a3b5d1ed626fd05e74af3f043211
Reviewed-on: https://chromium-review.googlesource.com/410066
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-11-15 18:04:00 +00:00
Yuly Novikov dfd7fb2ade Cleanup after merging translator_lib into translator
Rename a few references to translator_lib

BUG=angleproject:1596

Change-Id: Ib715fdd8a949dc46a5ef628ea2d7f71b1b771845
Reviewed-on: https://chromium-review.googlesource.com/410287
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2016-11-11 22:32:37 +00:00
Yuly Novikov ea5865497e Cleanup after translator component removal
- Unite translator with translator_lib
- Remove flags and defines for shared library exports

BUG=angleproject:1596

Change-Id: Icd145a4b79e2472766a2b56017bb0f36f244482e
Reviewed-on: https://chromium-review.googlesource.com/410261
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2016-11-11 19:45:51 +00:00
Corentin Wallez 7f07caa961 Rename the build/ directory.
GYP related files went in gypfiles/, and the gni went in gni/ this
changes frees up the build/ directory name for Chromium's build/
directory.

BUG=angleproject:1569

Change-Id: I76fe343d569239c2732ba87986fcf7debc21d417
Reviewed-on: https://chromium-review.googlesource.com/403029
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-11-08 14:48:42 +00:00
Yuly Novikov e653403bae Remove component translator target and keep static_library.
Rename translator_static to translator and use it everywhere.

BUG=angleproject:1596

Change-Id: I36c990d54979d2460b1513a65cca0b82f8d65c80
Reviewed-on: https://chromium-review.googlesource.com/406668
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2016-11-03 17:07:18 +00:00
Geoff Lang d08f3b3df7 Add stubs for a NULL renderer.
BUG=angleproject:1468

Change-Id: I2ed2b65a4b6f6ea3dda61c0467aef95e407cd38c
Reviewed-on: https://chromium-review.googlesource.com/388844
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2016-10-05 18:45:49 +00:00
Corentin Wallez 054f7ed0d6 preprocessor: Miscellaneous cleanups
- Use full header paths in includes
- Use ASSERT instead of assert
- Use angle::NonCopyable instead of PP_DISALLOW_COPY_AND_ASSIGN
- Use range-for in a couple places
- Remove pp_utils.h

BUG=angleproject:1522

Change-Id: If107fef89e8465bca65cf664926d1051c5d1e232
Reviewed-on: https://chromium-review.googlesource.com/387212
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-09-26 19:25:29 +00:00
Jamie Madill 1db8a26b56 Fix warning in standalone in new validation.
BUG=angleproject:1512

Change-Id: Ifdb8d4c38e3c90e03eee42ba9fd6390dffd61363
Reviewed-on: https://chromium-review.googlesource.com/388611
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-09-22 21:11:14 +00:00
Corentin Wallez a5615c69b1 BUILD.gn: Disable pool alloc on all translator dependents when fuzzing
It contains defines that need to be consistent between the header and
the implementation.

BUG=angleproject:1522
BUG=chromium:647807

Change-Id: Ica144c455b7366bd9939a07b171edffe5af8bf35
Reviewed-on: https://chromium-review.googlesource.com/386945
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-09-19 19:55:36 +00:00
Corentin Wallez 30e11ab241 BUILD.gn: make the translator fuzzer a source set
When we want to use GN standalone, the fuzzer_test template won't exist.
Instead make the fuzzer a source set that is used by a target in Chrome.

BUG=angleproject:1522

Change-Id: I347e633448d508eb124d0861b0fb28315923016c
Reviewed-on: https://chromium-review.googlesource.com/386636
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2016-09-16 15:47:10 +00:00
Corentin Wallez 28b6528ca2 Add a fuzzer for the shader translator.
BUG=angleproject:1522

Change-Id: Idbe8194ba478366e99c7460d403d03fe27dd89d0
Reviewed-on: https://chromium-review.googlesource.com/353153
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-09-15 20:03:53 +00:00
Yuly Novikov e3352f94a1 Change angle_util to be a shared library
So that there will be one instance of static thread synchronization variables
in AndroidWindow.
Previously there was one instance in lib_angle_deqp_gles2_tests__library
and one in libangle_deqp_libgles2, resulting in AndroidWindow::initialize
waiting forever.

Also make the change in GYP build to fix standalone build,
and fix rpath issues on Mac.

BUG=angleproject:1471
TEST=end2end and deqp tests on standalone Win10 and end2end on GN Mac 10.11

Change-Id: I731578459400bb47d269df129aabed9b67b555e6
Reviewed-on: https://chromium-review.googlesource.com/376202
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2016-08-30 20:50:59 +00:00
Yuly Novikov 55033e583b Revert "Change angle_util to be a shared library"
This reverts commit 2f9b5e6f79.

Change-Id: I90a7ba0596e79795c9549bc268eabff69c96d572
Reviewed-on: https://chromium-review.googlesource.com/376079
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2016-08-25 18:12:11 +00:00
Yuly Novikov 2f9b5e6f79 Change angle_util to be a shared library
So that there will be one instance of static thread synchronization variables
in AndroidWindow.
Previously there was one instance in lib_angle_deqp_gles2_tests__library
and one in libangle_deqp_libgles2, resulting in AndroidWindow::initialize
waiting forever.

BUG=angleproject:1471

Change-Id: Ia529c91e34960eb352730c1bb89a91ce6336c8a0
Reviewed-on: https://chromium-review.googlesource.com/368983
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-08-24 21:01:16 +00:00
Austin Kinross 91e71ed99f Misc minor WinRT fixes and cleanups
Change-Id: Ibf041e74d81ef266791e6b6a3bb43bf504b035b3
Reviewed-on: https://chromium-review.googlesource.com/374040
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-08-23 20:11:39 +00:00
Jamie Madill 509a1d4602 GN: Enable more MSVS warnings.
Some warnings were enabled only in standalone builds. Enabling them in
the GN config will prevent standalone build breakage and also make
some potentially harmful warnings more visible to non-Windows devs.

BUG=angleproject:1449

Change-Id: I11fe9bac957864d37af37b3860a22fcbd91946ac
Reviewed-on: https://chromium-review.googlesource.com/360961
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-08-04 19:16:22 +00:00
Jamie Madill ce1ed238a5 D3D11: Detect driver version for blit workaround.
Since the newer driver versions are required for WebGL 2 conformance,
we need a solution that can detect a driver version to know if we
should apply the workaround.

Use a modified copy of Chrome's Windows GPU driver detection code.
In the future we should extend this to a full module when we port
the command buffer workarounds.

BUG=angleproject:1452

Change-Id: I783d5726454671cc22585a2bf990c071d539aa9f
Reviewed-on: https://chromium-review.googlesource.com/361962
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-07-24 18:42:37 +00:00
Jamie Madill a8503cefdc Re-land "GN: Enable chromium_code config instead."
Using "no_chromium_code" is a bit less strict, but ANGLE should be
able to handle slightly stricter warnings.

Re-land with fix for Clang build.

BUG=angleproject:1449

Change-Id: I8988287d630a6258f2f9ee90e7bfef5f2d5799cd
Reviewed-on: https://chromium-review.googlesource.com/361331
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-07-18 20:44:10 +00:00
Jamie Madill 5bc93c4186 Revert "GN: Enable chromium_code config instead."
Seems to fail the Clang build:

../../third_party/angle/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp(35,60):  error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
            maxSrvMip          = (desc.Texture2D.MipLevels == -1) ? INT_MAX : maxSrvMip;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~

BUG=angleproject:1449

This reverts commit aeb477fbe5.

Change-Id: I01baaf082f282c9d80a9c17fd6ffc2b8911313b2
Reviewed-on: https://chromium-review.googlesource.com/361094
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-07-18 16:34:54 +00:00
Jamie Madill aeb477fbe5 GN: Enable chromium_code config instead.
Using "no_chromium_code" is a bit less strict, but ANGLE should be
able to handle slightly stricter warnings.

BUG=angleproject:1449

Change-Id: Ifaf77201085dd70cf5ff628b1aa02de55c5e96ba
Reviewed-on: https://chromium-review.googlesource.com/360940
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-07-18 15:29:24 +00:00
Dirk Pranke 313d944745 Stop linking a static_initializer into the Mac chromium build.
The :angle-image_util target was a source_set rather than a
static_library(), causing us to link in loadimage.cpp, which
pulled in mathutils.cpp, which contains a static initializer.
Switching :angle_image_util to a static library (which is what GYP
does) solved the problem.

R=rsesek@chromium.org, cwallez@chromium.org
BUG=628052

Change-Id: I63387b3fc9d799c92f7c1b49a1c7c7435e70a951
Reviewed-on: https://chromium-review.googlesource.com/360228
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
2016-07-14 18:34:44 +00:00
Frank Henigman e8d5c5c436 Check ozone_platform_gbm before doing gbm stuff.
Just checking use_ozone fails when building an ozone platform which
doesn't have gbm, e.g. chromecast.

BUG=angleproject:1439
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_gn_chromeos_rel;tryserver.chromium.android:android_compile_dbg

Change-Id: Idec14441ce30dd872b3bfddfe844abfeb910cc02
Reviewed-on: https://chromium-review.googlesource.com/358860
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2016-07-07 21:55:31 +00:00
Geoff Lang 6e4cfceb80 Refactor ANGLE's image manipulation code into a static library.
Allows for chromium to make use of some of the functionality.

BUG=612205

Change-Id: Ib4435ca44775a3a554b0fb3bd384bd4d31d7952d
Reviewed-on: https://chromium-review.googlesource.com/351753
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2016-07-04 22:06:07 +00:00
Frank Henigman 62ba96236e Require libdrm only if use_ozone=1.
This is more accurate, and doesn't break platforms with no pkgconfig,
e.g. Android.

BUG=angleproject:1297
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_gn_chromeos_rel;tryserver.chromium.android:android_compile_dbg

Change-Id: Iafbd66a5e81467d2a5431c3bb1ddd26a837888e7
Reviewed-on: https://chromium-review.googlesource.com/356481
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2016-06-29 17:17:31 +00:00
Frank Henigman 77df676ea3 Add ozone display gn build.
Pick up ozone source when use_ozone = true.
Don't link X11 unless use_x11 = true.

BUG=angleproject:1297
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_gn_chromeos_rel

Change-Id: I94e6242189646c8a18b00436294bccdd4c5a8785
Reviewed-on: https://chromium-review.googlesource.com/352251
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2016-06-23 18:02:48 +00:00
Robert Sesek db8ae83673 [Mac/GN] Properly set the install_name and rpath for shared_library targets and their consumers.
BUG=621932
R=cwallez@chromium.org

Change-Id: I10b0fd5a668d74b7062747002bc48ef0e0a6df9c
Reviewed-on: https://chromium-review.googlesource.com/354302
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2016-06-21 16:56:50 +00:00
Yuly Novikov a6426d6753 Android GL backend and end2end tests
Just the bare minimum implementation for end2end tests to run.

BUG=angleproject:1362
TEST=angle_end2end_tests on Nexus 5X

Change-Id: I92293e0f8bdc2ffaa5d4661927750d7cb3d931e6
Reviewed-on: https://chromium-review.googlesource.com/349353
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2016-06-07 02:19:07 +00:00
Jamie Madill e2e406c3a4 Add base::numerics for safe math and conversions.
This replaces are "IsUnsignedXXXSafe" family of methods.
Also add overflow checks to unpack block sizes.

BUG=angleproject:1397

Change-Id: Ib47be149b0486c70f795b0d0f8899441faac9340
Reviewed-on: https://chromium-review.googlesource.com/348062
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-06-03 15:52:02 +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 <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-05-27 20:05:05 +00:00
Jamie Madill 9e54b5af89 Add Vulkan stubs.
Currently enabled for Windows by default.

BUG=angleproject:1319

Change-Id: I87921c579bee466465fb1e3f629bb3a40fdff659
Reviewed-on: https://chromium-review.googlesource.com/328730
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-05-25 20:05:11 +00:00
Yuly Novikov 87ae8cdf04 Fix Linux standalone compilation.
simple_texture_2d, hello_triangle, stencil_operations, simple_texture_cubemap
fail to compile after https://chromium-review.googlesource.com/342050.

BUG=angleproject:1319
TEST=ninja -C out/Release all

Change-Id: Ib70008036f8688b737f3f40b5224437a7afdea19
Reviewed-on: https://chromium-review.googlesource.com/346121
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2016-05-20 00:48:21 +00:00
Nico Weber de44d3a43a gn/mac: Build GL code, and include CGL code.
BUG=chromium:431177

Change-Id: Id9c8ad68a9703591d6f576bfae3d7061526ed27f
Reviewed-on: https://chromium-review.googlesource.com/344740
Tryjob-Request: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
2016-05-16 18:28:09 +00:00
John Bauman e271a7e4a1 Use data_deps to depend on :copy_compiler_dll
This should ensure that d3dcompiler_47.dll is saved into an isolate in
chromium, as it's used at runtime.

BUG=611235

Change-Id: I64801f00bf90f2be68c7a691724609bbf4d28dfa
Reviewed-on: https://chromium-review.googlesource.com/344351
Tryjob-Request: John Bauman <jbauman@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: John Bauman <jbauman@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
2016-05-12 03:00:53 +00:00
Steven Bennetts 369d03c191 Disable angle_enable_gl on chromeos
BUG=angleproject:1370

Change-Id: I63e3ee8fc6e08fcd2a908cdca3558af886526cbd
Reviewed-on: https://chromium-review.googlesource.com/342740
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-05-06 01:24:03 +00:00
Jeremy Roman 06feb81cb6 Make :angle_common depend on :commit_id.
BUG=chromium:601195
Change-Id: Ic90b8c8dbe07700e66c8fe973a3e620f439d2fbe
Reviewed-on: https://chromium-review.googlesource.com/337335
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-04-07 13:48:45 +00:00
Corentin Wallez cc068e9385 Add DisplayGL::getDriverVersion and implementation on Linux NVIDIA
Some GPU driver bug workarounds should be active only for specific
driver version ranges. This adds NVIDIA Linux driver detection using
the XNVCtrl X11 extension.

BUG=590870

Change-Id: I8cbf692a0c8a6da7473169f29d720bdc2d07663d
Reviewed-on: https://chromium-review.googlesource.com/329637
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2016-03-26 01:17:51 +00:00
Corentin Wallez dbc9ccfb71 Remove the _ANGLE targets from the GN build.
They are no longer needed by Chromium.

BUG=522967

Change-Id: I187eed52378a58f3ea24c3e21082c6a93e56da7f
Reviewed-on: https://chromium-review.googlesource.com/325330
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2016-02-05 18:01:10 +00:00
Corentin Wallez adc5b0eb75 Fix translator having multiply defined symbols in GN builds.
This error was introduced in 82b5ab606f
where the translator's essl and glsl sources are compiled in both
the translator and translator_lib targets. As translator depends on
translator_lib this caused symbols to be defined multiple times.

BUG=angleproject:1250

Change-Id: I50bab7112d1460e14710f50250fa2417b2163236
Reviewed-on: https://chromium-review.googlesource.com/321770
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2016-01-12 22:07:26 +00:00
Corentin Wallez c89df2ba30 Add loadable_module versions of libEGL and libGLESv2.
Reland with a link fix for Clang on Windows

In order to implement the --use-gl=angle Chrome flag on Linux, we need
to have the ANGLE .so directly in the build directory however GYP
places shared_libraries under lib/ on Linux. On the contrary loadable_modules
cannot be linked against so we need to keep the shared_library targets.

This commit adds _ANGLE versions of the libEGL and libGLESv2 targets as
loadable module that depend on their respective shared library.

BUG=522967

Change-Id: Iad968ab786b94b6041c279921de99633d23b48a7
Reviewed-on: https://chromium-review.googlesource.com/318470
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2016-01-12 16:23:22 +00:00
Jamie Madill 1fae35562c Add dEQP Linux GN integration.
BUG=angleproject:1272

Change-Id: I20cb8968221c25bb374b3cc71d7ca619a35f1a2f
Reviewed-on: https://chromium-review.googlesource.com/320781
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2016-01-12 14:59:21 +00:00
Jamie Madill edbc2449de Add dEQP GN integration.
This is Windows-only for now, but will be expanded to Linux. Also do
a bit of refactoring in our deqp.gypi file.

BUG=angleproject:1272

Change-Id: I526a99fe3b91a2d9e8901c7e033a4916a06780be
Reviewed-on: https://chromium-review.googlesource.com/320800
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2016-01-11 19:20:42 +00:00
Austin Kinross 82b5ab606f Compile out GLSL/ESSL translator output code if it's not needed
In WinRT we only use the HLSL code, so the GLSL/ESSL output code
is not necessary and is only adding to our binary size.

BUG=angleproject:1250

Change-Id: I9363ca3981bde50a230f8353c1bcc09f6ea209cb
Reviewed-on: https://chromium-review.googlesource.com/317358
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tryjob-Request: Austin Kinross <aukinros@microsoft.com>
Tested-by: Austin Kinross <aukinros@microsoft.com>
2016-01-11 17:38:34 +00:00
Roland McGrath f786c2b976 GN: Use $root_out_dir in in copy_compiler_dll rule
The root_build_dir variable yields the root of the build tree.
But when the component is being built under a non-default
toolchain, its output files are delivered to a toolchain
subdirectory instead.  The copy_compiler_dll rule should put its
output next to where libANGLE and things built using it will go,
which is root_out_dir.  This fixes cases where the angle GN
component is instantiated under more than one toolchain, which
heretofore would produce multiple Ninja rules for the same target
file $root_build_dir/d3dcompiler_47.dll and thus get complaints
from Ninja.

BUG=512869

Change-Id: I9fe83c5c5fa74902ef270654d3707636588af6b7
Reviewed-on: https://chromium-review.googlesource.com/320119
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Roland McGrath <mcgrathr@chromium.org>
2016-01-05 20:59:59 +00:00
Corentin Wallez 4bc76d07e8 Revert "Add loadable_module versions of libEGL and libGLESv2."
This reverts commit 6beb0bfdd0.

It caused compile failures on win_clang_dbg because when building libEGL_ANGLE.dll DllMainCRTStartup wasn't defined.

Change-Id: I8080f8db373f5988d86560da1b8b2a1bae30d3ea
Reviewed-on: https://chromium-review.googlesource.com/318460
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-12-15 20:07:39 +00:00
Corentin Wallez 6beb0bfdd0 Add loadable_module versions of libEGL and libGLESv2.
In order to implement the --use-gl=angle Chrome flag on Linux, we need
to have the ANGLE .so directly in the build directory however GYP
places shared_libraries under lib/ on Linux. On the contrary loadable_modules
cannot be linked against so we need to keep the shared_library targets.

This commit adds _ANGLE versions of the libEGL and libGLESv2 targets as
loadable module that depend on their respective shared library.

BUG=522967

Change-Id: I08f2ce0ee0430eff5bee852f09cd7d30b94d6266
Reviewed-on: https://chromium-review.googlesource.com/316421
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2015-12-14 19:21:09 +00:00
Austin Kinross 502f3df6aa Define EGL_EGLEXT_PROTOTYPES in GN projects
This makes sure that EGL_EGLEXT_PROTOTYPES is defined in the
same places as GL_GLEXT_PROTOTYPES.

BUG=angleproject:1190

Change-Id: I0e55aad5728df765bff495822570e7590b157d68
Reviewed-on: https://chromium-review.googlesource.com/315208
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2015-12-03 17:54:50 +00:00
Dirk Pranke ac0f9b1f94 Add missing GN build dependency on -lrt for linux.
Without this fix, angle_end2end_tests links fine on Trusty
but not on Precise or older versions of Linux (util/linux/LinuxTimer.cpp
calls clock_gettime(), which is part of libc on newer versions of the
OS but requires -lrt on older versions. GYP had the dependency specified
but GN didn't).

R=cwallez@chromium.org
BUG=432959, 531296

Change-Id: I70e1f701d099f3ba72c7e5dfd7af6d47658ffad9
Reviewed-on: https://chromium-review.googlesource.com/312298
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-11-13 15:07:25 +00:00
Geoff Lang ee48376c1f Update to the latest versions of the GL and EGL headers.
Add GLES 3.1 and 3.2 headers.

Remove GLES 3.0 extension headers and entry point files.

Re-land fixes double define from different style defines in libGLESv2.gypi
and other projects.

Re-land fixes missing defines in angle_util project in gn.

Change-Id: I1952413cd4390e6f5450df809f8f5867bf6f49e2
Reviewed-on: https://chromium-review.googlesource.com/299771
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-15 20:13:55 +00:00
Geoff Lang 0393310feb Revert "Update to the latest versions of the GL and EGL headers."
Issues with GN build.

This reverts commit 8284436798.

Change-Id: I99d186019135bbbe250e95c9567854108d31c556
Reviewed-on: https://chromium-review.googlesource.com/299870
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-15 17:07:24 +00:00
Geoff Lang 8284436798 Update to the latest versions of the GL and EGL headers.
Add GLES 3.1 and 3.2 headers.

Remove GLES 3.0 extension headers and entry point files.

Re-land fixes double define from different style defines in libGLESv2.gypi and
other projects.

Change-Id: I6204dc767bd83b7aa7e4d6e2fa338b2ce7f304d8
Reviewed-on: https://chromium-review.googlesource.com/299401
Tested-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2015-09-11 20:25:50 +00:00
Geoff Lang e12150fe9c Revert "Update to the latest versions of the GL and EGL headers."
Linux compile failures to do gyp defines.

This reverts commit 8bbeabc179.

Change-Id: Icb31dd817414b3a9ab36e88cedab9c725af26b6b
Reviewed-on: https://chromium-review.googlesource.com/299173
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-11 20:06:38 +00:00
Geoff Lang 8bbeabc179 Update to the latest versions of the GL and EGL headers.
Add GLES 3.1 and 3.2 headers.

Remove GLES 3.0 extension headers and entry point files.

Change-Id: Icaa444efa52f3b9d1497189da92bc364545a6e3a
Reviewed-on: https://chromium-review.googlesource.com/299172
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-11 19:33:49 +00:00
Jamie Madill 7aef6020a0 Revert "Update to the latest versions of the GL and EGL headers."
Broke the Clang compile.

In file included from ../../third_party/angle/include/GLSLANG/ShaderLang.h:28:
../../third_party/angle/include/KHR/khrplatform.h:282:30: error: no newline at end of file [-Werror,-Wnewline-eof]
#endif /* __khrplatform_h_ */

Several other similar errors.

BUG=None

This reverts commit aac2035d85.

Change-Id: I407e7e65bb6a46d1d941c54cdf14a14758e22d96
Reviewed-on: https://chromium-review.googlesource.com/298834
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-09-11 19:06:12 +00:00
Geoff Lang aac2035d85 Update to the latest versions of the GL and EGL headers.
Add GLES 3.1 and 3.2 headers.

Remove GLES 3.0 extension headers and entry point files.

Change-Id: I8e9df6262dc1b2536a409c5791734e4a4d63b115
Reviewed-on: https://chromium-review.googlesource.com/299341
Tryjob-Request: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-11 18:35:35 +00:00
Corentin Wallez beb81589d0 Make the end2end tests compile in the GN build.
BUG=angleproject:929

Change-Id: Ifc5ad03579c3e187721842f7585f3f06b69cbf45
Reviewed-on: https://chromium-review.googlesource.com/296682
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-09-02 20:46:28 +00:00
Corentin Wallez d4bcfa2cd6 Make the unittests compile in the GN build.
This changes angle_unittests.gypi to use a variable per list of files so
that we can grab the list of files in conditions in BUILD.gn

BUG=angleproject:929

Change-Id: I7fc73fd84d8efc1ea545fe672b1dba1c429b317f
Reviewed-on: https://chromium-review.googlesource.com/296443
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-09-01 19:53:31 +00:00
Tomasz Moniuszko 319fb898fb Use default commit.h file if git index is not available
The solution is the same as in GYP version:
1. Check if .git/index is available in angle directory.
2. Use generated commit.h file if git is available or copy the default
file instead.

Change-Id: Ic3cedf6793c368070228a63c0eb270ca6fb47f81
Reviewed-on: https://chromium-review.googlesource.com/289391
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Tomasz Moniuszko <tmoniuszko@opera.com>
2015-08-12 16:33:23 +00:00
Cooper Partin 75da1974b9 Changed d3d11 desktop renderer to use d3d9 debug annotation interfaces.
The D3D11 renderer must choose the D3D9 debug annotator because the D3D11 interface
method ID3DUserDefinedAnnotation::GetStatus on desktop builds doesn't work with the Graphics
Diagnostics tools in Visual Studio 2013.
The D3D9 annotator works properly for both D3D11 and D3D9.
Incorrect status reporting can cause ANGLE to log unnecessary debug events.

Change-Id: I9a31c63cbc506904eb39577826fc4df8d503f03a
Reviewed-on: https://chromium-review.googlesource.com/278162
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cooper Partin <coopp@microsoft.com>
Tested-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2015-07-13 17:50:46 +00:00
Nico Weber 47b53c006b Mark no_angle_common as no_chromium_code.
All other targets that remove chromium_code add
no_chromium_code; looks like not doing this here was an
oversight.

BUG=491209

Change-Id: Id5c81d019603b428561a23aaa4dbe4427e43e751
Reviewed-on: https://chromium-review.googlesource.com/275316
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Tested-by: Nico Weber <thakis@chromium.org>
2015-06-04 20:51:20 +00:00
Corentin Wallez 51e2ad1457 Do not always use X11 for Linux builds, inherit Chromium's settings
This fixes project generation for Chromium for non-X11 builds

BUG=angleproject:1011

Change-Id: If528f63fb186d834d56a43ca379497d99e74777e
Reviewed-on: https://chromium-review.googlesource.com/273163
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2015-05-27 17:13:29 +00:00
Corentin Wallez 47fc1fecc4 Compile the GLX EGL implementation in BUILD.gn
BUG=angleproject:892

Change-Id: Ifebcadab4fc4ad9fd93b9cf21b3ebdd2f4d6cfc1
Reviewed-on: https://chromium-review.googlesource.com/271164
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-14 15:35:34 +00:00
Brett Wilson a662abb5e7 Fix GN Windows component build.
The translator_static dependency is missing from libANGLE.
GYP has this dependency.

Change-Id: I30165a041f88f7e3c6f550744d2c7a4103d0f520
Reviewed-on: https://chromium-review.googlesource.com/264425
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-04-07 20:03:50 +00:00
Dirk Pranke a17e77febd Replace stray reference to cpu_arch in BUILD.gn.
cpu_arch has been replaced by target_cpu and current_cpu in GN.

R=geofflang@chromium.org
BUG=344767

Change-Id: Id1c0e37238db5fac41572244aeac0908ac5a412a
Reviewed-on: https://chromium-review.googlesource.com/260971
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-03-18 22:05:40 +00:00
Daniel Bratell 73941deb4f Disable the HLSL code in Angle if it is not being used.
We're only using the HLSL code in Windows so
it's not necessary to compile and distribute it on other platforms.

This adds a defined ANGLE_ENABLE_HLSL that can be checked in files that
are used by non-HLSL code as well. Mostly the HLSL code is just not
include by the build system.

Details of the space savings (heavily truncated)

Total change: -165717 bytes
===========================
 -606 - Source: angle/src/common/utilities.cpp
 -627 - Source: angle/src/compiler/translator/FlagStd140Structs.cpp
 -695 - Source: /usr/include/c++/4.8/bits/stl_algo.h
 -710 - Source: angle/src/compiler/translator/TranslatorHLSL.cpp
 -713 - Source: angle/src/compiler/translator/IntermNode.h
 -863 - Source: /usr/include/c++/4.8/bits/stl_map.h
 -935 - Source: angle/src/compiler/translator/blocklayout.cpp
 -1515 - Source: angle/src/compiler/translator/BuiltInFunctionEmulator.cpp
 -1655 - Source: angle/src/compiler/translator/UnfoldShortCircuit.cpp
 -2375 - Source: /usr/include/c++/4.8/bits/vector.tcc
 -3135 - Source: angle/src/compiler/translator/RewriteElseBlocks.cpp
 -4656 - Source: angle/src/compiler/translator/UtilsHLSL.cpp
 -5265 - Source: angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp
 -6505 - Source: /usr/include/c++/4.8/bits/stl_tree.h
 -11480 - Source: angle/src/compiler/translator/UniformHLSL.cpp
 -13580 - Source: angle/src/compiler/translator/StructureHLSL.cpp
 -18964 - Source: ??
    (constant strings and a few vtbls)
 -89332 - Source: angle/src/compiler/translator/OutputHLSL.cpp

Change-Id: I23ccc98abd0a21f847dd34f9482800b3ba679d56
Reviewed-on: https://chromium-review.googlesource.com/251528
Tested-by: bratell at Opera <bratell@opera.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2015-02-25 16:27:01 +00:00
Geoff Lang 23dcabadae Enable the OpenGL/WGL backend on Windows.
BUG=angle:890

Change-Id: Ida58ecb9f3bcfd7ee9ae5c7cdbdff4aab9cca869
Reviewed-on: https://chromium-review.googlesource.com/249741
Reviewed-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-02-13 21:35:06 +00:00
Geoff Lang c588ac7335 Add the OpenGL renderer to the GN build.
BUG=angle:890

Change-Id: I097296c7125e203ba04eab1c179dc8c183ed4789
Reviewed-on: https://chromium-review.googlesource.com/249842
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-02-13 21:31:07 +00:00
Austin Kinross 4085347266 Disable warning 4530 in the libANGLE GN project
Change-Id: I56b5428f40a294248305dff168b9b0bb7b0a9bcc
Reviewed-on: https://chromium-review.googlesource.com/249240
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-02-12 21:27:38 +00:00
Jamie Madill 562e81bbcc Fix Linux build, and update BUILD.gn.
Re-re-land with fixes for Linux and Android.

We were getting multiply defined symbol errors on Linux for some
stuff in the common sources. Switch to using a static lib target
for the common sources, and also sync BUILD.gn with the latest gyp.

BUG=angle:773

Change-Id: Ia2d52978a167c532e5e76cb711de589855eff44e
Reviewed-on: https://chromium-review.googlesource.com/240553
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2015-01-14 20:57:57 +00:00
Jamie Madill 433c85d3c0 Revert "Fix Linux build, and update BUILD.gn."
Still more build failures, different ones this time.

This reverts commit 9f8a57c641.

Change-Id: I7bea8e24403d92ca4ecb2ee0f24f9e065db5366d
Reviewed-on: https://chromium-review.googlesource.com/240550
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-01-13 22:52:29 +00:00
Jamie Madill 9f8a57c641 Fix Linux build, and update BUILD.gn.
Re-land with fixes for Android.

We were getting multiply defined symbol errors on Linux for some
stuff in the common sources. Switch to using a static lib target
for the common sources, and also sync BUILD.gn with the latest gyp.

BUG=angle:773

Change-Id: Id3edecc633b1c4be205558137c91baf87f256156
Reviewed-on: https://chromium-review.googlesource.com/240145
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-01-13 20:44:19 +00:00
Jamie Madill 04184fb046 Revert "Fix Linux build, and update BUILD.gn."
This reverts commit ed409f938b.

Change-Id: I208a2c43c73e99ae95988c6d81ed64691bd8a99f
Reviewed-on: https://chromium-review.googlesource.com/239900
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-01-09 16:51:27 +00:00
Jamie Madill ed409f938b Fix Linux build, and update BUILD.gn.
We were getting multiply defined symbol errors on Linux for some
stuff in the common sources. Switch to using a static lib target
for the common sources, and also sync BUILD.gn with the latest gyp.

BUG=angle:773

Change-Id: I212284cfa90cd117a784a5f17057f47dd08900d1
Reviewed-on: https://chromium-review.googlesource.com/239193
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2015-01-09 15:54:02 +00:00
Geoff Lang e7c6e43c2c Implement all entry points in libGLES and have libEGL act as a shim.
This allows libANGLE to only be included in libGLESv2 and moves all TLS
data to libGLESv2.dll.

BUG=angle:733

Change-Id: I34f0b47987a5efbe906c290d3ca656142e69ea9a
Reviewed-on: https://chromium-review.googlesource.com/232962
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-12-05 16:11:01 +00:00
Geoff Lang 9d9132dff2 Remove support for compiling libANGLE as a dynamic library.
BUG=angle:733

Change-Id: Iacef45b89f234091eb5df505437adabece1e564b
Reviewed-on: https://chromium-review.googlesource.com/232961
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-12-04 15:04:25 +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 <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-12-01 19:01:02 +00:00
Geoff Lang 2207213ba5 Move as many files as possible from common to libANGLE.
BUG=angle:733

Change-Id: If01c91cd52ac5c2102276a9fdc4b68ebc13e47f9
Reviewed-on: https://chromium-review.googlesource.com/231850
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-11-25 16:20:33 +00:00
Geoff Lang 4349ab855d Revert "Move as many files as possible from common to libANGLE."
Chromium directly includes our common/version.h and couldn't build after this change.

This reverts commit f0a2c7727f.

Change-Id: Iafc41b1a3973f609518fe3588fdb64cecc285332
Reviewed-on: https://chromium-review.googlesource.com/231840
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-11-25 15:53:46 +00:00
Geoff Lang f0a2c7727f Move as many files as possible from common to libANGLE.
BUG=angle:733

Change-Id: I40cee6e2e305ac493acbc8649f858785c0569aed
Reviewed-on: https://chromium-review.googlesource.com/231051
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-11-25 15:29:02 +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 <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-11-21 19:46:02 +00:00
John Abd-El-Malek ea0c84d177 Copy the D3D compiler dll in the GN build.
Change-Id: I773a411d07991d9ae160267eba8325c327146554
Reviewed-on: https://chromium-review.googlesource.com/229007
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: John Abd-El-Malek <jam@chromium.org>
2014-11-17 22:10:56 +00:00
Scott Graham 7e81c9d5fb Revert "Revert "Switch to 8.1 SDK and d3dcompiler_47.dll""
This reverts commit 3cbdc34d4e.

This reverts back to using 8.1 and d3dcompiler_47, as chrome is now rolled forward.

Change-Id: I7ef4ebdbc32146b9ba6f551e376ac03ac71131ba
Reviewed-on: https://chromium-review.googlesource.com/229990
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Tested-by: Scott Graham <scottmg@chromium.org>
2014-11-15 05:18:59 +00:00
Scott Graham 3cbdc34d4e Revert "Switch to 8.1 SDK and d3dcompiler_47.dll"
This reverts commit e1425d95ba.

This is to keep the GPU fyi bots green until the chrome side is landed. Chrome will be rolling to e1425d95...

Change-Id: Iff1c60eeb7143fb72afa8525b31f8f0de9385897
Reviewed-on: https://chromium-review.googlesource.com/229497
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2014-11-14 18:27:07 +00:00
Scott Graham e1425d95ba Switch to 8.1 SDK and d3dcompiler_47.dll
Change-Id: If43c7861ab7f47448fd726fd0b5c35f3a6eeb362
Reviewed-on: https://chromium-review.googlesource.com/229616
Commit-Queue: Scott Graham <scottmg@chromium.org>
Tested-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-11-14 17:21:29 +00:00
John Abd-El-Malek 657cd684a6 Fixes for Angle to build with Windows GN.
Change-Id: Id38c4b11dba31b2779efa7beade481cd50f3d935
Reviewed-on: https://chromium-review.googlesource.com/227692
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
2014-11-05 22:36:58 +00:00
John Abd-El-Malek 330f0adedd Fixes for Angle to build with Windows GN.
Change-Id: I5af7a1305e5a190de5367ad940186edd6baee5bc
Reviewed-on: https://chromium-review.googlesource.com/227665
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-11-05 22:07:42 +00:00
Tibor den Ouden 97049c6a68 Enhance shader debug output
glGetTranslatedShaderSourceANGLE() returns the glsl code, the initial translated hlsl code,
the final translated hlsl code and the disassembly of the generated binary with the compiler configuration.
This enhancement is only available if the define ANGLE_GENERATE_SHADER_DEBUG_INFO exists.
This define is set in the debug configurations for the Windows platform.

BUG=angle:751

Change-Id: I8b15e8b25fbb0c0575a73cc876bf8f1fa7ed142a
Reviewed-on: https://chromium-review.googlesource.com/221059
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-10-17 16:41:42 +00:00
Kenneth Russell 1ce845d796 Refactor libGLESv2.gypi to allow libANGLE to be built on all platforms.
Required pulling angle_enable_d3d{9,11} into angle.gypi and definition
of angle_libangle_win_sources. Pull in those sources in BUILD.gn.

Tested with local GYP build on Windows. Did not test GN build yet.

BUG=angleproject:773

Change-Id: Ia3703fe4fa2bc8a1682c1fa1667ca36268b36cc7
Reviewed-on: https://chromium-review.googlesource.com/221785
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Kenneth Russell <kbr@chromium.org>
2014-10-08 21:28:20 +00:00
Brett Wilson 10ac404330 Rename GN public variables.
forward_dependent_configs_from => public_deps
direct_dependent_configs => public_configs

Change-Id: I93beca2109181a2aac8d5793c3464b3af8b6ab9b
Reviewed-on: https://chromium-review.googlesource.com/219695
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Brett Wilson <brettw@chromium.org>
2014-09-24 18:57:25 +00:00
Cem Kocagil f8a16d7b9d gn: Fix source paths
Change-Id: Idf0c746d7e4e9f03b176744e8ff027be2d5f25ad
Reviewed-on: https://chromium-review.googlesource.com/218520
Reviewed-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Commit-Queue: Cem Kocagil <ckocagil@chromium.org>
Tested-by: Cem Kocagil <ckocagil@chromium.org>
2014-09-16 19:50:12 +00:00
Jamie Madill 04994ec4b2 Use libANGLE to reduce duplicated ANGLE source compiles.
libGLESv2_static and libGLESv2 can re-use the same object files.

BUG=angle:733

Change-Id: I894f4b5b6fbc1fc47812609d9e996691daf9f318
Reviewed-on: https://chromium-review.googlesource.com/214188
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-09-03 21:02:31 +00:00
Jamie Madill e5c97abd32 Fix GN build with missing ShaderVars.cpp.
Change-Id: I29be6cdda643f83a40a6adc9b76153667aafcc51
Reviewed-on: https://chromium-review.googlesource.com/211400
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
2014-08-07 19:14:29 +00:00
Jamie Madill a2ad4e8a3e Export shader variables from the translator DLL.
This will allow us to use these methods when compiling the translator
as a DLL.

BUG=angle:466,697

Change-Id: Ic9169fb7c69fe0bf5f98addfc128a30ee6b2159d
Reviewed-on: https://chromium-review.googlesource.com/208752
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
2014-08-06 20:13:53 +00:00
Jamie Madill 7bf0c8670a Fix GN build for libEGL.
Our build in GN differed slightly from our gyp build, causing the
linker to complain about inconsistent linkage. Also remove some
stray definitions of EGLAPI from our headers.

Change-Id: I5d3a09ccb0cec528ead33944ce0996cceed32d86
Reviewed-on: https://chromium-review.googlesource.com/210821
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-08-01 14:14:47 +00:00
Jamie Madill 58c55c1373 Fix GN build for libGLESv2.dll.
In a previous fix to a Clang build error, we had neglected to update
the GN build. Broken in commit 07d49ef535.

BUG=angle:707

Change-Id: Ic11aa907d591540e915bec60f3bafaea471689d5
Reviewed-on: https://chromium-review.googlesource.com/210652
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2014-07-31 21:57:54 +00:00
Brett Wilson 2f5469c2d6 Export include directories to dependents in GN.
Translator headers that are included by dependent code
(example: ShaderLang.h) expect to be able to include files from
"includes" (example: "KHR/khrplatform.h"). This automatically
applies this include path to dependent targets.

Change-Id: I6990f66132562f142a6cdf8b8c434d2dbaad1c98
Reviewed-on: https://chromium-review.googlesource.com/209452
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-07-24 17:23:09 +00:00
Brett Wilson 04bac60c69 Explicitly list files for the build.
Removes shelling out to enumerate_files for the main targets (tests
and examples are currently unchanged) in favor of explicitly listing
out the files in the build.

There are a number of reasons. My immediate reason is that doing this
allows the file lists to be shared with the GN build so the GYP and GN
builds of angle should mostly automatically stay in sync now. In
addition, I don't think we should be enumerating files in GYP. No
other Chrome sub-projects do this, and Chrome engineers expect files
to be listed in .gyp* files. It's also slower to shell out a bunch of
times to get the file lists (this matters more in the GN build which
runs very quickly).

Updates the GN build to share these file lists. This unbreaks the
Windows GN Angle build.

BUG=angle:698

Change-Id: Iab8829628aeb7232bb64f4c247c35c6485bba3ee
Reviewed-on: https://chromium-review.googlesource.com/208461
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
2014-07-17 21:21:50 +00:00
Brandon Jones f47bebc401 Refactored Texture2D, separated out D3D logic
BUG=angle:688
Change-Id: I93c2ff0b125278234d61324844b79cc58135d4d8
Reviewed-on: https://chromium-review.googlesource.com/207675
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Brandon Jones <bajones@chromium.org>
2014-07-15 21:05:23 +00:00
Shannon Woods 53a94a8238 Refactors State to be a fully-qualified class
BUG=angle:685

Change-Id: I36cff2da985a12c7180fe2850ccd471f4cebbaad
Reviewed-on: https://chromium-review.googlesource.com/206634
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2014-07-15 16:43:33 +00:00
Brandon Jones 6518fe2466 Moved TextureStorage and Image into d3d
BUG=angle:688
Change-Id: I98ffa1082340a829a77fe5082958898b9c6ab1a2
Reviewed-on: https://chromium-review.googlesource.com/207054
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Brandon Jones <bajones@chromium.org>
2014-07-14 22:00:51 +00:00
Geoff Lang 57f9b6d56b Clean up generatemip.h.
* Move "private" functions into generatemip.inl.
* Use size_t for all dimensions.
* Use uint8_t pointers instead of unsigned char pointers.

BUG=angle:666

Change-Id: I8a1324802e4d670c042e0961c2b6f6fd53f4ebc7
Reviewed-on: https://chromium-review.googlesource.com/202503
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-07-11 20:21:54 +00:00
Geoff Lang 86846e242e Clean up the functions in loadimage.h/cpp.
* Capitalize the function names to fit the style guide.
* Use explicit sizes in the function names to avoid any confusion about
  input or output sizes.
* Use explicit sized types in the functions to avoid potential issues on
  new platforms since a lot of bit-twiddling is used.
* Use size_t for all sizes.
* Use uint8_t for all binary data for input and output data so that pointer
  arithmetic is much easier.
* Move templated function definitions into an .inl file so that
  loadimage.h looks as clean as possible.

BUG=angle:665

Change-Id: Id7173ed66d9e1b7ee3261eea11e77d838cbd2951
Reviewed-on: https://chromium-review.googlesource.com/202590
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-07-11 20:21:35 +00:00
Jamie Madill 72f5b5eee7 Add the BUILD.gn file to the ANGLE source.
The script currently lives in Chromium's build/secondary.

BUG=angle:683

Change-Id: I3ce11913fd27e0a01a1763d6ed973b250cf101d8
Reviewed-on: https://chromium-review.googlesource.com/205244
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2014-06-26 14:36:51 +00:00