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

555 Коммитов

Автор SHA1 Сообщение Дата
Shahbaz Youssefi 9041ca0c34 Limit testing of in-progress work to ANGLE's build of dEQP
A new feature is added, exposeNonConformantExtensionsAndVersions, which
is set by ANGLE's build of dEQP to allow exposing ES3.2 or extensions
that are not yet entirely conformant.  This would allow ANGLE to expose
WIP extensions for regression testing without affecting partners that
test ANGLE with dEQP's standalone build.

Bug: angleproject:3647
Change-Id: Id1e6219f26b41d3f8cdc9763131b8052227761c5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552926
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Sunny Sun <sunny.sun@arm.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-11-24 15:26:32 +00:00
Mohan Maiya 738092aead Add auto generated code for GL_EXT_tessellation_shader
To support tessellation, code and auto generated code are added.
Entry points function, ShaderTypes, built in variables and constants,
builtin function barrier and patch keyword are added.

Bug: angleproject:3572
Change-Id: Ia5fe473e884466cb88cea7138e13377a1d7b4fa0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2538393
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2020-11-18 17:27:55 +00:00
Mohan Maiya cc4ae6da79 Vulkan: Add EXT_separate_shader_objects entry points
Addition of the entry points for EXT_separate_shader_objects extension.

Bug: angleproject:3570
Change-Id: I95a1342bb3322b49997125a17367590183134c84
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2539120
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-11-17 16:55:56 +00:00
Shahbaz Youssefi 67eb26054d Faster stack traces on Linux
Previously addr2line was called for every symbol separately.  This was
glacially slow as every module's debug info was repeatedly reloaded.
With this change, contiguous symbols from the same module are batched
together and one call to addr2line is done.

Potential future optimization is to batch every symbol from the same
module, but capture the output of addr2line calls and interleave them to
match the stack.  For example, currently 4 calls to addr2line are made
for the following stack trace:

    moduleA(+addr1)
    moduleA(+addr2)
    moduleB(+addr3)
    moduleB(+addr4)
    moduleA(+addr5)
    moduleA(+addr6)
    moduleB(+addr7)
    moduleB(+addr8)

while technically only two calls are necessary.

Bug: angleproject:5239
Change-Id: I58742b85409b0b74bb87272bc63e251a2d0fe0e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2535682
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-11-13 03:42:28 +00:00
Jamie Madill 6067e9ce8b Tests: Fix async queue feature comparision.
This bug was incorrectly causing the Async Queue configs to be
classified as the same as ordinary Vulkan configs.

This bug did not affect test grouping in the test runner.
It did affect how we enable/disable configs.

Bug: b/172704839
Change-Id: Ibf6f04fc1a719464201f77884b2a0b3ab1fab78c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2533813
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-11-12 01:05:58 +00:00
Jamie Madill 2edec86441 Improve stack backtraces on Linux.
This switches the Linux crash handler to use addr2line when it
is available. Addr2line is much better at converting addresses
into readable information. The downside is that we must use a
system call to a binary since it's not easy to integrate with
addr2line source.

Bug: angleproject:5239
Change-Id: I13cbaa4ba30166718fb12d924c76ba4f2675453c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2515265
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
2020-11-11 17:07:12 +00:00
Jamie Madill 38016632a1 Vulkan: Enable async feature in end2end_tests.
This adds a new async-command-queue-enabled config that we run against
most of the GLES tests in angle_end2end_tests. The tests now test
both with and without the threaded command queue.

Bug: b/172704839
Change-Id: Ife75f8328f23ac150cddf8ad8a6c4b8fc2d83986
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2532655
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-11-11 16:51:03 +00:00
Jamie Madill 2e74c4526b Vulkan: Make feature names consistent.
This gives the features the exact same name as the member variable.
It fixes a bunch of inconsistencies between the variable name and the
external string identifier.

Ideally these could be auto-generated from JSON.

Bug: b/172704839
Change-Id: Id75c01db544672234435c3dd727c927027b9236d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2524541
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-11-09 20:13:35 +00:00
Mohan Maiya 9217d49db0 Vulkan: Add EXT_external_buffer entry points
Addition of the entry points for EXT_external_buffer extension.

Bug: angleproject:5073
Change-Id: I5dc9f74dfd68c1e83e17ca15166df4cd4c20fca2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2525104
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-11-09 16:21:53 +00:00
Le Hoang Quyen cb6176f3a8 Metal: Support tri-fan & line-loop with primitive restart
Triangle fan:
- If primitive restart is NOT enabled and there is no active render
  pass, use Compute Shader to generate indices.
- If primitive restart is enabled, use CPU to generate indices.

Line loop:
- If draw non-instanced without primitive restart, generate and
  draw only one additional last segment (fastest).
- If draw instanced, primitive restart is NOT enabled, and there is no
  active render pass, use Compute Shader to generate indices (OK).
- Otherwise, use CPU to generate indices (slowest).

Also Disable OcclusionQueriesTest.ClearNotCounted failure on NVIDIA.

Bug: angleproject:2634
Bug: angleproject:5307
Change-Id: Ia5529825807a964f5fcb2a4af8844778896cd42a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2435859
Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2020-11-04 10:13:16 +00:00
Xiaoxuan Liu 61180d011c Reland "Add support for Linux vulkan backend with VK_KHR_display"
This is a reland of a7bb6a9b15

Original change's description:
> Add support for Linux vulkan backend with VK_KHR_display
>
> Implement Linux simple display mode with vulkan backend
> through VK_KHR_display.
>
> Added value 'EGL_PLATFORM_VULKAN_DISPLAY_MODE_SIMPLE_ANGLE' for
> attribute EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE to identify
> the new simple display mode. Also reserved
> EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE for headless mode.
>
> How to enable:
> Add
>
> ```
> use_x11=false
> angle_vulkan_display_mode="simple" # default value
> ```
>
> into args.gn, then compile with linux vulkan args.
>
> Bug: angleproject:5214
> Change-Id: I1247585b9de8b55df106aba99322281f1c183203
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2494320
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

Bug: angleproject:5214
Change-Id: I3921f6cb292c86658f39e739a878baad1ef64dba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2515327
Commit-Queue: Xiaoxuan Liu <xiaoxuan.liu@arm.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-11-03 03:38:40 +00:00
Jamie Madill c06a424fc1 Test Runner: Robustly handle unexpected crashes.
This adds the ability for the test runner to parse unexpected crashes
from the stdout. It also processes the stdout to determine which tests
failed. Tests that run after the crash are re-tried in a follow-up
child process.

Will allow for the test runner to handle very crashy test suites and
also processes crashes from win-asan and other configs where it is
harder to intercept crashes.

Bug: angleproject:5251
Change-Id: Iee03130622571580cb7910f4fb097fe3659d75ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2513288
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-11-03 03:19:42 +00:00
Jamie Madill 807e6b3367 Revert "Add support for Linux vulkan backend with VK_KHR_display"
This reverts commit a7bb6a9b15.

Reason for revert: Failing on Ozone builder, see bug.

Bug: angleproject:5289

Original change's description:
> Add support for Linux vulkan backend with VK_KHR_display
>
> Implement Linux simple display mode with vulkan backend
> through VK_KHR_display.
>
> Added value 'EGL_PLATFORM_VULKAN_DISPLAY_MODE_SIMPLE_ANGLE' for
> attribute EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE to identify
> the new simple display mode. Also reserved
> EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE for headless mode.
>
> How to enable:
> Add
>
> ```
> use_x11=false
> angle_vulkan_display_mode="simple" # default value
> ```
>
> into args.gn, then compile with linux vulkan args.
>
> Bug: angleproject:5214
> Change-Id: I1247585b9de8b55df106aba99322281f1c183203
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2494320
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

TBR=syoussefi@chromium.org,sunny.sun@arm.com,jmadill@chromium.org,xiaoxuan.liu@arm.com

Change-Id: I3e2a2a044c220ed8d25be0d82184e5fba7b9c06a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:5214
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2514637
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-11-02 17:15:21 +00:00
Xiaoxuan Liu a7bb6a9b15 Add support for Linux vulkan backend with VK_KHR_display
Implement Linux simple display mode with vulkan backend
through VK_KHR_display.

Added value 'EGL_PLATFORM_VULKAN_DISPLAY_MODE_SIMPLE_ANGLE' for
attribute EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE to identify
the new simple display mode. Also reserved
EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE for headless mode.

How to enable:
Add

```
use_x11=false
angle_vulkan_display_mode="simple" # default value
```

into args.gn, then compile with linux vulkan args.

Bug: angleproject:5214
Change-Id: I1247585b9de8b55df106aba99322281f1c183203
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2494320
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2020-11-02 14:07:40 +00:00
Le Hoang Quyen 8a50b42b01 Metal: Convert index & vertex format on GPU when possible.
- When converting vertex buffer:
  - if there is no render pass active, use compute shader to convert.
  - if there is a render pass active and device supports explicit memory
    barrier then convert the buffer in vertex shader with direct buffer
    write and insert a memory barrier.
  - if there is a render pass active and device doesn't support explicit
    memory barrier then convert the buffer on CPU.

Bug: angleproject:2634
Change-Id: I5346e3a2adb855f40e46a3912d9db404a4482e0f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2434025
Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2020-10-31 22:03:13 +00:00
Shahbaz Youssefi 09932e046b Vulkan: Support emulated pre-rotation in dEQP testing
Similarly to end2end tests, the window dimensions are swapped with
emulated prerotation at 90 and 270 degrees, while maintaining to the
application that dimensions are as requested.

The following new command line argument can be used to select an
emulated prerotation:

    --emulated-pre-rotation=90
    --emulated-pre-rotation=180
    --emulated-pre-rotation=270

For example:

    $ ./angle_deqp_gles2_tests --use-angle=vulkan \
                               --deqp-case=*draw* \
                               --emulated-pre-rotation=270

Additionally, the deqp test expectations can be marked with the
following new tags to add suppressions for failing tests under
prerotation:

    PREROTATION
    PREROTATION90
    PREROTATION180
    PREROTATION270

Bug: angleproject:4901
Change-Id: I7a68c1a1e7da4366cde981469c589d8d900c40c5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2506810
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-10-31 04:22:06 +00:00
Shahbaz Youssefi 3591997b58 Roll Vulkan-Loader from 8e2b7d03ccfd to 8308d6744d50 (2 revisions)
8e2b7d03cc..8308d6744d

2020-10-28 shabbyx@gmail.com Generate libvulkan.so.1 on Linux instead of libvulkan.so
2020-10-27 shannon@lunarg.com build: Update known-good files for 1.2.158 header

Bug: angleproject:5216
Change-Id: I74e10c44950f3be05cc12f22b44f1627af08ca81
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2506196
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2020-10-29 04:02:35 +00:00
Shahbaz Youssefi b0db7cca32 Vulkan: Initial emulated prerotation support
This is currently only supported for end2end tests (those which use
ANGLETestBase, excluding those that use WithNoFixture) and Vulkan.  Use
WithEmulatedPreoration(*_VULKAN(), degree) where degree is either 90,
180 or 270.

With emulated prerotation, the window dimensions are physically swapped
if 90 and 270 degrees, while the width and height is still reported as
requested by the test.  In the Vulkan backend, the width and height are
swapped after getting queried from the surface, and prerotation is
assumed.

Bug: angleproject:4901
Change-Id: I294436be4c7015d2a63463c4d61de7b67f38c95d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2495544
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-10-27 09:23:14 +00:00
Shahbaz Youssefi 9a47fe71ea Use 4 colors in Checkered test shader
This shader previously output red and green in a checkered pattern (with
four regions).  This makes it hard to verify that the output is not
rotated / flipped.

This change makes the shader output:

    +--------+--------+
    |  red   |  blue  |
    +--------+--------+
    | green  | yellow |
    +--------+--------+

Bug: angleproject:4901
Change-Id: I02723306dec17d1419f11d9f76e96b1cefc3bf06
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2498261
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2020-10-27 07:57:45 +00:00
Jamie Madill 614b5e4df0 Clean up test runner TODOs.
Bug: angleproject:3162
Change-Id: Ie0a137341c7a27a1981c9a39a8e07e437589520a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2495280
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-10-23 13:58:10 +00:00
Geoff Lang 089ef0fa65 Expose glGetTexLevelParameter{if}v before ES 3.1.
Add a new extension, ANGLE_get_tex_level_parameter which allows
users to query texture size and format information before ES 3.1.
This is very useful for re-using existing textures instead of
re-allocating.

Bug: chromium:1132514
Change-Id: I71f6bad8bdacb91875cc81b4884d4c3099235f3f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2469959
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-10-21 17:23:46 +00:00
Jamie Madill ecbac31c43 Perf Tests: Add offscreen mode.
This lets the trace perf tests run configurable number of frames
within a single swap. The offscreen config is similar to how
gfxbench works. It renders to a user FBO (by overriding calls to
BindFramebuffer) and then composits multiple frames into the real
backbuffer. This allows us to get a perf measurement with less
overhead from composition and display.

Adds emulation for some APIs that operate on Framebuffers like
BindFramebuffer, Invalidate, DrawBuffers and ReadBuffer.

Bug: angleproject:4845
Change-Id: I1044c1d52c82f1c215a68a6c46d74c52ed0f3d2a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2300207
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
2020-10-16 19:14:22 +00:00
Jeff Vigil 8eaf72a8f0 EGL: Entrypoint and autogen for EGL_KHR_reusable_sync
Add entry point eglSignalSync
Update autogen files

Test: angle_deqp_egl_tests
--deqp-case=dEQP-EGL.functional.reusable_sync.*

Bug: angleproject:5168
Change-Id: I47afa4010c533096b4c56e9b3ab6eddc1944b83e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2472998
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jeff Vigil <j.vigil@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2020-10-15 21:45:47 +00:00
Brandon Schade b22e437aff Add GL_EXT_copy_image extension entry points
Bug: angleproject:3593
Change-Id: I6d3a55a3112f5f9b20ef33c859a60b2952bfbc2f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444209
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2020-10-14 21:37:05 +00:00
Sylvain Defresne 34951b7955 build: Remove no-op calls to set_sources_assignment_filter
Chromiun no longer use set_sources_assignment_filter() anywhere in the
build, so these are no longer needed.

Bug: chromium:1018739
Change-Id: Ibaf8c11c29fc0bbd63afded3e4a52bd5e07a8283
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2456588
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2020-10-07 17:18:41 +00:00
Jamie Madill 2441399f62 Test Utils: Read available stream data on posix.
ANGLE would only read one chunk of stdout/stderr data at a
time. We would end up slowing down reading one chunk every
few hundred MS for tests with a very large output stream.

Test: *debug_negative_coverage*
Bug: angleproject:3162
Change-Id: I072cba147a6d86c02a2eda051ff61ed981990798
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2447040
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-10-06 20:20:49 +00:00
Trevor David Black e815afbf88 First pass at increasing inclusivity
Link to the inclusivity rules
https://source.android.com/setup/contribute/respectful-code

Bug: b/162834212
Bug: chromium:1097198
Change-Id: Ied5a9e3879d72bff3f77ea6fcda9b82f30c32c2f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396737
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Trevor Black <vantablack@google.com>
2020-10-02 19:49:38 +00:00
Mohan Maiya a2d9abef04 Vulkan: Add OES_sample_shading extension entry points
Addition of just the entry points for OES_sample_shading extension.

Bug: angleproject:3587
Change-Id: I7ef5ceb846d130c2d1e0b4ea7dcbe92452b5d7d3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444212
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2020-10-02 17:08:28 +00:00
Jamie Madill 1fd3e5d89a Test Runner: Fix race in watchdog timeouts.
This fixes a TSAN warning that popped up with the standalone test
runner. The watchdog timer actually was never started so timeouts
were not working as intended. It also switches the timeout mode
to call _Exit which skips all the atexit handlers and avoids some
races on teardown. This change also speeds up the TestSuiteTest.

Also a small fix to GetTempDir that was including an extra path
separator on Windows.

Bug: angleproject:3162
Bug: angleproject:5117
Change-Id: I0e7880a08b61bbb6e30c65665d5c0acec2d78db2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2442381
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-10-02 02:51:53 +00:00
Mohan Maiya 48588bd181 Vulkan: Add GL_EXT_buffer_storage extension entry points
Addition of just the entry points for GL_EXT_buffer_storage extension.

Bug: angleproject:5056
Change-Id: I7a3d7c151f004f89fd945d5d06dbe7afcd491578
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2419951
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-09-21 00:03:30 +00:00
Mohan Maiya c99c22bb32 EGL: Add support for EGL_ANDROID_create_native_client_buffer
This EGL extension will add support for creating EGLClientBuffer
backed by an Android window buffer (struct ANativeWindowBuffer)
which can be later used to create an EGLImage.

Bug: angleproject:5018
Tests: angle_end2end_tests --gtest_filter=ImageTest.SourceNativeClientBufferTarget*
Change-Id: If78ed7b80ad09629b8c5f5b5a0eb07a548e82e6e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404320
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
2020-09-17 15:04:57 +00:00
Jamie Madill ba7f8913da Samples: Enable Debug callback.
This moves the debug callback code into a common location. For ease of
access it's in shader_utils since that file has access to the GL API.

Bug: angleproject:5040
Change-Id: Iab9de47c2d520a5618ea6825852f8afa63565c8a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2408715
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-09-14 15:31:13 +00:00
Hidehiko Abe 90a9cf9619 Expand is_linux to is_linux || is_chromeos.
Currently is_linux is set to true on Chrome OS build,
but it is planned to set to false. This CL is the preparation
to keep the current behavior.

Bug: chromium:1110266
Test: Built locally. Tryjob.
Change-Id: I4124dfb251d68a519fed3e08555d1aa5a694c77c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404500
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2020-09-10 20:29:01 +00:00
Shahbaz Youssefi fdb7874db4 Gracefully fail end2end tests if no window support
EGL_WINDOW_BIT is now specifically requested for tests that open a
window (those that aren't WithNoFixture).  This makes sure pbuffer-only
configs are not selected for the window.

Additionally, a few WithNoFixture tests are made more robust in the
presence of no-window configs.

In the context of crbug.com/1034840, this means that a subset of end2end
tests would be able to run in a remote desktop environment.  Tested on
Linux/X11 by turning a subset of configs PBUFFER-only.

Bug: chromium:1034840
Change-Id: I09fd149d43d3b865856fe6b9491c5f333f4a2efc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378922
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2020-09-02 15:33:45 +00:00
Jamie Madill 5c56f22864 Enable two override suggestion warnings.
-Wsuggest-destructor-override and -Wsuggest-override.

Bug: skia:7647
Change-Id: Iaac1baa8f34fdf210baf2fdbe811a582b3ac2d14
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376717
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-08-28 19:47:05 +00:00
Le Hoang Quyen a4f706b2ca Metal: Use compute to generate 3D texture's mipmap.
- Metal's built-in blit based mipmap generator doesn't use box
  filtering. Hence manual generation using compute is needed.

- Compute based mipmap gen can generate up to 4 mips per pass if the
  base level is power of 2.

- This approach can be extended to 2D/cube texture's mipmap generation
  in future.

Bug: angleproject:4921
Bug: angleproject:2634
Change-Id: I7f997669fe39afef075b2bca2406e9424cbb3016
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336120
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
2020-08-26 01:58:32 +00:00
Le Hoang Quyen 4f247baf66 Metal: Implement EXT_draw_buffers & ANGLE_framebuffer_blit
Bug: angleproject:2634
Change-Id: I769ca7e113e660870e9b31dafb706c313db8ac24
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2332146
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2020-08-23 19:21:10 +00:00
Maksim Sisov 0a3233fa3b X11 and Ozone: fix compilation of tests.
For use_x11 && use_ozone build, use X11 backend by default.

For ozone only, continue using Ozone impl, which is basically
gbm.

Bug: chromium:1085700
Change-Id: Iac104e983135e566b0d42a58e00d3c83b430d6dc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2346276
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-08-14 14:48:48 +00:00
Tim Van Patten 5559351c90 Vulkan: Correctly determine mip level in resolveColorWithCommand()
FramebufferVk::resolveColorWithCommand() is currently using the wrong
mip level value by using the GL index value, rather than calculating the
VK value from (index value - the base level).

Bug: angleproject:4753
Test: FramebufferTest_ES31::MultisampleResolveIntoMipMapWithBlit()
Change-Id: I8ddaeb21c4957b46880f5ef5f6a78242c04b4dcd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2349951
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
2020-08-13 21:13:53 +00:00
Shahbaz Youssefi e4e2a847da Entry points for ANGLE_external_objects_flags
Bug: angleproject:4912
Bug: fuchsia:52759
Change-Id: If339f096a74cc87d16a6494562711d718a7738ea
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2335019
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2020-08-05 09:20:36 +00:00
Jonah Ryan-Davis 4f7f438729 Add entry points for OES/EXT_texture_buffer
This extension is core in 3.2

Bug: angleproject:3573
Change-Id: If08736759da2fdc680cfa396d354dbfa97d1a60f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2317040
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-08-03 18:08:23 +00:00
Jamie Madill 308078b0ca Tests: Add getProcAddress method to GLWindowBase.
This will allow the Trace tests to load a custom GL after the GL
window has already loaded the default entry points.

Bug: angleproject:4845
Change-Id: Ic1b65b6cf1a582ea7c2f58a9f76077760e5cf0d8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2315626
Reviewed-by: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-07-27 18:47:27 +00:00
Maksim Sisov 62b11a476e X11: cast native display type to XDisplay.
This is required to have use_x11 && use_ozone builds at the same time.

Bug: chromium:1085700
Change-Id: I3d4cdf590e1ecf79af9e2d4bd585955c3f1b7af6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2315031
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2020-07-27 15:23:42 +00:00
Jamie Madill 6ca2c11624 Make trace tests a shared library.
This will facilitate intercepting the GL calls and implementing
emulation paths for offscreen redering. Or other EGL/GL features.
It does not yet override the GLES loader and uses the shared
'angle_util' loader as it did before.

Bug: angleproject:4845
Change-Id: I68806c307f59e1852999299e88dc358781817f12
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2305042
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-07-21 21:06:07 +00:00
Cody Northrop 6fe87f4a22 Tests: Change screen orientation for traces on Android
This CL adds a reverse JNI call to our Android Native Activity that
sets the orientation of the screen based on width and height.

To achieve this we:
* Attach to the java thread once at the beginning to grab JNI env.
* Detach from the thread once when platform sends APP_CMD_DESTROY
* Set the orientation during test init

Bug: angleproject:4327
Change-Id: Ifbe31a6a84dd60a0dfe7d7032962c99b290d8b81
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2289054
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2020-07-15 23:41:16 +00:00
Manh Nguyen e5c1847511 Multi-frames serialization + comparision for capture replay test
Changes how context states are serialized during capture run. Now,
context states are serialized after each frame until the end frame
is reached, or context is destroyed.

Adds an api to the trace files to query serialization results of
multiple frames. Makes change to CaptureReplayTest to serialize
multiple frames then compares the serialization results with the ones
retrieved from said api.

Adds to capture replay the ability to produce working, compilable trace
files even when end frame is not reached.

Adds to the generated trace files config information and makes
CaptureReplayTest utilize said config information to reproduce the exact
environment of the captured application.

Bug: angleproject:4817
Change-Id: Ie3d487af2bacf349dc3ff6f6b1b5f89e1169dc84
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2282885
Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-07-13 20:28:44 +00:00
Le Hoang Quyen 10ef43ce50 Fix end2end intermittent crash on macOS if custom OSWindow is used.
In MultisammpleTest, a custom OSWindow object is created. Sometimes this
window's internal Objective-C window object is not released after the
test finishes, thus input events such as mouse/keyboard are still
forwarded to this window. However its content view is already released
causing the crash.

call [mWindow setContentView:nil] inside OSXWindow::destroy() seems to
fix this bug.

Bug: angleproject:4815
Change-Id: If00398ff0082624ade5e8be8ad3b0f91d17c23ed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2281782
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-07-06 17:10:40 +00:00
Sylvain Defresne bae95f817a Convert GN libs lists to frameworks
GN recently added support for Apple frameworks to link, rather than
overloading the libs lists. This pulls .frameworks out of the libs
lists, so that GN can stop supporting .frameworks in libs in the
future.

Bug: chromium:1052560
Change-Id: I3aed298db01bdb5f6e7f37a74c1bbc06f99d760c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2279931
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2020-07-03 03:39:44 +00:00
Manh Nguyen dce37b7da8 Serialize framebuffers + compare contexts for CaptureReplayTests
Adds to frame capture the ability to serialize a frame's pre-swap
GL state and store it in the binary data file
Adds to CaptureReplayTests the ability to compare its serialized GL
state with the serialized state pulled from the binary data file
Adds a serialization module that serializes framebuffers' GL states
and the contents of their color attachments
Adds checks to automation script so that it would skips tests that
do not produce the expected trace files
Adds exception handling to automation script so that it will not crash
when a replay build crashes

Bug: angleproject:4779
Change-Id: I40a02e018073749e79f0ddbfd3d4065745548f46
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2258295
Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-07-02 21:37:40 +00:00
Manh Nguyen bdf91e5fb9 Refactor frame_capture_utils.h to frame_capture_test_utils.h
frame_capture_utils.h is only used in tests so changing the name to be
frame_capture_test_utils.h is more appropriate. Also
frame_capture_utils.h will now be a file in libANGLE_with_capture
library where serialization code is stored.

Bug: angleproject:4806
Change-Id: I7482693a75b2d0edda7e84ae9b777fd3f46f1855
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2273917
Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-06-29 19:58:59 +00:00
Manh Nguyen 9dee8e3f66 Automate testing of capture_replay
automation script will:
1. compile all tests in angle_end2end with framecapture enabled
2. run each test with frame capture
3. compile CaptureReplayTest with cpp trace files
4. Run CaptureReplayTest

Test: run_tests_with_framecapture.py
Bug: angleproject:4749
Change-Id: Ieb21c6137653632d73beedea48712e46fc15a0f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2246321
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Manh Nguyen <nguyenmh@google.com>
2020-06-19 18:32:58 +00:00
Kenneth Russell af72779224 Improve EGL_ANGLE_power_preference on dual-GPU MacBook Pros.
Add the ability to release and reacquire the high-power GPU, and to
respond to changes in the active GPU. In Chromium, the GPU process can
not access the WindowServer. An external process must inform ANGLE
that the active GPU has changed, and that ANGLE should switch its
internal context to the new GPU.

Incorporates a couple of functions from WebKit, used with permission,
to effect this GPU switch.

A follow-on change in Chromium which uses these new APIs will make the
existing dual-GPU tests pass with ANGLE and the passthrough command
decoder.

Carry forward Chromium's workaround of disabling GPU switching on
older MacBook Pros to ensure stability.

Document the process of adding new EGL extensions to ANGLE.

Bug: chromium:1091824
Change-Id: I499739156e851b493555d4d6e4aef87d8b97fa31
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2240638
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-06-12 23:38:22 +00:00
Geoff Lang 4e6f65459b GLX: Support X11 pixmaps
Add support for creating EGL pixmaps from X11 pixmaps using GLX.
Pixmaps are needed for various external APIs such as VAAPI.

Add support for EGL_NOK_texture_from_pixmap to allow binding
pixmaps to textures.

BUG=angleproject:4560

Change-Id: I4a6d3ad7e87151ff5317bbdaaf093ac1b46daf5f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2153805
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2020-06-12 21:41:11 +00:00
Jamie Madill 11e26fa006 Allow running Samples against native GL.
Useful for perf testing/comparison.

Bug: angleproject:4729
Change-Id: Ic46424570dcef0a30d506962f546910ba7440595
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241620
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-06-12 17:59:03 +00:00
Shahbaz Youssefi 15cff3122b Move lod-sampling shaders to shader utils
Will be reused in a test in a following change.

Bug: angleproject:2914
Change-Id: I4e255d5c762f2a6c064b06c558519d82ec6ead5f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2239085
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-06-12 01:51:29 +00:00
Jamie Madill aad69df92c Run TracePerfTests in WGL configs.
Uses the "native" naming pattern.

Bug: angleproject:4728
Change-Id: I28cafcdb8c5c1fb48bba51adeca641e88bfe3446
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241619
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-06-11 21:06:29 +00:00
James Darpinian 336e8915e8 Workaround broken copyTexImage2D on iOS
Use BlitGL to reimplement copyTex[Sub]Image2D on iOS.

Bug: angleproject:4674
Change-Id: Ie3018d6d33da57797162922410f76557124df4b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2222718
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-06-08 18:41:56 +00:00
Jamie Madill 0df92012a1 Rename Platform.h to PlatformMethods.h.
"platform.h" is too common a name and causes headers to be
included incorrectly. Disambiguate the header using a more
specific name.

Solves a problem that came up with the GLES 1 tests and the
standalone test harness.

Bug: angleproject:3162
Change-Id: I88229a2c9407e0db57f5beee44daa11a4075f700
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2229065
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2020-06-04 15:44:40 +00:00
Jamie Madill 5b35c7f6ef Fix up screenshot saving for trace tests.
Now works when run in a sequence. Also saves RGB images to avoid
issues with the alpha being inconsistent and also flips images
vertically to fix the rendering.

Bug: angleproject:4615
Change-Id: I8d3b38c5d914e0ca2227320ac42a0e28acd12c4d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2187971
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-05-07 20:18:41 +00:00
Jamie Madill d08f1d8dc0 Perf tests: Add screenshot capture mode.
This adds a "--screenshot-dir" argument to capture screenshots.
If we're running with screenshot capture then the test will
early exit after the first capture. The screenshots use the same
naming pattern as the test name:

TracePerfTest.Run/vulkan_trex_200 -> angle_vulkan_trex_200.png

Note the screenshot dir is relative to the test binary directory,
not the CWD. Also adds a PNG saving utility function.

Bug: angleproject:4615
Change-Id: I1de8ae6a6e6892586bb0b743e7b9a842f90f98e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2184834
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-05-07 15:34:49 +00:00
Jamie Madill 930b26417d Allow tests to run on native EGL.
Adds support for Linux and Android native EGL testing.
This can be useful for doing performance comparisons of ANGLE vs
a native GL driver. Only enabled for the trace perf tests due to
limitations in the test harness.

Bug: angleproject:4596
Change-Id: Iba6d3ccd7c1275cf095893fab824a0ea33dc3a79
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2116254
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2020-05-05 21:45:46 +00:00
Alexis Hetu 73bf99b716 Fix clearing the program's validation-related cache too early
When attempting to link a new program, the program must be marked
as unlinked, but the validation-related caching should not be
cleared yet, since we can still use the previously linked program
if linking fails at this point.

Added an angle end2end test which fails without this fix and
passes with this fix.

Fixes the following WebGL 1.0.4 test with SwANGLE:
conformance/programs/program-test.html

Bug: angleproject:3557
Change-Id: Ib6722ba88803979e8f292c9b7b81f85cc0304662
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2173538
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
2020-05-04 21:23:32 +00:00
Cody Northrop f623bd2e51 Tests: Add program pipeline object tests
This CL adds two program pipeline object (PPO) tests based on code
inspection during review.  They are both disabled awaiting fixes.

* The first (DetachAndModifyShader) tests a bug that shaders aren't
detached immediately on call.

* The second (DifferentTextureTypes) tests PPOs with mismatched
texture types. They should not link if the programs use a texture in
non-matching ways.

Test: ProgramPipelineTest31.DetachAndModifyShader*
Test: ProgramPipelineTest31.DifferentTextureTypes*
Bug: b/151462886
Bug: b/151449648
Bug: angleproject:3570
Change-Id: Ief0937397d31c972bf5e3a8d56b02d2dbd5a604b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2146997
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
2020-05-04 16:45:36 +00:00
Jamie Madill 2126a1071e EGLWindow: Clean up some init attribute code.
EGL_CONTEXT_OPENGL_DEBUG is only exposed as of EGL 1.5.
We can also now properly test for no_error extension strings.
Do not require backwards compatible context extensions.

Fixes parts of using EGLWindow to load native EGL drivers.

Bug: angleproject:4596
Change-Id: I4de8f492f265d29f6603ed1b35b123e362699c54
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2176271
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2020-05-04 15:48:47 +00:00
Jamie Madill 1c3e322cdb Work around strange git cl format issue.
For some reason this line of code confused git cl format
in that it would generate different results depending on when
it was called:

"PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC
   ANGLE_EGL_StreamConsumerGLTextureExternalAttribsNV;"

I wasn't able to root cause the bug. Instead I worked around
it by changing the signatures for this file.

Bug: angleproject:4596
Change-Id: I4f18e03d27d378480b19831de51c4e85d815ca66
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2176157
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
2020-05-01 19:42:36 +00:00
Jamie Madill 5540a3075e GL loaders: Add 'ANGLE' symbol prefix.
This should prevent debuggers like RenderDoc from getting confused
about symbol names. It's also generally good practice to avoid
overloading names.

Change-Id: Ie9fd3f77f45479bdf6925dae3e03fb4ac85bdb8a
Bug: angleproject:4596
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2171684
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-04-29 21:14:27 +00:00
Ancheng Qiao 78f2e4b831 Add gles1 covegl test compile
Covegl test is hard to suit gtest, so just compile it without gtest
(angle_gles1_covegl_no_gtest), we can get the test result by exit code.

Bug: angleproject:2303
Change-Id: I67a930c91f23c02e72022329c712a0749e4a903c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2126587
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-04-29 20:11:00 +00:00
Jonah Ryan-Davis 4b94d7bb4f Split EGL_CHROMIUM_sync_control into EGL_ANGLE_sync_control_rate
eglGetMscRateCHROMIUM was added to EGL_CHROMIUM_sync_control based
on the original extension GLX_OML_sync_control. However, this new
function is not universally implemented. This CL moves it to a new
extension, EGL_ANGLE_sync_control_rate, and renames it to
eglGetMscRateANGLE.

Bug: chromium:1064078
Change-Id: Ia2a29c6776b2b2bf2b98e58ee83b5f141ed01301
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2118154
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-03-31 20:55:48 +00:00
Cody Northrop b69c4e14c5 Capture/Replay: Update CaptureReplay sample for compression
* Move DecompressBinaryData to a shared helper
* Start using it in CaptureReplay sample
* Error out if decompress callback isn't set correctly

Test: AngryBirds and CandyCrush captures replay on desktop
Test: angle_perftests --gtest_filter="*Trace*"
Bug: angleproject:4484
Change-Id: I0432004fdb0cfb0fd61f9a66f792591c9aa40d9b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2118790
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-03-25 22:00:09 +00:00
Geoff Lang 07467b4aca Remove GL_CHROMIUM_path_rendering
Bug: chromium:1063193
Bug: angleproject:4270
Change-Id: I35b24b7d8d892181955e49dd2495655bc57cb0df
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112275
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-03-20 19:13:16 +00:00
Jamie Madill 32c1bf5429 Remove util.gni.
This file was no longer referenced and is dead code.

Bug: None
Change-Id: Id4469b9575a14e31c6f715c2d290f2f8945cd25b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2110331
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-03-20 16:07:43 +00:00
Jamie Madill 5df2c9ea83 Refactor ANGLE common test utils.
This reduces code duplication by including a common set of sources in a
single place. New test sets will be a bit easier to add. It also
encapsulates the dependencies a bit better when we pull the test utils
out of the test targets.

Unblocks a follow-up CL that moves the trace perf test sources into
their own file so we can re-enable optimizations in the main perf test
target.

New warnings popped up in a few of the files because of the new source
set enabling more warnings. This CL also fixes all of those.

Bug: angleproject:3630
Change-Id: Ic30cb30fb4288c4dbbbd29f9bdf04be51e8a6b30
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2103083
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2020-03-16 22:16:46 +00:00
Courtney Goeltzenleuchter b1b6a171ee Vulkan: Disable robustness support
Swiftshader does not currently have the ability to behave in a way
for ANGLE to support KHR_robustness. Disable for now until that
functionality is available.

Bug: angleproject:3058
Bug: swiftshader:145
Change-Id: I1c1b8147f6b9cf6f8d0da633dfe0f61ebfab5175
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2097053
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
2020-03-13 12:33:44 +00:00
Jamie Madill 80f55e9742 Expose glGetInteger64vEXT.
This entry point is specifically for retrieving very large timestamp
values from EXT_disjoint_time_query. In GLES 2.0 contexts with the
Vulkan back-end we were getting some astronomical values that couldn't
be cast to 32-bit ints.

Also fix missing dependencies in generate_loader.py.

Bug: angleproject:4433
Change-Id: I59146dcc1a163a24ac2d7c37546f4551a7a8890a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2080595
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-03-03 02:01:39 +00:00
Alexey Knyazev 51a9da21ff Add OES_draw_buffers_indexed autogenerated wrappers and validation redirects.
This extension allows setting independent blend state (and color write mask) for each draw buffer. OES and EXT versions provide exactly the same functionality. It is also included in GLES 3.2 core.

Bug: angleproject:4394
Change-Id: I0c27c419472622e309a038dd1463fa0b3e4ca595
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2078587
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-03-02 21:38:09 +00:00
Michael Spang 468dfed31d Reformat GN files
Otherwise this blocks the CQ at presubmit.

Bug: angleproject:3492
Change-Id: I3cf77c72daa358f5e1eabecf1dcb8808a1dc9e07
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2068538
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-02-21 23:37:44 +00:00
Jamie Madill ce4918f18f Vulkan: Sanitize Images & Buffers with non-zero values.
Only enabled for specific tests at the moment. This CL allows our tests
to sanitizes memory for the robust resource access extension. It is
quite slow so should not be enabled by default.

Only works for 1 level 2D color textures and buffers. Makes several
flaky robust resource initialization tests consistently fail.

Controlled via an angle::Feature in FeaturesVk.

It works by initializing memory to an abitrary non-zero value:

 - if newly allocated memory is mappable, we map it in init and set it
 - if a buffer or texture can be a transfer destination, we use a
   staging resource
 - otherwise we don't attempt to initialize the resource.

Bug: angleproject:4384
Change-Id: I9b4f347bfcddf3096f491ed0243bef86837feaa0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2043271
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-02-21 00:09:27 +00:00
Michael Spang dec00bc833 Generate entrypoints for Fuchsia external objects extensions
Add GL_ANGLE_memory_object_zircon_handle &
GL_ANGLE_semaphore_zircon_handle extensions to supported extensions list
and re-generate bindings.

Bug: angleproject:2475
Change-Id: I464aa402aaac916c1f459930c771a0813ec63c9b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1642333
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-02-20 23:44:31 +00:00
Wez bb654cf8c3 [fuchsia] Migrate to SDK-provided FIDL & package targets.
Bug: chromium:1050703
Change-Id: I7c031f4501b567fde117c30b25f0bc071d4acc44
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2058948
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-02-20 15:18:36 +00:00
Jamie Madill 74ab0bffb5 Vulkan: Disable command graph by default.
Also removes the angle_end2end_tests feature override.

Bug: angleproject:4029
Change-Id: I0d0bd087fc2143360185592d9fa1238a9bafc55d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2046054
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-02-12 23:31:18 +00:00
Jamie Madill 8257ac3051 Vulkan: Defer RenderPass image barriers.
We accumulate image barriers in two places:

 * for GL sampler textures
 * for GL framebuffer attachments (Render Targets)

Then we issue the barriers together in a single call before the RP.
This fixes a bug where we were missing a layout transition in some
cases when transitioning between a sampler and a render target. It
should also be faster to issue a single barrier before a RP than issue
several smaller barriers.

Bug: angleproject:3539
Bug: angleproject:4029
Change-Id: I180b770f0df6b44d209e5c618ba36bcc1c6372e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2044236
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-02-10 21:14:28 +00:00
Michael Spang 36f2c80acb Fuchsia: Fix size & position of test window on Scenic
Scenic places our window in with its center in the corner if we don't
apply any translation. Therefore we only see 1/4 of the surface.

Translate the surface so the full size is visible. Also account for
display scaling as we're sizing in pixels and scenic is sizing in
density independent pixels.

Bug: angleproject:4382
Test: angle_end2end_tests
Change-Id: I1ae0b877c0ed7cf9d810bb2c8317b9842bd322a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1716226
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-02-06 21:08:30 +00:00
Michael Spang a8c7e10f5e Fuchsia: Switch ScenicWindow to use PresentOrReplaceView
This avoids a deprecation warning:

[01253.076] [WARNING:src/ui/bin/root_presenter/app.cc(109)] Using multiple presentations is deprecated. Call PresentOrReplaceView() to force replacement of current presentation.

Bug: angleproject:4360
Change-Id: Icb1898ee542bde8c26a2dcd55c783372fc8ae7c1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2027935
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-02-01 00:44:28 +00:00
Michael Spang f63fbcd5f2 Fuchsia: Limit number of concurrent presents in ScenicWindow
The test suite occasionally runs into the following error:

[02036.794449][326733][326738][klog] INFO: [ERROR:src/ui/scenic/lib/scenic/session.cc(412)] Scenic session error (session_id: 1): Present2() called with no more present calls allowed. Terminating session.

This is actually a problem with the test harness as resetting the window
triggers a present with no fences and no OnFramePresentedCallback which
means there is no way to know if we will exceed the limit.

Add an OnFramePresentedCallback and count presents to stay under the
limit. This blocks if there's more than 2 in flight presents. A dedicated
async loop is used to avoid re-entering other code while waiting to
present (there is no such case in the ANGLE test suite currently, but
better safe than sorry).

Typically if we run the whole suite there will be a failure in the
middle, but re-trying the test that failed won't repro the issue. Add a
test that reliably exhausts the limit by calling resetNativeWindow() in a
loop.

Bug: angleproject:4360
Change-Id: I24eb01fd72fc0be57c36e49b5875023a80d6ab91
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2027934
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-02-01 00:23:23 +00:00
Jonah Ryan-Davis 1a1a1427fd Expose eglGetMscRateCHROMIUM from EGL_CHROMIUM_sync_control
When ANGLE is using the GL backend on GLX, we can expose
eglGetMscRateCHROMIUM via glXGetMscRateOML. Otherwise, this function
should return false.

Bug: chromium:1042393
Change-Id: Id9b308c2217e07ee9860e2869be0e23b7a0c7411
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2017048
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-01-27 19:30:45 +00:00
Jamie Madill c67252eaf7 Add feature flags to EGLPlatformParameters "tie".
The missing flags were causing the configs to be reused and improperly
tested. Noticed when working with the Vulkan command graph feature.

Bug: angleproject:4029
Change-Id: I2fea73fc0637d1adbf73577eb5dfcfa4a759c066
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2019503
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-01-24 18:20:29 +00:00
Michael Spang abaeb415ea Vulkan: Fix setupDraw when VK_EXT_transform_feedback is not enabled
There's no dirty bit handler if VK_EXT_transform_feedback disabled, but
we're setting that dirty bit in syncState. This results in calling a null
method pointer. Skip the invalidate if the extension is not enabled.

    gl::LogMessage::~LogMessage() at ./../../third_party/angle/src/common/debug.cpp:0
    rx::ContextVk::setupDraw(gl::Context const*, gl::PrimitiveMode, int, int, int, gl::DrawElementsType, void const*, angle::BitSetT<11ul, unsigned long, unsigned long>, rx::vk::priv::SecondaryCommandBuffer**) at ./../../third_party/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp:844
    rx::ContextVk::drawArrays(gl::Context const*, gl::PrimitiveMode, int, int) at ./../../third_party/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp:1698
    gl::Context::drawArrays(gl::PrimitiveMode, int, int) at ./../../third_party/angle/src/libANGLE/Context.inl.h:112
    gl::DrawArrays(unsigned int, int, int) at ./../../third_party/angle/src/libGLESv2/entry_points_gles_2_0_autogen.cpp:926
    (anonymous namespace)::AttributeLayoutNonIndexed::Draw(int, unsigned int, unsigned short const*) at ./../../third_party/angle/src/tests/gl_tests/AttributeLayoutTest.cpp:431
    (anonymous namespace)::AttributeLayoutTest::Run(bool) at ./../../third_party/angle/src/tests/gl_tests/AttributeLayoutTest.cpp:305

[This stack is from the added assert; calling a null function pointer
crashes without producing a useful stack trace.]

Bug: angleproject:4326
Change-Id: I036ae322bddc4865229fa3fe7ea72a4344b99f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2011408
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-01-23 00:35:57 +00:00
Jamie Madill 62475e95da Allow tests to pick ANGLE features.
This uses the EGL_ANGLE_feature_control extension through the test
harness to control feature selection via a test config. This obviates
the need for the hacky platform methods table override.

Also adds a command graph feature that will be used to prototype the
command graph linearization for Vulkan.

Bug: angleproject:4029
Change-Id: Id37fadd5d2c317c9d9dd90dfab1fdc8e4ac3701f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2007612
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2020-01-20 21:45:20 +00:00
Jamie Madill 5eadaf85b4 Fix and improve UWP build.
Reorganizes the build files to work with a more divided setup. It is
unclear if we'll ever be able to run tests in a UWP config. This at
least sets up the organization so it would at some point be possible.

Bug: angleproject:4182
Change-Id: I49dddfcdc0118b11466fe171f949c28d101ac6a2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1953484
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2020-01-14 15:17:24 +00:00
Jamie Madill 683dd1d6a8 GN: Move util build code into util/BUILD.gn.
Prepratory clean up for WinUWP support.

Bug: angleproject:4182
Change-Id: I97cc6cb42a50c6b57ca7d375d1e0a6b3da7aa9d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1998673
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2020-01-14 15:05:34 +00:00
Jeff Vigil 3311ef6568 update date comments to 2020
run_code_generation.py updated comments with 2019 to 2020.
Put all date updates into this one CL.
This also updated hashes.

Bug: angleproject:4262
Change-Id: Ia213dd5e47f155986cbb4161d777724355878af0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1986994
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-01-06 16:25:35 +00:00
Jamie Madill 5407aaa089 Re-land "Add new test runner harness." (#2)
Re-land #2 changes:

 * export labels are fixed for the CFI build
 * crash test disabled because of flakiness and issues with asan

Re-land changes:

 * Unit test is suppressed in ASAN
 * --deqp-case is fixed
 * Debug layer errors should correctly work with failure expectations

Original message:

The ANGLE test harness is a harness around GoogleTest that provides
functionality similar to the Chromium test harness. It supports:

 * splitting a test set into shards
 * catching and reporting crashes and timeouts
 * outputting to the Chromium JSON test results format
 * multi-process execution

Unit tests are added in test_utils_unittest.cpp.

Bug: angleproject:3162
Bug: chromium:1030192
Change-Id: I71d66a407ea0e53d73cbe75b5b4bfb9e73791534
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965091
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-12-16 23:52:35 +00:00
Jamie Madill 9190f49cff GN: Make new angle_test_utils target.
This source set target lets other targets import the test utils without
needing to export them. They get built into angle_util. They also get
compiled into the various tests and samples. The change also fixes
export issues.

Moves some of the GN logic into the util/ subfolder.

Bug: angleproject:3162
Bug: chromium:1030192
Change-Id: If99d201092ad8541c0de60b3bd893ac9b5875270
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1968259
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-12-16 22:35:05 +00:00
Jamie Madill 270e2e8819 util: Always export default visibility.
This should fix the CFI build compatibility with class exports.

Bug: chromium:1030192
Bug: angleproject:3162
Change-Id: I228d6d387f8b29c0a500038de962f9f216454d7a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1964933
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-12-12 21:23:03 +00:00
Jamie Madill b92ec2443f Revert "Re-land "Add new test runner harness.""
This reverts commit e20560faf1.

Reason for revert: Now fails on Linux CFI and also is a bit flaky.

Original change's description:
> Re-land "Add new test runner harness."
> 
> Re-land changes:
> 
>  * Unit test is suppressed in ASAN
>  * --deqp-case is fixed
>  * Debug layer errors should correctly work with failure expectations
> 
> Original message:
> 
> The ANGLE test harness is a harness around GoogleTest that provides
> functionality similar to the Chromium test harness. It supports:
> 
>  * splitting a test set into shards
>  * catching and reporting crashes and timeouts
>  * outputting to the Chromium JSON test results format
>  * multi-process execution
> 
> Unit tests are added in test_utils_unittest.cpp.
> 
> Bug: angleproject:3162
> Change-Id: I841f2b5dfe51f7f44dac68324bdf6afd418b8bfb
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1948240
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>

TBR=ynovikov@chromium.org,ianelliott@google.com,jonahr@google.com,jmadill@chromium.org

Change-Id: Ibfd65b8b18ead3a232abb6cb75fd6489b0ff5f38
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3162
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1954570
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-12-06 15:09:04 +00:00
Jamie Madill e20560faf1 Re-land "Add new test runner harness."
Re-land changes:

 * Unit test is suppressed in ASAN
 * --deqp-case is fixed
 * Debug layer errors should correctly work with failure expectations

Original message:

The ANGLE test harness is a harness around GoogleTest that provides
functionality similar to the Chromium test harness. It supports:

 * splitting a test set into shards
 * catching and reporting crashes and timeouts
 * outputting to the Chromium JSON test results format
 * multi-process execution

Unit tests are added in test_utils_unittest.cpp.

Bug: angleproject:3162
Change-Id: I841f2b5dfe51f7f44dac68324bdf6afd418b8bfb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1948240
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-12-05 20:08:07 +00:00
Jamie Madill 8f31872c85 Revert "Add new test runner harness."
This reverts commit fb40d231c3.

Reason for revert: Has a bug with the ASan build and also has a few
bugs with ANGLE standalone test expectations an filter.

Bug: chromium:1030192
Bug: angleproject:4193

Original change's description:
> Add new test runner harness.
> 
> The ANGLE test harness is a harness around GoogleTest that provides
> functionality similar to the Chromium test harness. It supports:
> 
>  * splitting a test set into shards
>  * catching and reporting crashes and timeouts
>  * outputting to the Chromium JSON test results format
>  * multi-process execution
> 
> Unit tests are added in test_utils_unittest.cpp.
> 
> Bug: angleproject:3162
> Change-Id: Idb15f113de8eb32db12bc93542de93b08d7c1447
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1478016
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>

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

Change-Id: I647e747571784b1ca7c1d0687193c70a63eb08d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3162
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1947456
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-12-03 18:35:07 +00:00
Jamie Madill fb40d231c3 Add new test runner harness.
The ANGLE test harness is a harness around GoogleTest that provides
functionality similar to the Chromium test harness. It supports:

 * splitting a test set into shards
 * catching and reporting crashes and timeouts
 * outputting to the Chromium JSON test results format
 * multi-process execution

Unit tests are added in test_utils_unittest.cpp.

Bug: angleproject:3162
Change-Id: Idb15f113de8eb32db12bc93542de93b08d7c1447
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1478016
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-12-02 23:01:53 +00:00
Shahbaz Youssefi 745999a976 Add test for multithreaded shared-context resource
The test does this:

1. Context 1: Read Texture 1 and draw into Framebuffer 1
2. Context 2: Read Texture 1 and draw into Framebuffer 2
3. Context 1: Delete Framebuffer 1
4. Context 1: Flush
5. Context 2: Modify Texture 1

Issue is Texture 1's mCurrentReadingNodes contains one node from each
context's command graph, one of which is deleted at step 4. At step 5, a
dependency is added from both nodes (one already deleted) to a new node,
causing use-after-free.

Bug: angleproject:4130
Change-Id: I06720aec20d0b49114937f1cd9b193a4f1df9d8d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1924790
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-12-02 20:18:03 +00:00
Felipe Archondo f65b212492 [fuchsia] Change all Angle Presents to Present2s
Bug: fuchsia:41855
Change-Id: Ia754c61c0ff7256781d9bf7d97b77e3bda1b01e9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1935327
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
2019-11-25 23:58:48 +00:00
Ethan Lee a825eb70cc Implement BaseVertex draw calls for Vulkan, OpenGL, NULL contexts.
This adds support for the following functions:

- glDrawElementsBaseVertex
- glDrawRangeElementsBaseVertex
- glDrawElementsInstancedBaseVertex

Bug: angleproject:3582
Bug: angleproject:3402
Bug: angleproject:4166
Change-Id: I83770f62e3a918c0965fd4ca8c7d9e598b8b4154
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1929083
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-11-25 21:27:58 +00:00
Emircan Uysaler e9b68f332a Clean unused NewCreateImagePipeCmd
This call is to be deprecated.

Bug: angleproject:3905
Change-Id: Iffca3a3bee4d0ff930598635a27592e068696bbf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1925032
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Michael Spang <spang@chromium.org>
2019-11-23 00:08:49 +00:00
Jamie Madill d32650bb9e Posix: Fix async LaunchProcess.
The prior method was only checking for a PID's existance. We should
also check for zombie process states. This allows our child process
launcher to correctly determine when a process is done on Linux and
other Posix systems.

Also starts the test timer on Posix LaunchProcess implementations.

Also removes the need to end command line arg lists with nullptr.

Also removes some Fuchsia-specific preprocessor checks.

Also adds a regression test.

Bug: angleproject:3162
Change-Id: I5725a8a0e8c5151f2d3e06df0a36dd64c0e0ee69
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1928873
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-11-22 23:01:19 +00:00
Le Hoang Quyen 6fcc0bb833 Metal: Re-add end2end test configs (running test is still disabled)
angle_test_instantiate.cpp & angle_test_instantiate_apple.mm:
- Disabled metal platform selection on pre-10.13 mac devices for
Bug: angleproject:4153

Explicitly disabled tests on metal:
- DifferentStencilMasksTest.DrawWithDifferentMask
- PointSpritesTest.PointSizeAboveMaxIsClamped
- WebGL2ReadOutsideFramebufferTest.CopyTexSubImage3D

This requires the crash fix in http://crrev.com/c/1924101

Bug: angleproject:4153
Bug: angleproject:2634
Change-Id: I95046d731a8ba7414cf1a1f4b6f2940282725872
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1926389
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-11-21 22:10:38 +00:00
Courtney Goeltzenleuchter 8392b11814 Revert "Metal: Enable end2end tests."
This reverts commit 0bb42e091b.

Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1026633

Causing failures on Mac bots.

Original change's description:
> Metal: Enable end2end tests.
> 
> Explicitly disabled tests:
> - DifferentStencilMasksTest.DrawWithDifferentMask
> - PointSpritesTest.PointSizeAboveMaxIsClamped
> - WebGL2ReadOutsideFramebufferTest.CopyTexSubImage3D
> 
> Bug: angleproject:2634
> Change-Id: I76ab450c06d0e1be1e7469a8b9c6497684c3ca54
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1906607
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=geofflang@chromium.org,jonahr@google.com,jmadill@chromium.org,le.hoang.q@gmail.com

Change-Id: Iaa4264834170a49c274f186d3d74f57714c84b32
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2634
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1926378
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2019-11-20 16:57:16 +00:00
Le Hoang Quyen 0bb42e091b Metal: Enable end2end tests.
Explicitly disabled tests:
- DifferentStencilMasksTest.DrawWithDifferentMask
- PointSpritesTest.PointSizeAboveMaxIsClamped
- WebGL2ReadOutsideFramebufferTest.CopyTexSubImage3D

Bug: angleproject:2634
Change-Id: I76ab450c06d0e1be1e7469a8b9c6497684c3ca54
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1906607
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-11-20 11:21:56 +00:00
Jamie Madill 82fd2540c5 Windows: Use Job handle in LaunchProcess.
This forces all child processes to quit when the parent process is
unexpectedly terminated.

Disabled on Windows 7 because it seems to fail with assinging the
process to the job object. Possibly because of permission conflicts
with the Chromium base/test launcher.

Bug: angleproject:3162
Change-Id: I35f1c1ac5c802904b9b7220cab1bafce1ae0ea15
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1862989
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-11-11 19:10:41 +00:00
Jamie Madill f18ff94736 Minor tweaks to SampleApplication.
Removes an unreferenced function. Also adds the ability for samples to
respond to key up and down events. Only implemented on Windows.

Bug: angleproject:2830
Change-Id: I44c9f93f0ad07b92923ffc0efa580f97d9b98693
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1908448
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-11-11 15:39:38 +00:00
Jamie Madill c898ec1a5e Add EGL GGP extensions.
This CL adds two new extensions:

 * EGL_ANGLE_ggp_stream_descriptor:
    Introduces a new attribute to CreateWindowSurface. Allows the app
    to pass in a stream descriptor to VkCreateSurfaceKHR.
    Mirrors VK_GGP_stream_descriptor_surface.

 * EGL_ANGLE_swap_with_frame_token:
    Introduces a new function 'eglSwapBuffersWithFrameTokenANGLE'. This
    allows the app to pass a GGP frame token down to vkQueuePresentKHR.
    Mirrors VK_GGP_frame_token.

Bug: angleproject:4078
Change-Id: I4313ac4c264e68999905049f661bc64b44f72fab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1897315
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-11-05 01:50:17 +00:00
Jamie Madill 95a736bd33 Reland "Add more test_utils functions."
This is a reland of 5fcfcea4a9

Re-land uses static linking with angle_util. The root cause
of the CFI error wasn't solved. Static linking works around
the problem by not using any export rules.

Second re-land fixes missing imports for libEGL and libGLESv2
static varieties.

Original change's description:
> Add more test_utils functions.
>
> Includes methods for creating temporary files, deleting files, and
> reading files into a string. Also renames GetPathSeparator to mention
> it's only used for environment variables. Includes a new virtual type
> angle::Process that will be used to implement cross-platform async
> Process launching for tests. Also includes a way to specify a custom
> crash handler callback.
>
> Also adds a few unit tests for the new functionality. They are disabled
> on Android because the functions are not needed by the new test runner.
>
> Bug: angleproject:3162
> Change-Id: I3e2c2e9837608884c98379fa0f78c9ffbe158d73
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821940
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>

Bug: chromium:1015810
Bug: angleproject:3162
Change-Id: I2a18b819b0f91df610ad12ffedea2b38349fe7cf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879859
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-10-26 15:49:19 +00:00
Jamie Madill 04ee27efff Capture/Replay: Add ANGLE_get_image extension.
Will be used for mid-execution capture. Only has a
stubbed-out implementation right now.

Bug: angleproject:3944
Change-Id: I6ddae07907ecbdbd3be9a5d2d3fcafeb425445e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1878888
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-10-25 19:02:16 +00:00
Jamie Madill 16370a65a4 Enable "-Winconsistent-missing-destructor-override".
This is purely a code style and consistency warning. Enabled to
support building in Skia.

Bug: angleproject:4046
Change-Id: Ibdcd06ded0195123e52c693851c43d0864e54ad1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877480
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-25 11:40:36 +00:00
Jamie Madill a620685467 Enable "-Wmissing-field-initializers".
This is another warning required by Skia. This one didn't find
anything that surprising. Enabling the warning does help enforce
code consistency and avoids a bit of possible undefined behaviour.

Bug: angleproject:4046
Change-Id: Ifec7f4afad49cd820bf3c0a79df3f46559473ee2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877477
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-25 00:23:31 +00:00
Jamie Madill 1efcbdb62f Vulkan: Fix sampler object lifetime.
Using the same scheme as we do for VkImageViews we can track VkSampler
lifetime using SharedResourceUse. This fixes the race condition that
could occur when samplers are deleted in one Context while being used
in another.

This fixes the last known resource lifetime issue. The multithreading
tests should now pass without validation errors.

Also adds regression tests to angle_end2end_tests.

Bug: angleproject:2464
Change-Id: I9dbed5062a0863b240ddf1a9b5d28560334934de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869548
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
2019-10-23 03:24:30 +00:00
Jamie Madill f939cb63fd Revert "Reland "Add more test_utils functions.""
This reverts commit 7923e234bc.

Reason for revert: Fails compilation on rollers:

    [2097/6048] SOLINK ./lib_angle_unittests__library.cr.so
    FAILED: lib_angle_unittests__library.cr.so lib_angle_unittests__library.cr.so.TOC lib.unstripped/lib_angle_unittests__library.cr.so
    python "../../build/toolchain/gcc_solink_wrapper.py" --readelf="../../third_party/android_ndk/toolch...(too long)
    ld.lld: error: undefined symbol: glCreateShader
    >>> referenced by shader_utils.cpp
    >>>               angle_util_static/shader_utils.o:(CompileShader(unsigned int, char const*)) in archive obj/third_party/angle/libangle_util_static.a
    
    ld.lld: error: undefined symbol: glShaderSource

Original change's description:
> Reland "Add more test_utils functions."
> 
> This is a reland of 5fcfcea4a9
> 
> Re-land uses static linking with angle_util. The root cause
> of the CFI error wasn't solved. Static linking works around
> the problem by not using any export rules.
> 
> Original change's description:
> > Add more test_utils functions.
> >
> > Includes methods for creating temporary files, deleting files, and
> > reading files into a string. Also renames GetPathSeparator to mention
> > it's only used for environment variables. Includes a new virtual type
> > angle::Process that will be used to implement cross-platform async
> > Process launching for tests. Also includes a way to specify a custom
> > crash handler callback.
> >
> > Also adds a few unit tests for the new functionality. They are disabled
> > on Android because the functions are not needed by the new test runner.
> >
> > Bug: angleproject:3162
> > Change-Id: I3e2c2e9837608884c98379fa0f78c9ffbe158d73
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821940
> > Commit-Queue: Jamie Madill <jmadill@chromium.org>
> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
> 
> Bug: chromium:1015810
> Bug: angleproject:3162
> Change-Id: I6a2c1e7b585a13ca846759f32da0777c00d7f7e6
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869541
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

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

Change-Id: I975b2214411906cb981bffa04fa50e0a65ff8b4e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1015810, angleproject:3162
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1870811
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-20 21:44:47 +00:00
Jamie Madill 7923e234bc Reland "Add more test_utils functions."
This is a reland of 5fcfcea4a9

Re-land uses static linking with angle_util. The root cause
of the CFI error wasn't solved. Static linking works around
the problem by not using any export rules.

Original change's description:
> Add more test_utils functions.
>
> Includes methods for creating temporary files, deleting files, and
> reading files into a string. Also renames GetPathSeparator to mention
> it's only used for environment variables. Includes a new virtual type
> angle::Process that will be used to implement cross-platform async
> Process launching for tests. Also includes a way to specify a custom
> crash handler callback.
>
> Also adds a few unit tests for the new functionality. They are disabled
> on Android because the functions are not needed by the new test runner.
>
> Bug: angleproject:3162
> Change-Id: I3e2c2e9837608884c98379fa0f78c9ffbe158d73
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821940
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>

Bug: chromium:1015810
Bug: angleproject:3162
Change-Id: I6a2c1e7b585a13ca846759f32da0777c00d7f7e6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869541
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-20 21:15:05 +00:00
Jamie Madill 0163470450 Revert "util: Always specify default visibility on exports."
This reverts commit 2bf23ea84e.

Reason for revert: Probably not the right fix. Will export
all angle_utils symbols in places where they shouldn't be.

Original change's description:
> util: Always specify default visibility on exports.
> 
> This fixes undefined behaviour with CFI.
> 
> Bug: chromium:1015810
> Bug: angleproject:3162
> Change-Id: I58cfb78adabbff05e5b4560dfd70b190411fa26d
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869303
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>

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

Change-Id: Ie847a9e6506178eb2b14e63a1ee5e9a1775b4548
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1015810, angleproject:3162
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869546
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-20 13:15:25 +00:00
Jamie Madill 2bf23ea84e util: Always specify default visibility on exports.
This fixes undefined behaviour with CFI.

Bug: chromium:1015810
Bug: angleproject:3162
Change-Id: I58cfb78adabbff05e5b4560dfd70b190411fa26d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869303
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-19 13:36:22 +00:00
Lan Wei 0cb09633d6 Revert "Add more test_utils functions."
This reverts commit 5fcfcea4a9.

Reason for revert:
1 Test Suite(s) failed. angle_unittests failed because of:
TestUtils.RunApp on Linux CFI
https://ci.chromium.org/p/chromium/builders/ci/Linux%20CFI


Original change's description:
> Add more test_utils functions.
> 
> Includes methods for creating temporary files, deleting files, and
> reading files into a string. Also renames GetPathSeparator to mention
> it's only used for environment variables. Includes a new virtual type
> angle::Process that will be used to implement cross-platform async
> Process launching for tests. Also includes a way to specify a custom
> crash handler callback.
> 
> Also adds a few unit tests for the new functionality. They are disabled
> on Android because the functions are not needed by the new test runner.
> 
> Bug: angleproject:3162
> Change-Id: I3e2c2e9837608884c98379fa0f78c9ffbe158d73
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821940
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>

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

Change-Id: I1441bfbae31712f72b4aebeeea9cd711c3975a5d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3162
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869254
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-18 18:18:19 +00:00
Jamie Madill 5fcfcea4a9 Add more test_utils functions.
Includes methods for creating temporary files, deleting files, and
reading files into a string. Also renames GetPathSeparator to mention
it's only used for environment variables. Includes a new virtual type
angle::Process that will be used to implement cross-platform async
Process launching for tests. Also includes a way to specify a custom
crash handler callback.

Also adds a few unit tests for the new functionality. They are disabled
on Android because the functions are not needed by the new test runner.

Bug: angleproject:3162
Change-Id: I3e2c2e9837608884c98379fa0f78c9ffbe158d73
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821940
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-10-17 19:57:45 +00:00
James Darpinian c42da4e57c Extend ANGLE_request_extension with DisableExtension
ARB_texture_rectangle is the only currently supported disablable
extension. This allows us to use ARB_texture_rectangle in WebGL
implementations without exposing it to WebGL user shaders.

Bug: angleproject:3956
Bug: angleproject:3770
Change-Id: I80b10d2e9c9feebe545ce15195721487165ecc51
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1838418
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-10-12 00:42:21 +00:00
Brian Sheedy cc4d833180 Reland "Add export_targets.py to presubmit"
This is a reland of c40a21f353

Changes: Fixed presubmit failing on Windows due to being unable

to find gn, fixed export_targets.py failing on Windows for

Googlers due to being unable to find Visual Studio files.

Original change's description:
> Add export_targets.py to presubmit
>
> Adds export_targets.py to run as part of presubmit in order to help
> prevent breaking Firefox with BUILD.gn changes.
>
> Bug: chromium:1003151
> Change-Id: I5a7ab00891cd7c094c797e6150f642f803a726b6
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1802038
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>

Bug: chromium:1003151
Change-Id: I321ade86f2d969601afb8e1ed61c36bf166887b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1842127
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-07 18:44:27 +00:00
Jamie Madill a424214638 Revert "Add export_targets.py to presubmit"
This reverts commit c40a21f353.

Reason for revert: Seems to be failing locally on Windows.
See bug for more info.

Original change's description:
> Add export_targets.py to presubmit
> 
> Adds export_targets.py to run as part of presubmit in order to help
> prevent breaking Firefox with BUILD.gn changes.
> 
> Bug: chromium:1003151
> Change-Id: I5a7ab00891cd7c094c797e6150f642f803a726b6
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1802038
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>

TBR=ynovikov@chromium.org,bsheedy@chromium.org,jgilbert@mozilla.com,jmadill@chromium.org

Change-Id: Ic9a2eb58d847a40349e64b931c369f07c24b799c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1003151
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1841877
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-04 18:57:49 +00:00
Brian Sheedy c40a21f353 Add export_targets.py to presubmit
Adds export_targets.py to run as part of presubmit in order to help
prevent breaking Firefox with BUILD.gn changes.

Bug: chromium:1003151
Change-Id: I5a7ab00891cd7c094c797e6150f642f803a726b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1802038
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-10-04 18:21:14 +00:00
Jamie Madill 57b37b6b79 Rename util/system_utils to util/test_utils.
This removes a GN naming conflict between util/system_utils and
common/system_utils. This conflict was preventing us from adding
unit tests to utils' version of system_utils. Since these functions are
only useful to tests and samples rename them test_utils for simplicity.

Will enable further development of ANGLE's standalone testing harness.

Bug: angleproject:3162
Change-Id: I9e34fb69f96c5de6dc2453fce4148a0f285e15ed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1825268
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-09-27 21:47:21 +00:00
Austin Kinross 11dc16350c Add support for generating UWP (Windows Store) projects again
Until late 2017, ANGLE supported  Windows Store apps on Windows 8.1,
Windows Phone 8.1, and Windows 10 (via the Universal Windows
Platform, aka UWP).

Unfortunately ANGLE deprecated support for Windows Store when it
switched from GYP to GN in 2017. Since then, users have been able
to use Microsoft\angle for their UWP apps but this isn't ideal since
it's based on a 2017 copy of Google\angle.

This PR bring back support for UWPs, so that UWP users can use
Google\angle again. Specifically it:

- Adds support for generating UWP projects via GN
- Adds helper/util functions specific to UWP (they're mostly
similar to the desktop Windows helpers)
- Fixes some existing Windows Store code that's rotted since 2017
- Disables async shader compilation for UWPs, since its
implementation calls wait on the UI thread (which is forbidden
in UWPs)
- Renames 'ANGLE_ENABLE_WINDOWS_STORE' to
'ANGLE_ENABLE_WINDOWS_UWP', since ANGLE only support UWPs now
- Fixes misc other related issues (such as dependencies on D3D9
headers in API-agnostic code)

Note that this doesn't bring back support for Windows/Phone 8.1.

BUG=angleproject:3922

Change-Id: Ia79ae05a5e0e0a0625eb633bf1928722dfd3e85f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1811871
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-09-20 18:08:01 +00:00
Emircan Uysaler 1552d4d6fb Move to NewCreateImagePipe2Cmd
Bug: angleproject:3905
Change-Id: Id237c049848077acee8eaf491f7aada636764290
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1802535
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
2019-09-13 04:11:08 +00:00
Mingyu Hu 7e44ec26d6 GL_EXT_multisampled_render_to_texture extension. Part 1.
Adding new parameters for extension without adding any real code change. Since no new code paths were added, we expect all tests to pass as before.

Bug: angleproject:980428
Change-Id: I551b46a66f422eabd357fd021e00cf266a991efb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1772377
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-09-04 19:37:30 +00:00
Todd Eisenberger a1bf69967a Fuchsia: Migrate to new libasync-loop API
Bug: None
Change-Id: Ieadbe830847068c8e9dc96773dbb9b65c8b9ccd8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1783418
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
2019-09-04 01:47:02 +00:00
Jamie Madill 44a0e73431 Re-enable -Wextra-semi-stmt.
Now that the DEPS roller is fixed this should not be able to
break the CQ.

Bug: angleproject:3128
Change-Id: I0f51b5d8a7b71859cced335ca9bd6ad155637ec5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1781619
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-09-02 20:38:34 +00:00
Shahbaz Youssefi f0dd087edf Move timer functionality from util/ to common/
The main timer functionality (get absolute time) is moved to common/ for
use in ANGLE itself (in upcoming overlay change).  util/Timer.h is no
longer an abstract class and uses this functionality to implement the
timer.

Bug: angleproject:3757
Change-Id: I3fe418778d80d1089c9bfe43a9e8098e43236f18
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769061
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-08-30 17:05:57 +00:00
shrekshao cdecd97cee Add Draw base vertex and base instance function entrypoints
Split from https://chromium-review.googlesource.com/c/angle/angle/+/1705035/27

This patch adds entrypoints glDrawArraysInstancedBaseInstanceANGLE,
glDrawElementsInstancedBaseVertexBaseInstanceANGLE,
glMultiDrawArraysInstancedBaseInstanceANGLE,
and glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE

Implementation will come in a later separate patch.

Bug: chromium:891861, angleproject:3402
Change-Id: I18e19b850cddd79be4798b9ae7efe0680a050c7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1750125
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-08-16 00:27:22 +00:00
Stuart Morgan 9d737966ac Standardize copyright notices to project style
For all "ANGLE Project" copyrights, standardize to the format specified
by the style guide. Changes:
- "Copyright (c)" and "Copyright(c)" changed to just "Copyright".
- Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1").
- Fixed a small number of files that had no copyright date using the
  initial commit year from the version control history.
- Fixed one instance of copyright being "The ANGLE Project" rather than
  "The ANGLE Project Authors"

These changes are applied both to the copyright of source file, and
where applicable to copyright statements that are generated by
templates.

BUG=angleproject:3811

Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-14 23:05:33 +00:00
James Darpinian 7e48c9eb99 Add explicit integer casts
WebKit uses the -Wshorten-64-to-32 flag which warns on these cases.

Bug: 3439
Change-Id: I8c1de60da0f173ca2036e2120e79b857f5f2775f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1740866
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2019-08-14 00:52:47 +00:00
James Darpinian efa898aca2 Enable some compiler warnings used by WebKit.
This will make it easier to roll ANGLE in WebKit.

Bug: angleproject:3439
Change-Id: Icd4a5a2d5dcabb6cf13d4b46a7547f49610fa4b3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1743057
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-08-09 17:05:01 +00:00
James Darpinian 64751a0be4 Reenable extra_warnings config for angle_utils
Originally disabled in https://crrev.com/c/1738438.

Bug: angleproject:1459
Change-Id: I95172dc95a5d3e9d838c542ee6bcfb2338ffc9a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1743078
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-08 13:40:11 +00:00
Jiacheng Lu 73e5e9b55a Clang warn implicit float to int conversion
1. add '-Wfloat-conversion' in compiler flag for clang
2. fix existed implicit float conversion

Bug: angleproject:3728
Change-Id: I0dc07eeb74c5d6dc480c6f0aa88bc75ab98e4292
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713741
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-26 19:56:42 +00:00
Jiacheng Lu f35f11106d Add script to apply clang-format on all sources
1. python script wrapper to call clang-format over the whole code base
2. Add clang-format rule `IncludeBlocks: Preserve` to tell clang-format
do not merge include blocks
3. Fix existed clang-format issue in code base

Bug: angleproject:3532
Change-Id: I289292dc62c2784ff21688065c87c3f3f5538f17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709720
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-07-19 20:10:28 +00:00
Geoff Lang 6a02f06dfd Implement EGL_ANGLE_create_context_backwards_compatible
This extension allows the user to specify if ANGLE should create a
context of the exact requested version or a higher version context that
is backwards compatible.

BUG=angleproject:3425

Change-Id: I7d0b75cdd7e34a2fc888aa238e1eeb67af82ae0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601560
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-18 22:51:46 +00:00
Geoff Lang 69e46a186b GL: Implement EGL_ANDROID_native_fence_sync
This extension allows Chrome to use ANGLE on newer Android devices.

BUG=angleproject:3643

Change-Id: I5456d61749399ca2bbc11cc5e98b9120f8702406
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1687121
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2019-07-10 14:47:50 +00:00
Geoff Lang 3fd0b2dbcf Implement EGL_ANDROID_get_native_client_buffer.
BUG=angleproject:2508

Change-Id: I21e6251cd1341c1f85f1ba16ba08f5876a8ff8de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1238885
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-07-08 18:17:43 +00:00
Cody Northrop 5faff91af4 texture3D: Codegen changes towards OES_texture_3D
Also accompanying hand edits to validationES2.cpp and
Context.cpp to allow linking.

Bug: angleproject:3188
Change-Id: I89832265092fabc71bade464f0171d65038d8b0e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1648454
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-01 14:15:07 +00:00
Tim Van Patten 351e80984d Increase demangled array size
The call to abi::__cxa_demangle() with too small of a char[] can cause
segfaults or hangs.   This change increases the array from 256 to 4096.

Bug: angleproject:3553
Test: Verify validation layers don't segfault/hang
Change-Id: I6704ff00bfab62c99eb288f803ccda35a037dd9d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1670580
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
2019-06-21 22:31:01 +00:00
Geoff Lang 857880e5b8 GL: Add extensions to enable hardware video decode on Android.
The Android SurfaceTexture API has to be initialized with a texture id
which Chrome has to query from an ANGLE external texture. It also
rebinds and sets the texture dimensions on calls to
SurfaceTexture.updateTexImage so ANGLE must be notified about these
changes so that state tracking and validation continue to function.

BUG=967410

Change-Id: I92e9077f75835b088da3a8caffb3ff40e9ad0361
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1630293
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-06-18 21:10:07 +00:00
Jamie Madill e1849ee1fb Remove obsolete WinRT files.
These were no longer used in the build.

Bug: angleproject:3162
Change-Id: I715bb3e6f14ed8c97523dec5b0b58bf9a89be0f0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660716
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-06-17 13:22:05 +00:00
Jamie Madill 88596beab3 Vulkan: Implement a texture descriptor cache.
We noticed a significant hotspot in vkAllocateDesctiptorSets. The app
was repeatedly cycling through a few combinations of active textures.
For each state change in ANGLE we were allocating a new desctiptor set.
This in turn would trigger internal driver memory allocation and cause
jank. Using a cache avoids allocations entirely since the application
is rotating through a stable set of textures.

The descriptor cache is stored in each program. It is indexed by a set
of 32-bit serials. Each texture generates a unique serial for every
combination of VkImage and VkSampler that the texture owns. The texture
descriptor is refreshed every time a texture changes or is rebound.

The descriptor cache is accessed via an unoredered map with the texture
serial sets as the hash key. We also store the maximum active texture
index in the cache key so we don't need to hash and memcmp on all 64
active textures.

This will currently fail if more than MAX_UINT serials are generated.
But that number is high enough that it shouldn't be possible to hit
in practice in a practical amount of time.

Requires shifting the texture sync to ContextVk so we can get the new
serial after the textures are updated. And to make sure to update the
image layouts even if the descriptors are not dirty.

Improves performance of the T-Rex demo. Also improves the score of the
texture state change microbenchmark by about 40%.

Bug: angleproject:3117
Change-Id: Ieb9bec1e8c1a7619814afab767a1980b959a8241
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1642226
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-06-13 19:58:45 +00:00
Tom Tan 2d0a9acb05 Initialize STACKFRAME64 for ARM64
Bug: chromium:972228,893460

Change-Id: I0c77d19e70c337d70bc55f65f6893d5bbe18407b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1648670
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-06-08 02:01:55 +00:00
Jonah Ryan-Davis e431aaa15a Rename EGL_ANGLE_workaround_control to EGL_ANGLE_feature_control.
For consistency, call these ANGLE "features", a subset of which may be
workarounds. Also, whether the feature is enabled/disabled should be
publically visible as "status".

Bug: angleproject:1621
Change-Id: I0de90a932fbfe1fc9b59138153d616d29fa7268b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1643410
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-06-04 18:51:44 +00:00
Jonah Ryan-Davis 2dd40a44d1 Add eglQueryDisplayAttribANGLE to query workarounds count.
Add eglQueryDisplayAttribANGLE based on eglQueryDisplayAttribEXT to add
behavior for quering the count of all workarounds available. Used
externally to build a list of workarounds.

Bug: angleproject:1621

Change-Id: I793acedc76111fd018600169d58bf5d8cf4a63ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1637817
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-06-03 22:36:28 +00:00
Jamie Madill 20d380fa5b Print stack backtrace on critical failure.
We reuse code from Skia to walk the stack on Posix platforms. See:
https://github.com/google/skia/blob/master/tools/CrashHandler.cpp

On Windows we use a BSD-licensed tool called StackWalker. See:
https://github.com/JochenKalmbach/StackWalker

This allows us to get high quality stack traces on Win/Linux/Mac.

Bug: angleproject:3162
Change-Id: I9c50ede2c6a41ed0ee85a0507372df42a487bcef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1632950
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-06-03 20:24:03 +00:00
Tim Van Patten 0a56f0e3d2 Vulkan: Update front face mode during syncState()
When handling DIRTY_BIT_DRAW_FRAMEBUFFER_BINDING in syncState(), the
call to update the front face was missing, so culling could be enabled
for the wrong front faces.

Bug: angleproject:3237
Test: Verify 3D apps render (more) correctly
Test: New SimpleStateChangeTest end2end tests
Change-Id: I1d94a977bea9e48d90b5346861e5565d2371cadd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1611753
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-05-30 17:09:32 +00:00
Jonah Ryan-Davis f52f2637ae Add EGL_ANGLE_workaround_control extension.
This extension is used to query strings from an array based on index,
which will be used to query all the information about workarounds in
ANGLE.

Bug: angleproject:1621

Change-Id: I27157f278f7f17c92c8b4fd7753e2a5ecd0528f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1627723
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-05-29 19:39:42 +00:00
Shahbaz Youssefi f2a1c384f7 Vulkan: Implement multisampled framebuffers
Simultaneously implements ANGLE_framebuffer_multisample and ES3
multisampled framebuffers.

Additionally, implements ES3 framebuffer blitting where multisampled
framebuffers are involved.

Bug: angleproject:3203
Bug: angleproject:3204
Bug: angleproject:3200
Change-Id: I5694a30f71168e807688a9568e3742b81d907918
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1622667
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-05-29 15:28:49 +00:00
Jamie Madill 3089f92e8a Move EGL Display config into EGLPlatformParameters.
This CL moves all of the EGLDisplay configuration into an EGL platform
struct. Consolidating display configuration in the struct allows us to
move configuration out of the test constructor. Then when we filter
test configs we don't need to wait for the individual test setup.

Bug: angleproject:3393
Change-Id: I5bd06dcdc9f2867ebc43c1d4984077ada35cafc8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574674
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-05-01 21:07:47 +00:00
Jamie Madill b81490759f Clean up ANGLE test extension functions.
None of these functions needed to be member functions. Also make the
naming more consistent.

Bug: angleproject:3393
Change-Id: I7aafe2269a48af703a87bd9a8cf4cfab9e177dd3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574673
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-05-01 15:39:25 +00:00
Jamie Madill 0659c99131 Set swap interval explicitly.
The swap interval can be changed independent of the Surface config.
Thus it makes more sense to set it explicitly in test setup. This
simplifies the test config.

Also updates some of the API for GLWindowBase. Return an explicit
error from makeCurrent.

Bug: angleproject:3393
Change-Id: Ic62b33018e872bc0e38f2848e2427ed898b60749
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574672
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-05-01 14:50:20 +00:00
Jamie Madill 8f39cd8378 Roll Chromium DEPS (April 30, 2019).
Required a few build tweaks because GN check does not understand
#ifdef includes.

Bug: angleproject:3411
Change-Id: I1aa7b97626767e3dc973bfa55f5b2a511c806ec9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1589148
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-05-01 14:49:50 +00:00
David Worsham 62e274e86c [scenic] Remove dangling viewsv1 reference
Clean up the includes and imports for this module as well.

BUG: angleproject:2475
TEST: Built cast_runner, web_runner
Change-Id: Id283c265a4ec9d2ca74e3a0132e82f051b8864f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1579219
Reviewed-by: Michael Spang <spang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
2019-04-23 19:45:23 +00:00
Geoff Lang 057b76e149 Implement GL_CHROMIUM_lose_context.
This is useful for testing context lost behaviour.

BUG=angleproject:3379

Change-Id: If0e1538553b1761e313fc36ccde5138cd495200f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566141
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-04-17 15:48:14 +00:00
Mingyu Hu 7d64c4863d GL_ANGLE_multiview has been renamed to GL_OVR_multiview2.
changes include:
1) GL_OVR_multiview to GL_OVR_multiview2 extension directive change
2) Removal of all references to side by side. We no longer support multiple views in a single 2DTexture. Only 2DTextureArray's are supported
3) WebGL 2 (ES3) is required for multiview

Bug: angleproject:3341
Change-Id: Ie0c1d21d7610f8feebdb2e4d01c6947f57e69328
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552023
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-04-16 17:37:10 +00:00
Michael Spang 9de3ddb511 Generate entrypoints for GL_EXT_memory_object_fd & GL_EXT_semaphore_fd
This adds entrypoints for the Linux variants of GL_EXT_memory_object &
GL_EXT_semaphore.

Bug: angleproject:3289

Change-Id: I40de40f27aa82cd9479d5913dac0a7493919bb8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552026
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-04-05 04:44:47 +00:00
Michael Spang 7a8c3e5ebe Generate entrypoints for GL_EXT_memory_object & GL_EXT_semaphore
This adds entrypoints for two new extensions that will be useful for
importing external Vulkan objects into ANGLE.

Bug: angleproject:3289

Change-Id: I206dc76eda5c6c8d836db7c6413c5544326aa722
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552024
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-04-04 23:42:53 +00:00
Jamie Madill f455f7565a Reuse angle_end2end_test windows and displays.
This both speeds up test execution and cuts down on the number of new
windows and displays created for a test config. This feature is only
currently enabled for Windows NVIDIA and Intel. On every other config
there were blocking issues that would need investigation. Several tests
were manually flagged as needed new displays on each iteration to
prevent test flakiness.

This feature might fix the issues with Intel test flakiness that have
been prominent on the ANGLE CQ.

WGL configurations have also been removed from ANGLE tests. So this
removes more of the code from ANGLETest.cpp.

Bug: angleproject:3261
Change-Id: Ic2864d4806ad38e0eeaa3c0afcd54ae1c548090f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1520995
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-03-21 01:45:10 +00:00
Jamie Madill 0f566fc77c Introduce ConfigParameters test helper struct.
This allows us to more easily compare sets of parameters used in our
tests. The config parameters are stuff like the red / gree / blue bits
used in an EGL config. Or particular sets of extensions or other
EGL options.

This will more easily allow us to determine when we need to use a new
EGL display instead of reusing a prior.

Bug: angleproject:3261
Change-Id: Ia1f0ede988e0b4084fbb4d55097e94fd89ee4899
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1531535
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-03-20 16:54:53 +00:00
Michael Spang c2074b1401 Fuchsia: Remove use of deprecated API Presenter::Present2
Bug: chromium:943604
Test: angle_end2end_tests

Change-Id: Id4bd293bea0587687d1656998bc6d986fd9fb8e9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1530027
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-03-19 20:51:45 +00:00
Michael Spang df35e382de Fuchsia: Remove use of deprecated header <lib/fdio/util.h>
Bug: chromium:941770
Test: angle_unittests

Change-Id: I7dbee848b251daaaf1b4f85c5e7e76bb1fa1fbbf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1530026
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-03-19 20:03:24 +00:00
Jamie Madill 570410071d Revert "Fix several WGL test failures."
This reverts commit 13a8c4d84e.

Reason for revert: Seems to have led to a flakier situation:

https://ci.chromium.org/p/chromium/builders/ci/Win10%20FYI%20Debug%20%28NVIDIA%29/3006
https://ci.chromium.org/p/chromium/builders/try/win-angle-rel/1231

Original change's description:
> Fix several WGL test failures.
> 
> SimpleOperationTest.ClearAndSwap/ES2_WGL failed when run in isolation,
> since getGLWindow()->hasError() would report a previous error,
> instead of result of swapBuffers().
> When running after an OPENGL test, swapBuffers() would clear
> the previous error, but that doesn't happen in isolation.
> 
> The previous error is from loading WGL functions, some of which are
> expected not to be present. Clear the error in GetProcAddressWithFallback,
> but verify that there is no error entering it.
> 
> This uncovers more errors in angle_perftests:
> DrawCallPerfBenchmark.Run/wgl
> DrawCallPerfBenchmark.Run/wgl_tex_change
> DrawCallPerfBenchmark.Run/wgl_vbo_change
> DrawElementsPerfBenchmark.Run/wgl_ushort
> They come from redundant calls when destroying a window. Fix this as well.
> 
> Several more errors where uncovered by debug prints, fix those, too.
> 
> Bug: angleproject:3153
> Change-Id: I559c098be9dcdfd3add83f045f745d190250b986
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1515602
> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

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

Change-Id: I095fadc0dd3a2c998c1dc86f3760184ae6fd7309
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3153
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1523527
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-03-14 13:33:36 +00:00
Yuly Novikov 13a8c4d84e Fix several WGL test failures.
SimpleOperationTest.ClearAndSwap/ES2_WGL failed when run in isolation,
since getGLWindow()->hasError() would report a previous error,
instead of result of swapBuffers().
When running after an OPENGL test, swapBuffers() would clear
the previous error, but that doesn't happen in isolation.

The previous error is from loading WGL functions, some of which are
expected not to be present. Clear the error in GetProcAddressWithFallback,
but verify that there is no error entering it.

This uncovers more errors in angle_perftests:
DrawCallPerfBenchmark.Run/wgl
DrawCallPerfBenchmark.Run/wgl_tex_change
DrawCallPerfBenchmark.Run/wgl_vbo_change
DrawElementsPerfBenchmark.Run/wgl_ushort
They come from redundant calls when destroying a window. Fix this as well.

Several more errors where uncovered by debug prints, fix those, too.

Bug: angleproject:3153
Change-Id: I559c098be9dcdfd3add83f045f745d190250b986
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1515602
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-03-13 17:26:37 +00:00
Michael Spang 4154c1c1b7 Fuchsia: Migrate ScenicWindow to ViewV2
Fuchsia is transitioning its view creation APIs. Migrate to the new one.

BUG=angleproject:2475
TEST=angle_end2end_tests on Fuchsia

Change-Id: I09abfda18a5e3da46909b5b967325a083586a7d0
Reviewed-on: https://chromium-review.googlesource.com/c/1474337
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
2019-02-14 22:13:42 +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
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
Jonah Ryan-Davis 2b0553ce59 Implement EXT_instanced_arrays
Bug: angleproject:3015
Change-Id: Ib01cc5e0df6db27981cb843a6bd386de5d10c2db
Reviewed-on: https://chromium-review.googlesource.com/c/1452740
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-02-08 20:40:08 +00:00
Shahbaz Youssefi ab5acbd513 Vulkan: implement swapchain resizing
Vulkan allows a swapchain to be created based off of an older swapchain
that's still presenting, to support seamless window resizing.  The old
swapchain will remain alive (though no image can be acquired from it)
and automatically cleaned once no image is being presented from it.

The retired swapchain can be destroyed once all operations on its images
are completed.  We store the old swapchain next to the serial of
submission that's used for CPU throttling and defer the destroy call
until after `finishToSerial` for that serial is called.

Bug: angleproject:2942
Change-Id: Ic62a5a57b712ffa2b087f5fecde0dc8942194075
Reviewed-on: https://chromium-review.googlesource.com/c/1435634
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-02-07 19:28:08 +00:00
Shahbaz Youssefi 5313c8a899 Implement EGL_KHR_fence_sync and EGL_KHR_wait_sync
EGL_KHR_fence_sync introduces the EGLSync object and associated
create/destroy/clientWait functions.  EGL_KHR_wait_sync adds the
serverWait function on top of that.

Bug: angleproject:2466
Change-Id: Iebb239a85c4471ea18b3c3a8a83b793af555e31d
Reviewed-on: https://chromium-review.googlesource.com/c/1412261
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-01-23 04:12:20 +00:00
Yuly Novikov 5fe7c5b926 Include common/platform.h where used
Bug: 922443
Change-Id: I35b9e34266d4a15f8d0769c2770801b1b0511398
Reviewed-on: https://chromium-review.googlesource.com/c/1418091
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-01-17 18:56:04 +00:00
Jeff Gilbert 465d6090cd Add GL_ANGLE_provoking_vertex on D3D11 and GL.
This extension is a subset of GL_ARB_provoking_vertex without the
QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION query.

Bug: angleproject:2829
Change-Id: I907a4d16b7b13d3bbfb948842091eedd7b6a8b77
Reviewed-on: https://chromium-review.googlesource.com/c/1410289
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-01-16 20:32:14 +00:00
jchen10 55f20f681b Fix generate_loader.py
The message printed by the #error macro should be enclosed in marks
for gcc.

Bug: angleproject:2995

Change-Id: I5d8ebb28ef5e225eb88990642b6b58936cad4369
Reviewed-on: https://chromium-review.googlesource.com/c/1407542
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
2019-01-15 00:40:12 +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
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 ad398ee839 Free OSWindow and EGLWindow through helpers.
This cleans up any potential problems with allocating and freeing
resources in different shared objects or DLLs. Previously we were
using a dynamically linked allocation function and then calling
the standard delete function.

Also adds a base class helper for EGLWindow. Will base the WGL
Window class on this.

Needed for running ANGLE tests against native drivers.

Bug: angleproject:2995
Change-Id: Ic92b447649ebb32c547605c20086c07a601842f0
Reviewed-on: https://chromium-review.googlesource.com/c/1393443
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-03 18:42:50 +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
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
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
Jamie Madill 35cd7332ab Refactor test shader style.
This change enforces a lot more consistency. We pass const char * to
the Compile functions instead of std::string. Also fixes the
indentation of C++11 block comments to be more consistent.

Bug: angleproject:2995
Change-Id: Id6e5ea94055d8cbd420df4ea2e81b2d96cb5ce78
Reviewed-on: https://chromium-review.googlesource.com/c/1357103
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-03 13:20:23 +00:00
Jamie Madill f3acb8c133 Retool perf test running.
This change does a few things involving the way we run the perf tests:

- Perf test runner can capture different metrics

Useful for capturing the new "nanoSecPerIteration" metric.

- Removes the "score" metric

We'll move to the new time-based metrics. These new metrics are scaled
correctly with iteration counts.

- Runs three trials per perf test

This gives more measurements per test. Each trial is approximately one
second. First the perf tests set a fixed number of iterations after
calibrating the number of steps that we can run in one second. After
that the three trials are run. This should give more stable results.

- Apply more CPU stabilization on Windows

Use SetPriorityClass to apply more CPU priority. Also upgrade
SetThreadPriority to the highest level.

- Always build the Vulkan command buffer test

This catches build regressions more easily. We still skip the test on
non-Android platforms.

Bug: angleproject:2923
Change-Id: I7da234c5af07775ba4a232bb8d65e0138ee7073f
Reviewed-on: https://chromium-review.googlesource.com/c/1330262
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-11-15 01:00:06 +00:00
Shahbaz Youssefi 1c0f151e04 Implement missing posix utils
Bug: angleproject:2923
Change-Id: I35fee6303f07c7b3a931f876a8d9d4ba54c91630
Reviewed-on: https://chromium-review.googlesource.com/c/1315607
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-11-02 19:28:49 +00:00
Jamie Madill 3402d52309 Try to reduce variance in angle_perftests.
This change does a few things:

- make perf test runner script print % variation instead of stddev

This makes it a bit more clear how much variance there is.

- stabilize CPU in the render perf tests

Setting a thread affinity and priority should stop from switching cores
during the run. Hopefully can prevent background noise from changing
the test results.

- warm up the benchmark with a few iterations

This should hopefully make the test results a bit more stable.

- output a new normalized perf result value

The new result is normalized against the number of iterations. So it
should hopefully be stable even if the number of iterations is changed.

- increases the iteration count in the draw call perf tests.

These tests were completely dominated by SwapBuffers time. Increasing
the iterations per step means we actually are bottlenecked on CPU time
instead.

Bug: angleproject:2923
Change-Id: I5ee347cf93df239ac33b83dc5effe4c21e066736
Reviewed-on: https://chromium-review.googlesource.com/c/1303679
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-10-30 20:27:07 +00:00
Jamie Madill 3ce69ba3eb Fix Win32Timer's Frequency init.
This could cause some problems on the perf bots.

Bug: angleproject:2908
Change-Id: If12e5939ba80b3fd0b9609e7b76df6045e60cb94
Reviewed-on: https://chromium-review.googlesource.com/c/1301849
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-10-26 16:08:03 +00:00
Shahbaz Youssefi 479918ded7 Get absolute time from timers
Independent of start()/stop()/getElapsedTime() functionality,
getAbsoluteTime() is added to return the time regardless of whether the
timer is running.

Bug: angleproject:2908
Change-Id: I056aeb6eddfba8757a139934c1cf68e00e860de6
Reviewed-on: https://chromium-review.googlesource.com/c/1296952
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-10-25 17:03:54 +00:00
Yizhou Jiang 7818a85c33 Implement GL_ANGLE_texture_multisample API part
Support GL_ANGLE_texture_multisample extension.
This patch adds enums of multisampled texture and texStorage2DMultisampleANGLE
API.

TEST=angle_end2end_tests.exe --gtest_filter=TextureMultisampleTest*
TEST=angle_end2end_tests.exe --gtest_filter=NegativeTextureMultisampleTest.Negtive*

BUG=angleproject:2275

Change-Id: I2cab997edc33aa2d0be6082381545335423f64e0
Reviewed-on: https://chromium-review.googlesource.com/c/804613
Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-10-22 02:53:04 +00:00
Olli Etuaho 624fbdcf55 Refactor CompileProgram utility
Tests often need to call gl functions to set up program related state
after glCreateProgram has been called but prior to glLinkProgram is
called. Add a callback function to the CompileProgram utility function
to fulfill this need. This reduces code duplication considerably in
several tests.

An alternative way to improve CompileProgram would be to split it into
several different utility functions. This might be slightly easier to
read, but would also be a larger refactoring and require more checks
at the call site.

This will make it easier to implement EXT_blend_func_extended tests,
which need to bind fragment outputs to different slots.

BUG=angleproject:1085
TEST=angle_end2end_tests

Change-Id: I3ac8b7bdc21c6a1f14517bc7df0cf6f35abd7612
Reviewed-on: https://chromium-review.googlesource.com/1254062
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2018-10-01 20:03:38 +00:00
Jamie Madill b36a4816a5 Vulkan: Add OpenGL line segment rasterization.
Line rasterization rules are implemented using a shader patch. The
patch does a small test and discards pixels that are outside of the
OpenGL line region.

The feature is disabled on Android until we can determine the root
cause of the test failures.

Bug: angleproject:2598
Change-Id: Ic76c5e40fa3ceff7643e735e66f5a9050240c80b
Reviewed-on: https://chromium-review.googlesource.com/1120153
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2018-09-25 15:05:29 +00:00
jchen10 a155bacf99 ParallelCompile: Parallelize shader translation
This changes to construct a new ShHandle of compiler for each Shader,
and use it to translate the shader source in a background thread.

Bug: chromium:849576

Change-Id: Ib49952c7292321ee6aa1c5996f8f7927f40d8f04
Reviewed-on: https://chromium-review.googlesource.com/1177195
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-09-19 00:49:23 +00:00
Olli Etuaho dff32a0da1 Support multisample arrays in shader programs
The added tests check that using textureSize() and texelFetch() on
textures with a fixed point format return expected results. texelFetch
is also covered for integer format textures.

dEQP GLES 3.1 tests also cover a variety of multisampled array texture
formats.

BUG=angleproject:2775
TEST=angle_end2end_tests, angle_deqp_gles31_tests

Change-Id: I99b422e24b39e3563ed72f0fb85c9c1907df807d
Reviewed-on: https://chromium-review.googlesource.com/1196521
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-09-06 15:44:35 +00:00
Tobin Ehlis 1bf963b629 Clean up PlatformMethods attribute enum
Centralize definition of EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX
in Platform.h.

Bug: angleproject:2528
Change-Id: Id2b022c4ea08d2e98cbd6c3b248b58d096c20dfb
Reviewed-on: https://chromium-review.googlesource.com/1144265
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-08-30 22:20:00 +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