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

555 Коммитов

Автор SHA1 Сообщение Дата
Antonio Caggiano fcd6e26057 GN: Fix util target when X11 not enabled
Include ozone util sources when both X11 and Wayland are not enabled.

Bug: angleproject:6902
Change-Id: I88664bf2da7ce9094ed3168b765d4043aa5e16e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3583984
Auto-Submit: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-04-14 10:07:00 +00:00
Gregg Tavares 8718783526 Metal: For readPixels copy IOSurface to non-IOSurface texture
For intel GPU/Drivers, it's faster to copy an IOSurface texture
to a non-IOSurface texture and read from the copy than it is
to read directly from the IOSurface texture.

Bug: angleproject:7117
Change-Id: I786009444480f75be6feb05f09f87fb45a3186b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3573078
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Commit-Queue: Gregg Tavares <gman@chromium.org>
2022-04-14 03:16:10 +00:00
Shahbaz Youssefi c5271e8e69 Vulkan: Emulate GL_KHR_blend_equation_advanced
Based on a change by Brandon Schade <b.schade@samsung.com>

In the translator, when advanced blend is enabled, an input attachment
is added.  Based on the listed advanced blend equations, emulation code
is added that performs those equations' functions.  The blend equation
itself is passed through a driver uniform.

Note that the advanced blend extension only allows a single output to
use advanced blend, and that should be at location 0.

In the Vulkan backend, when advanced blend is used, the driver uniform
to select the equation is updated and normal blending is disabled.

Bug: angleproject:3586
Change-Id: Icc42e8be238d34fca149087eb9cfe616a7643a6b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3575738
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2022-04-13 19:02:22 +00:00
Jonah Ryan-Davis 01c0bc215f Revert "Vulkan: Support Wayland"
This reverts commit 510351f200.

Reason for revert: Breaking ANGLE roll:
https://bugs.chromium.org/p/angleproject/issues/detail?id=7202

Original change's description:
> Vulkan: Support Wayland
>
> Implement DisplayVkWayland and WindowSurfaceVkWayland. Get window size
> from native window and check egl config is just empty.
>
> Then add an EGL wayland test for testing rendering and buffers swapping.
>
> Bug: angleproject:6902
> Change-Id: I8204a5cc99f26330b74caba241bebf14c5650c2d
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3395898
> Reviewed-by: mohan maiya <m.maiya@samsung.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Auto-Submit: Antonio Caggiano <antonio.caggiano@collabora.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>

Bug: angleproject:6902
Change-Id: Idd0cb78c84baeb1b2ab6910173160206901799f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3584921
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2022-04-13 18:49:49 +00:00
Shahbaz Youssefi 8074061d24 Remove feature override platform methods
Instead, the tests now use the enable() functions to override the
feature at platform level.

This fixes the forceFallbackFormat feature mistakenly not having been
tested.

Bug: angleproject:6435
Change-Id: I605e4133407282bd52232887b595af0d2c13575d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3577369
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2022-04-13 04:25:59 +00:00
Antonio Caggiano 510351f200 Vulkan: Support Wayland
Implement DisplayVkWayland and WindowSurfaceVkWayland. Get window size
from native window and check egl config is just empty.

Then add an EGL wayland test for testing rendering and buffers swapping.

Bug: angleproject:6902
Change-Id: I8204a5cc99f26330b74caba241bebf14c5650c2d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3395898
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-04-12 15:11:18 +00:00
Shahbaz Youssefi 797e627e64 Autogenerate list of features as enum
The WithX() and WithNoX() helpers are removed and replaced with enable()
and disable() member functions that take the name of the feature (as a
Feature::X enum constant).  This has two benefits:

- Adding tests that override a feature no longer requires additional
  helper functions to be written.
- There's no mistaking the feature name.

This change doesn't yet fix the main issue in anglebug.com/6435, but
does fix the following helpers using an old feature name (so they were
ineffective):

- WithMetalForcedBufferGPUStorage
- WithNoVulkanViewportFlip

A follow up would remove the old way of overriding features in tests and
replaces them with the new way.

Bug: angleproject:6435
Change-Id: Ida02b26ec72bc40d7a8938c76a93815bb903ca05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580982
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2022-04-12 03:42:40 +00:00
Brian Sheedy 727cd8ef66 Fix pointer sscanf for ChromeOS
Fixes several sscanf calls in crash_handler_posix.cpp failing to compile
when compiling for ChromeOS kevin (arm-based) devices due to trying to
format an unsigned int as an unsigned long. This is fixed by switching
to SCNxPTR/PRIXPTR for the format strings instead of hard coding %lX.

Bug: chromium:1314515
Change-Id: I012a1a74312ba653e34145883955f2d0e1ef031f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3579867
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-04-09 00:10:16 +00:00
Kimmo Kinnunen ba04fcfd10 Support ANGLE_PREFERRED_DEVICE on CGL
Add the possibility to test both integrated and discrete GPU
with ANGLE tests. Previously it was using only discrete.

The binaries need the NSSupportsAutomaticGraphicsSwitching bundle
property.

This is needed to test ANGLE_power_preference.

Changes the behavior of test apps:

Previously,
  ./angle_end2end_tests
would use discrete GPU.

After,
  ./angle_end2end_tests
or
  ANGLE_PREFERRED_DEVICE=intel ./angle_end2end_tests
will use integrated GPU.
  ANGLE_PREFERRED_DEVICE=amd ./angle_end2end_tests
will use discrete GPU.

Bug: angleproject:7093
Change-Id: Ia64f6024e3215e69c2a1bde3ba4f67c3ca595476
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516114
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-04-07 05:08:44 +00:00
Antonio Caggiano 7b0f631824 Vulkan: Wayland include directories
Add wayland include directories from vulkan headers build overrides to
those vulkan dependent targets.

Bug: angleproject:6902
Change-Id: I8699fdf18e9b44b04a580b6ea31493d740756cf0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3568377
Auto-Submit: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-04-05 20:32:03 +00:00
Kimmo Kinnunen 9637185c3d Add ForceGPUSwitch to EGL_ANGLE_power_preference
eglHandleGPUSwitch() does not work with WebKit sandbox profile.
The root cause is that we do not know the
primary display, and as such we do not know which GPU drives this.

Add eglForceGPUSwitchANGLE(display, gpuIDHigh, gpuIDLow).
This lets the caller figure out the GPU in another process. Then
the caller can just set the GPU in the sandboxed process.

Add tests that are disabled by default until the runner and the
infrastructure supports running the tests with automatic switching
enabled.

Bug: angleproject:7092
Change-Id: I316ee431156596effbdb89659a5e24291719a204
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516274
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2022-03-19 01:15:06 +00:00
Jamie Madill 3739a195c2 perf tests: Record perf counter metrics.
This adds a new command line argument that will allow the user to
specify perf counters to record into the test output.

Bug: angleproject:4918
Change-Id: Ia7432ff96eadf13ef681f67d2d503d00fd83e06e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516970
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-03-14 16:42:15 +00:00
Jamie Madill 24c641dce9 Add stubs for AMD_performance_monitor.
We can piggy-back on this extension to report internal ANGLE
performance counters to the ANGLE tests.

Includes a minor variable de-duplication in the EP generator.

Bug: angleproject:4918
Change-Id: I4a76aea957b423a36a90349643bd50a4e1905849
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3497537
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-03-08 15:48:28 +00:00
Mohan Maiya f9ade9fb4a Vulkan: Add feature to create pipeline during glLinkProgram
Creating the pipeline will trigger the compilation of shaders to byte
code thus warming up Vulkan shader caches. Typically most apps call into
glLinkPrograms during app loadtime and the goal is to improve cache hit
rate and reduce CPU workload during game play.

Bug: angleproject:7046
Test: ProgramBinary*CreatePipelineDuringLink*
Change-Id: I71351d45a9aa84e220ca38503735e94cff1dcf98
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3478354
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
2022-03-04 21:52:41 +00:00
Antonio Caggiano 2a9c4b01bf dEQP: Enable CreateSurfacePlatformEXT tests
Add the corresponding capability to NativeWindow and implement
getPlatformExtension virtual method to return a native pointer that can
be used with eglCreatePlatformWindowSurfaceEXT().

Bug: angleproject:6961
Change-Id: Ieb1a1fd8b3cae4e6f199c269f3922cbd0307aa35
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3452102
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-03-01 18:44:08 +00:00
Antonio Caggiano b92ebdb73a EGL: Add code-gen for dmabuf extensions
Add code-gen for EGL_EXT_image_dma_buf_import and
EGL_EXT_image_dma_buf_import_modifiers.

Bug: angleproject:7065
Change-Id: Ib1bd2a881f11e96b1e7e5128975bdba3bdc41e0f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3495122
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-03-01 18:21:28 +00:00
Constantine Shablya 3f0a28ba6e Add entry points for EGL_KHR_partial_update
Bug: angleproject:6960
Change-Id: If248b7ef5ebacd7dfb8c612e5a9106ba0060282e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3455787
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-02-11 17:51:22 +00:00
Mohan Maiya 1b9774f577 Vulkan: Force submit updates to immutable textures
Submit immutable texture updates recorded in outside renderpass
commands when the following conditions are met -

1. "forceSubmitImmutableTextureUpdates" feature is enabled
2. The texture is immutable

This works around a problem that manifests in some applications
that do not perform appropriate synchronization of shared contexts.

Bug: angleproject:6929
Test: EGLContextSharingTestNoSyncTextureUploads.*
Change-Id: I2a237046e2cc53650eb8dc07e3697f7481df9b02
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3418138
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
2022-02-08 23:25:49 +00:00
Jamie Madill 4a65040b67 Add new Vulkan uniform update test.
This covers a specific case with multiple programs and descriptor
set caching. It could get tripped up by more complicated patterns
in the trace tests.

Bug: angleproject:6776
Change-Id: Ic8e42e55e60ef0fc01f0386712d3457abeea94e9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3426884
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-02-03 12:04:25 +00:00
Kenneth Russell 25120c5607 Mac: Try to diagnose crashes inside Core Animation.
Attempt to diagnose the high flake rate on the mac-test bot.

Override [NSApplication _crashOnException], which is being called from
an internal Core Animation method NS_setFlushesWithDisplayLink, and
print the source exception's stack trace, which is being lost.

Bug: angleproject:6570
Change-Id: I6a1653b42f5f024a4532243180a8edc2b7514244
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3433274
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-02-02 23:40:55 +00:00
Brandon Schade 38fada3510 Vulkan: Add support for OES_primitive_bounding_box
Add OES version of the primitive bound box extension

Bug: angleproject:3576
Test: dEQP-GLES31.functional.primitive_bounding_box.*
Change-Id: Ie44d952992a68dfffd5c124dda8dd11069f0c1e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3425086
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Brandon Schade <b.schade@samsung.com>
2022-02-01 19:26:04 +00:00
sugoi1 8a1f8af4d2 Turn on the Vulkan backend on ChromeOS
ChromeOS needs to switch from testing on legacy SwiftShader GL to
testing on SwANGLE instead. This CL allows ANGLE's Vulkan backend
to exist on ChromeOS.

Bug: chromium:1225003
Change-Id: I7bf702ce18857707226461152b560a570797fce0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3424658
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
2022-01-28 20:44:10 +00:00
Lingfeng Yang 926b43e751 Reland: Frontend: separate lock in swap prep
Swapchain-based backends like Vulkan might block a lot in
vkAcquireNextImageKHR, which is bad for overall fast progress if we also
hold the global EGL lock there.

This CL starts to split the global EGL lock. We release the EGL lock
when performing vkAcquireNextImageKHR, and only maintain a lock for
surfaces.

This is done via a new custom entry point, EGL_PrepareSwapBuffers, so
that we can control how the global lock is used throughout the entire
call.

Bug: angleproject:6851
Change-Id: I095cd8b3bdbb13c842cab0a46148e2122582cdfd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3373426
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
2022-01-11 22:23:19 +00:00
Jamie Madill 85de4f81e9 Capture/Replay: Fix TODO in test utils.
This code is no longer needed.

Bug: angleproject:5133
Change-Id: I06f05b390f36c9d49deaabe8201764968ef3172c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3360782
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-12-30 19:50:47 +00:00
Maksim Sisov c7446ac423 Add support for GL_MESA_framebuffer_flip_y 1/*
LaCrOS, which is same as ChromeOS, relies on this
extension and uses that with WebGL content.

However, when LaCrOS uses ANGLE, the extension is
not exposed and the WebGL content is y-inverted as
direct scanout is always used.

There are two bugs - 1) ANGLE should expose the
extension so that direct scanout is possible
(this CL fixes the issue. 2) LaCrOS shouldn't rely
on the extension if it's not available (a bug to
be fixed in Chromium).

This particular CL consists of autogen files with
framebufferParameteriMESA &&
getFramebufferParameterivMESA in Context
marked as UNIMPLEMENTED. And also unimplemented
validation.

Bug: chromium:1231934
Change-Id: Id617846b0412f579df5b4ace6cb33c1ec6d403df
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3343492
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
2021-12-16 15:34:05 +00:00
Mohan Maiya feb599ad89 Invalidate EGL handles during eglTerminate
EGL 1.5 spec says -
    Termination marks all EGL-specific resources, such as contexts
    and surfaces, associated with the specified display for deletion.
    Handles to all such resources are invalid as soon as eglTerminate
    returns

Move EGL object handles to another set, tracking invalid objects,
during display terminate. Destroy these invalid objects during
eglReleaseThread

Bug: angleproject:6798
Test: EGLMultiContextTest.NegativeTestAfterEglTerminate*
Test: EGLMultiContextTest.RepeatedEglInitAndTerminate*
Test: Android CTS WrapperTest.testThreadCleanup
Change-Id: Ie160212c98367493e645d9d1c8260e7a30649386
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3329273
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
2021-12-15 19:01:01 +00:00
Hailin Zhang 7b13a9ac9d Vulkan: Fix dynamic partial update buffer data issue.
add test case for dynamic update buffer data.

Signed-off-by: Hailin Zhang<hailinzhang@google.com>

Bug: b/207714894
Change-Id: I8c1e93d152847c3162c0e2dd49abe3d899c859a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3328869
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Hailin Zhang <hailinzhang@google.com>
2021-12-14 17:31:38 +00:00
Amirali Abdolrashidi d02875522d Reland "Vulkan: Implement GL_EXT_multi_draw_indirect"
This is a reland of 79f9d163b4
* Added drawcount > 1 as a condition to fall back to
MultiDraw*IndirectGeneral().
* Expanded the tests to include cases with disabled support
for multiDrawIndirect.

Original change's description:
> Vulkan: Implement GL_EXT_multi_draw_indirect
>
> * Optimized the implementations of multiDrawArraysIndirect()
> and multiDrawElementsIndirect() for Vulkan
>   * Added helper functions to support drawArraysIndirect() and
> drawElementsIndirect() as special cases of multiDraw*Indirect
> functions.
>   * Added the flag to enable the multiDrawIndirect feature
> (drawCount > 1). The generic implementation is used if the
> flag is disabled.
>
> Bug: angleproject:6439
> Change-Id: Ibc653d93d355657f828de9c33da22428629e450f
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276044
> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

Bug: angleproject:6439
Change-Id: I96c015855fabc8abbb87320a5ca71a8d92d61954
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3313412
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
2021-12-04 00:58:08 +00:00
Peng Huang a5e391d744 Add GL_ANGLE_vulkan_image extension
glAcquireTextures & glReleaseTextures are added for sharing
texture ownership with an external API.

Bug: chromium:1264439
Change-Id: If46d8d230b4f611768b5ff1187674509e42f01e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3293921
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2021-11-29 21:09:46 +00:00
Peng Huang e00ad44329 Add EGL_ANGLE_vulkan_image extension
This extension is for exporting VkImage from EGLImage.
The VkImage must be used with the same VkDevice used by ANGLE
Vulkan backend.

Bug: chromium:1264439
Change-Id: I222d900465cf2716d94fc64f06e240390ec518ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3285025
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2021-11-25 17:48:33 +00:00
Lingfeng Yang e9f9fa17da Add cpu time measurement to perf tests
Bug: angleproject:6667
Change-Id: I16570a7b51d363dd1c0f35789b985520cb76d488
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270601
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2021-11-17 17:13:00 +00:00
Amirali Abdolrashidi ae3f67ab4a Implement GL_EXT_multi_draw_indirect
* Auto-generated the code to lay the foundation for
the following functions:
  * multiDrawArraysIndirect()
  * multiDrawElementsIndirect()

Bug: angleproject:6439
Change-Id: I7ab5111692376229515e0d6d9e6148909ce9a8a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276042
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2021-11-12 23:01:15 +00:00
Jonah Ryan-Davis f422f21a4c Reland "Metal: Reintroduce GPU power preference selection code."
This reverts commit 67a8cf07a7.

Reason for revert: Landed Chromium-side dependency:
https://chromium-review.googlesource.com/c/chromium/src/+/3271170

Original change's description:
> Revert "Metal: Reintroduce GPU power preference selection code."
>
> This reverts commit 017161701b.
>
> Reason for revert: Blocking roller, please re-land with the fix.
>
> Original change's description:
> > Metal: Reintroduce GPU power preference selection code.
> >
> > This CL re-introduces the GPU power preference code to
> > the metal backend. It also reworks EGLDisplay caching
> > in the frontend to cache based on the native display
> > as well as the power preference attribute.
> > A new extension, EGL_ANGLE_display_power_preference is
> > added based on EGL_ANGLE_power_preference. This extension
> > is a client extension that allows selection of GPU on
> > display creation, similar to how GPUs are selected on
> > context creation in EGL_ANGLE_power_preference.
> > This CL adds EGLDisplayPowerPreferenceTest and enables it on
> > the metal backend.
> >
> > Bug: angleproject:6143
> > Change-Id: I0a081dcd2e3f18ab365fdd3498ddcb6e2ba35212
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3231986
> > Reviewed-by: Kenneth Russell <kbr@chromium.org>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
> > Reviewed-by: Gregg Tavares <gman@chromium.org>
> > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
>
> TBR=kbr@chromium.org,gman@chromium.org,jonahr@google.com,jmadill@chromium.org,angle-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I4f775bf7139253a87b033a30e0da2100b3c1bb02
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:6143
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270749
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>

# Not skipping CQ checks because this is a reland.

Bug: angleproject:6143
Change-Id: Id9b0a5cbb76e4dea9e2f2da2b1c47a0587dfdaf5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270970
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2021-11-10 15:11:01 +00:00
Jeff Vigil d3e6771671 EGL: EGL_KHR_lock_surface3
Add new extension KHR__lock_surface3
Add new interfaces for locking and unlocking a surface.

Test: angle_end2end_test --gtest_filter=EGLLockSurface3Test

Bug: angleproject:6062
Change-Id: Ic40708db4db552107025635540a0c62f956d741e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3161447
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-11-09 17:29:34 +00:00
Jamie Madill 67a8cf07a7 Revert "Metal: Reintroduce GPU power preference selection code."
This reverts commit 017161701b.

Reason for revert: Blocking roller, please re-land with the fix.

Original change's description:
> Metal: Reintroduce GPU power preference selection code.
>
> This CL re-introduces the GPU power preference code to
> the metal backend. It also reworks EGLDisplay caching
> in the frontend to cache based on the native display
> as well as the power preference attribute.
> A new extension, EGL_ANGLE_display_power_preference is
> added based on EGL_ANGLE_power_preference. This extension
> is a client extension that allows selection of GPU on
> display creation, similar to how GPUs are selected on
> context creation in EGL_ANGLE_power_preference.
> This CL adds EGLDisplayPowerPreferenceTest and enables it on
> the metal backend.
>
> Bug: angleproject:6143
> Change-Id: I0a081dcd2e3f18ab365fdd3498ddcb6e2ba35212
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3231986
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Gregg Tavares <gman@chromium.org>
> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>

TBR=kbr@chromium.org,gman@chromium.org,jonahr@google.com,jmadill@chromium.org,angle-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I4f775bf7139253a87b033a30e0da2100b3c1bb02
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:6143
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270749
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-11-09 15:11:03 +00:00
Jonah Ryan-Davis 017161701b Metal: Reintroduce GPU power preference selection code.
This CL re-introduces the GPU power preference code to
the metal backend. It also reworks EGLDisplay caching
in the frontend to cache based on the native display
as well as the power preference attribute.
A new extension, EGL_ANGLE_display_power_preference is
added based on EGL_ANGLE_power_preference. This extension
is a client extension that allows selection of GPU on
display creation, similar to how GPUs are selected on
context creation in EGL_ANGLE_power_preference.
This CL adds EGLDisplayPowerPreferenceTest and enables it on
the metal backend.

Bug: angleproject:6143
Change-Id: I0a081dcd2e3f18ab365fdd3498ddcb6e2ba35212
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3231986
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Gregg Tavares <gman@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2021-11-08 16:11:51 +00:00
Geoff Lang d2c01d2ce5 GL: Allow selecting virtualization groups at context creation
Rewrite EGL_ANGLE_platform_angle_context_virtualization to
EGL_ANGLE_context_virtualization, changing the context virtualization
parameter to an identifier for what virtualization group the frontend
context should be added to.

This allows ANGLE's GL backend to be used by multiple threads if the
user creates contexts with different virtualization groups.

Bug: angleproject:6406
Change-Id: I7414d4705ce10bdf63a9b824043d5dd040dad875
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3169193
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2021-10-25 17:20:56 +00:00
Kenneth Russell 4d5711291e Suppress ObjC exceptions in OSXWindow::messageLoop.
Crashes have been seen inside the Cocoa-internal
NS_setFlushesWithDisplayLink function. Web searches indicate this is a
regression in macOS 11. See whether catching and ignoring these
exceptions improves stability.

Bug: angleproject:6570
Change-Id: Id0be68077163bf4e9f98189461eea016a35edd73
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3227697
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2021-10-16 00:10:08 +00:00
Shahbaz Youssefi ca75c7bbde Vulkan: Fix async queue testing
Due to a feature renaming, the async queue tests where actually ran
without the required feature that makes them async.  This change fixes
the feature name so async queue testing will be resumed.

Bug: angleproject:6437
Change-Id: I73c9c8cd196576455265f72144399a93edc82bdf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3193420
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-10-15 04:45:38 +00:00
Shahbaz Youssefi f3d5dac3ba Vulkan: SPIR-V Gen: Drop dependency to glslang
The SPIR-V gen path is now made default.  Compilation through glslang is
still supported for debugging, and is enabled on the GLSL* end2end tests
for smoke testing.  On release builds, glslang is not supported.

To test with glslang, add the following gn arg (only necessary if dcheck
is disabled):

    angle_enable_spirv_gen_through_glslang = true

Then enable the generateSPIRVThroughGlslang feature.  This can be done
by setting an environment variable:

    ANGLE_FEATURE_OVERRIDES_ENABLED=generateSPIRVThroughGlslang ./angle_deqp_gles2_tests

Binary size saving:

- 1.3MB on Linux (SPIR-V gen itself: 240KB)
- 730KB on Android (SPIR-V gen itself: 140KB)

Perf tests:

- LinkProgramBenchmark.Run/vulkan_compile_single_thread
  * Through glslang:
      truncated mean: 1287033.36
  * Direct SPIR-V Gen:
      truncated mean: 244495.91  (~80% reduction)

- LinkProgramBenchmark.Run/vulkan_compile_multi_thread
  * Through glslang:
      truncated mean: 4565894.83
  * Direct SPIR-V Gen:
      truncated mean: 1158164.10  (~75% reduction)

Bug: angleproject:4889
Bug: angleproject:6210
Change-Id: I486342702977c8114e90073b97183aba115a8b2d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3115140
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2021-10-14 04:43:32 +00:00
Jamie Madill 666fcf386f Rename functions that overlap with Windows APIs.
Bug: angleproject:6283
Change-Id: Ifcd9ea9e3bf729fd2066178eb9429050b2f10518
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212894
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-10-08 17:08:13 +00:00
Cody Northrop 8770cefc54 Capture/Replay: Store enums to JSON as hex
We're storing some enums in the per-trace JSON as decimal.
This makes them difficult to read, i.e.:

        "DisplayDeviceType": 12810,
        "DisplayPlatformType": 13392,
        "DrawSurfaceColorSpace": 12425,

If we instead convert them to hex, they are much easier to
read and grep the source for.

        "DisplayDeviceType": "0x320A",
        "DisplayPlatformType": "0x3450",
        "DrawSurfaceColorSpace": "0x3089",

Since JSON doesn't actually support hexadecimal values, this CL
stores them as strings.

Ideally we could take this a step farther and store the enum
directly in JSON, but we have no facilities for converting
a string back to an enum.

Bug: angleproject:5133
Bug: angleproject:6515
Change-Id: I7b5d4dc8958d43c611da1fe98887e089f3d855b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3204135
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2021-10-07 20:07:02 +00:00
Jamie Madill 9391199053 Add regression test for PBO write to vertex buffer.
There was no test coverage for the "packBuffer->onDataChanged()" call
in Framebuffer::readPixels.

Bug: angleproject:6371
Change-Id: Ib7ccf965a2375077046e21949dc26dc800abff09
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3182700
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2021-09-27 14:45:33 +00:00
Lubosz Sarnecki e024635d20 ANGLEPerfTest: Skip tests when missing color space support.
Make tests where a non-linear colorspace was requested on platforms
that do not support EGL_KHR_gl_colorspace non-fatal.

Add a initializeGLWithResult function to GLWindowBase, returning a
new GLWindowResult enum and wrap it in EGLWindow and WGLWindow.

Bug: angleproject:6366
Change-Id: Ib57327c4d988d82064272f229f8ad59287541623
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3151833
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-09-24 20:45:00 +00:00
Lubosz Sarnecki 952cb6a1e4 WGLWindow: Add support for color spaces.
Add WGL_ARB_pixel_format and WGL_EXT_colorspace to generate_loader.py.

Call wglChoosePixelFormatARB from WGL_ARB_pixel_format and use
enums from WGL_EXT_colorspace.

Fall back to ChoosePixelFormat if wglChoosePixelFormatARB is not
available or does not find a format.

Bug: angleproject:6366
Change-Id: I900f6fd6ee0501d5343f21c303b40f1347a53765
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3181720
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
2021-09-24 20:28:50 +00:00
Jamie Madill 9184973fc1 Add GetCompressedTexImageANGLE to ANGLE_get_image
Includes front-end support for reading back compressed texture images.
Back-end support is incomplete and will be implemented in a future CL.

CL authored by cnorthrop@google.com.

Bug: angleproject:6177
Change-Id: I1482b15e5ffec6120f09f51b2718cdbef07c93c8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3163359
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-09-20 22:12:38 +00:00
Jamie Madill 1a3b17dacd Capture/Replay: Fix GN build when JSON not available.
This change makes it so we no longer build frame capture when JSON
is not available. In Skia's build this is the case. Also updates
the GN scripts to use a new variable 'angle_has_frame_capture'.

Bug: angleproject:5133
Bug: angleproject:6374
Change-Id: I30290a160f6ebe6419f371e36d304a61bf0a85ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3152557
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-09-10 00:19:23 +00:00
Brandon Schade a33d902bc3 Add Entry points for GL_EXT_EGL_image_storage
Code generation for GL_EXT_EGL_image_storage

Bug: angleproject:6346
Change-Id: Ib918619205bfe7bd8fba0748ff6db593c858151f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3133763
Commit-Queue: Brandon Schade <b.schade@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-09-08 22:16:51 +00:00
Jamie Madill 2f3e4db838 Capture/Replay: Serialize trace metadata to a JSON file.
This will allow us to remove more code auto-generation for the trace
tests. The trace info now can be loaded directly from JSON instead of
from the autogenerated information.

Bug: angleproject:5133
Change-Id: I04e22b9279b19282df274bc8defcd363d0449111
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3140218
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-09-08 17:13:59 +00:00
Jamie Madill b6e99bb382 Rename and expand shader variable init feature.
This feature now forces both output and unitialized locals to be
initialized by the shader translator. This feature is needed by the
trace validator to ensure we get deterministic behaviour in traces
that exhibit some undefined results.

Bug: angleproject:5133
Change-Id: Id1242cd077a57e891eed217f7671976ce1631a58
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3140216
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-09-03 14:47:23 +00:00
Jamie Madill 9c05f55aa4 Capture/Replay: Add replay state validation.
We can use this to validate traces that have slight differences
when retracing. The valdation works by embedding the "expected"
JSON into a string at the end of each captured frame. The replay
also embeds a callback which fires right before the swap in the
replay harness. The harness then gets the "actual" JSON and runs
a comparison. On a mismatch it calls "diff" externally.
Currently the diff call is hard-coded to work on Linux only.

Note that when running validation it's important to replay on
SwiftShader since that's what we use to retrace.

Bug: angleproject:5133
Change-Id: Icbf0031d07be8bd916607c537dec235f9a512c43
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3066008
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-09-03 14:22:44 +00:00
Cody Northrop ef96bde8b0 Vulkan: Fix VVL error regarding geometryStreams
Addresses new validation error:

    [ VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-geometryStreams-02324 ] Validation Error: [ VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-geometryStreams-02324 ] Object 0: handle = 0xb400007e8176af60, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf1034461 | pCreateInfos[0].pRasterizationState pNext chain includes VkPipelineRasterizationStateStreamCreateInfoEXT, but geometryStreams feature is not enabled. The Vulkan spec states: VkPhysicalDeviceTransformFeedbackFeaturesEXT::geometryStreams must be enabled (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-geometryStreams-02324)

The validation was added in this commit:
bdaec8454a

Test: World of Kings MEC
Bug: b/198101940
Bug: angleproject:6339
Change-Id: I3cfacc20d231d246500e83451c9ec6b74d9372f2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3127942
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2021-08-30 18:50:39 +00:00
Tim Van Patten 58bb11ca62 Capture/Replay: Multi-Context Support
Add support for capturing and replaying multiple contexts.

1.) Create and initialize the Contexts in the share group during
SetupReplay().
2.) Track the Context the command stream is for, and if the Context ID
changes, inject an eglMakeCurrent() call to switch to the new Context.
3.) Intercept eglCreateContext() and eglMakeCurrent() to route to either
EGLWindow or WGLWindow, depending on the current platform.

Specifically, this enables capturing and replaying Asphalt 9.

Bug: angleproject:5878
Change-Id: I5bc9b7ece5388ce405ba3f9e9dc3967e78662000
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830145
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-08-27 23:24:59 +00:00
Jamie Madill 2f45d93d5b Capture/Replay: Init shader outputs during self-tests.
This forces all uninitialized variables to have default values.
For instance if the application doesn't initialize the output
color, or a varying that's use in the output, this will ensure we
don't use any undefined values in the computation.

Found when working on a re-trace of T-Rex, which doesn't write to
the alpha channel in the final rendering pass. Also fixes undefined
values in GLSLTest.InactiveVaryingInVertexActiveInFragment.

Bug: angleproject:5133
Change-Id: Ia291338e5adf23dab5263cb2ebe737dc05852d3e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3110225
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
2021-08-21 11:25:50 +00:00
Jamie Madill d2d1f41fdc Add EGL extension to create window with a swap interval set.
On Vulkan this allows creating a window once without needing to
recreate the swapChain after we specify the swap interval.

Also adds a simple regression test and EGL enum assertion
printing formatting.

Bug: angleproject:5133
Change-Id: I72af124cb0e8f7cddfa810988a9862c0f36a0e46
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3097806
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-08-20 20:31:34 +00:00
Kenneth Russell ff64d2c7e5 Choose direct-to-Metal translator through a feature.
Define directMetalGeneration in FeaturesMtl.h. If
ANGLE_ENABLE_METAL_SPIRV is defined to 1 (still the default),
directMetalGeneration defaults to false. It can be overridden via the
standard ANGLE mechanism:
  ANGLE_FEATURE_OVERRIDES_ENABLED=directMetalGeneration

It can also be overridden by instantiating angle_end2end_tests with
the directives:
  WithDirectMetalGeneration(ES2_METAL())
  WithDirectMetalGeneration(ES3_METAL())

These directives aren't working properly yet though. The
direct-to-Metal compiler is instantiated, but the _DirectMetalGen
versions of the tests fail. They pass when switching the Metal
backend's default behavior using the above environment variable. This
will be debugged in follow-on CLs.

Thanks to syoussefi@ for the prototype of this CL:
https://chromium-review.googlesource.com/3076129

Bug: angleproject:5505
Change-Id: I188ab89abc75bf89c5ed2d90102af311feaa1960
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3079083
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2021-08-11 20:58:45 +00:00
Jamie Madill 0e88f24024 EGLWindow: Add option to force robust init.
Not currently used but may be useful in the future.

Bug: angleproject:5133
Change-Id: I11c082a3285587217d5b955048547b0617b8c51b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3076132
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-08-09 12:52:48 +00:00
Jamie Madill 7ed0729dc5 EGLWindow: Add option to enable capture limits.
This will be useful for the replay serialization validation.

Bug: angleproject:5133
Change-Id: Ib5bb2a9522b0e35e47bdf2b1321fe6a18dcdb897
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3076131
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-08-09 12:09:38 +00:00
Lubosz Sarnecki 4a841e6aff PerfTests: Replay EGL color spaces.
Add EGL_GL_COLORSPACE_KHR to the EGLWindow's surface attributes if
EGL_KHR_gl_colorspace is available.

Require the extension to be available if the color space differs from
the default EGL_COLORSPACE_LINEAR value.

Bug: angleproject:5857
Change-Id: Ib33cbed7d4b115979bd847418cb5cd2b96f4f173
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3056374
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
2021-08-06 16:26:38 +00:00
Shahbaz Youssefi 22ae4ce0ea Revert "Disable RunAppAsync and RunAppAsyncRedirectStderrToStdout"
This reverts commit f4f866ce28.

Reason for revert: These tests should not be disabled. The culprit is
fixed per crbug.com/1233361

Original change's description:
> Disable RunAppAsync and RunAppAsyncRedirectStderrToStdout
>
> The tests are blocking the CQ due to flakiness.
>
> Bug: chromium:1233361
> Change-Id: Ib0283e201c271379364a177bea130d63322eee53
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3058233
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>

Bug: chromium:1233361
Change-Id: I24682f74d790d40f58a9526aaaaa842c3df23ec0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3058502
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-07-30 15:17:18 +00:00
Anton Bikineev f4f866ce28 Disable RunAppAsync and RunAppAsyncRedirectStderrToStdout
The tests are blocking the CQ due to flakiness.

Bug: chromium:1233361
Change-Id: Ib0283e201c271379364a177bea130d63322eee53
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3058233
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-07-28 15:52:37 +00:00
Alexis Hetu 729cbcf172 Make Display and X11 available in the same build
Chromium can use the 'use_ozone' and 'use_x11' build flags
simultaneously, so we need the Vulkan display to still be
selectable, even when the 'use_x11' flag is used.

This is required to make SwANGLE work with Ozone/Wayland, which
is going to use EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE
when SwANGLE is requested.

Bug: chromium:1231934
Change-Id: I2ac1d3d9bc231608d7f77e9a2540f4c538840076
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3049351
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
2021-07-23 17:12:58 +00:00
Geoff Lang 232e523656 Remove the explicit context extension.
This extension currently has no known users and doubles the
number of entry points that ANGLE exports which is a significant
binary size cost.

This saves about 130kb of binary size on Android.

Bug: chromium:1084580
Change-Id: Ib0fc4930b38a33bd61434f7d0030ba9fb9b93ba7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3015518
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-07-16 20:04:00 +00:00
Jamie Madill 48da1c3594 Vulkan: Prefer the local vulkan loader over the system one.
Load the Vulkan loader ourselves and give vkGetInstanceProcAddr to
volk. This allows us to always prefer loading from the current module
directory instead of using the platform-specific ordering.

Refactor angle::Library loading to use ModuleDir instead of
ApplicationDir.

CL originally authored by Geoff Lang.

Bug: chromium:1219969
Change-Id: I21d1926e90fd66e1c23cea7323991ae55f3d22d4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035444
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-07-16 18:56:40 +00:00
Kyle Piddington d33a22228e Upstream Apple's direct-to-Metal backend: compile libANGLE.
This change is meant to merge the metal backend changes from Apple's
direct-to-Metal backend. Taken from Kyle Piddington's CL:
https://chromium-review.googlesource.com/c/angle/angle/+/2857366/
The goal of this CL is to merge the metal backend code in a state
that compiles, but not to switch the Metal backend over to using
the direct-to-metal backend yet.

Bug: angleproject:5505
Bug: angleproject:6127
Change-Id: If6783e06e0086b3a1dd25c6f53caca5cfc96cb86
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2950067
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2021-07-12 14:54:45 +00:00
Shahbaz Youssefi 72d2bd0c87 Allow capturing process stdout and stderr interleaved
The test utils are enhanced to allow redirecting stderr to stdout.  This
is in preparation for a change that makes the test runner capture stderr
together with stdout.  Currently, on failure logs originating from
UNIMPLEMENTED() and other such macros are not captured.

Bug: angleproject:6077
Change-Id: I7a3c6c4732a59dac3ff0cc20a7835d5ed6f0f22e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2976183
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-06-22 20:01:31 +00:00
Jamie Madill 3f99e4d3c7 Better stack traces on Linux.
Checks the memory information for the process to compute a more
accurate address for each function.

Bug: angleproject:6070
Change-Id: I57f927f3641298af7921522da0ece683f8fd8faf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2971838
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-06-22 18:36:50 +00:00
Peter Kasting e62195c937 Fix another -Wc++11-narrowing issue.
Bug: chromium:1216696
Change-Id: I18ceae2d6bdd689830fafbfd12b1185c680f2e33
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2965192
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-06-15 19:02:35 +00:00
Brandon Schade 69f2fb0066 Vulkan: Expose OES_geometry_shader extension
Modify the symbol table generation script to accept a list
of supported extensions. This allows for the EXT and
OES versions of the geometry shader extension to be exposed.

Test: angle_deqp_khr_gles31_tests --deqp-case=*geometry_shader*
Bug: angleproject:3571
Change-Id: Ia7127a03dbd3fce78957f0505d3ce0c9bab6cb15
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2765011
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2021-06-08 23:16:33 +00:00
Shahbaz Youssefi 9bc837f64b Vulkan: Generate SPIR-V directly from the translator; Part 1
This is the first change in a series to generate SPIR-V directly from
the translator's AST, instead of the generating text GLSL and feeding it
to glslang.

This change implements the majority of the work needed to map AST types
to SPIR-V types, and declare types and interface variables in SPIR-V.
Additionally, it lays the infrastructure to conditionally enabling this
path in end2end tests.

No tests are currently enabled as the change doesn't actually generate
code for function bodies yet.

Bug: angleproject:4889
Change-Id: Iacb28b6907fd48c50e4cc5a0e7ad72f6eed241d4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2889603
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-05-19 19:03:10 +00:00
Gert Wollny ee2f330203 Capture/Replay: recreate the EGL window if contexts don't match
In addition enable affected tests.

Bug: angleproject:5955
Change-Id: I4fb72e38a633daa4565d3c0ae7cddb6ace7226f1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2891775
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-05-13 19:36:14 +00:00
Mohan Maiya 61167d5291 Add EXT_primitive_bounding_box entry points
Addition of the entry points for
GL_EXT_primitive_bounding_box extension.

Bug: angleproject:5896
Change-Id: I0dce407d2826ce3f730125d7c03f1233420f6780
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2849615
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
2021-04-26 15:12:33 +00:00
Mohan Maiya 2d741b430d Add KHR_blend_equation_advanced entry points
Addition of the entry points for GL_KHR_blend_equation_advanced
extension.

Bug: angleproject:3586
Change-Id: I7a651c19a4b3d0a7cfe4af7813f1530d27704bc1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830140
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2021-04-20 16:08:58 +00:00
Mohan Maiya bdf5f08496 Add EXT_texture_border_clamp entry points
Addition of the entry points for EXT_texture_border_clamp extension.

Bug: angleproject:3586
Change-Id: I366c2748213d7fdde815543129320278937000e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830146
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2021-04-20 14:28:18 +00:00
Geoff Lang 18c6d628c1 GL: Support VAOs without native VAOs.
Share the default VAO state between all frontend VAO when
there is no native VAO support. Forcefully sync state every
time a new frontend VAO is bound.

Bug: angleproject:5577, chromium:1167179
Change-Id: Ieaedb5108ad28fc78e7e58b74495639c5246bb05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2665266
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2021-04-13 15:55:39 +00:00
Jamie Madill 147adcfaeb Android: Call getExternalStorageDirectory natively.
This changes the call to base.test.util.UrlUtils to a native OS
method. We may need to update this when Chromium starts running
tests on "R". At that point we'll need a non-base mechanism to
pass the right folder to ANGLE. This could be via env vars,
debug properties, command-line arguments, or #defines.

The prior implementation is left as commented-out code as a
reminder to fix later.

Also updates WARN() to std::cerr because WARN() was not showing
up when testing.

Bug: chromium:1097957
Change-Id: I4a84ea007341dbe7fe2184eac3aae0ddca44cc9c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2818240
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2021-04-09 22:35:00 +00:00
Yuly Novikov 0eaaff28f4 Fix iOS and Android component builds
After the changes in http://crrev.com/c/2797833

Bug: angleproject:5811, angleproject:5820
Change-Id: I629978684ba4d002c296d4dcfe434b09782db4b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2812698
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-04-08 18:21:17 +00:00
Jamie Madill 68f06888a0 Perf Tests: Trigger test failure on API errors.
A prior refactor had broken the method we used to cause test steps to
fail on API errors. This CL restores the path. We detected this when
analyzing a particular GLES trace that contained invalid GLES calls.

Bug: angleproject:5788
Change-Id: I26940e49cf73ce6050ea6ee274d5c5748835a167
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2782008
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
2021-04-07 17:13:52 +00:00
Lubosz Sarnecki df72ea36f3 EGLWindow: Append noError context attribs only if enabled.
Push EGL_CONTEXT_OPENGL_NO_ERROR_KHR only to the context attribute list
if it's enabled in the mConfigParams. Prior to this patch the attribute
was pushed with a EGL_FALSE value if noError was disabled but available.

This resolves issues on EGL implementations which expose the extension
but fail if it's in the attrib list if certain conditions are met.

This is the case for mesa 21.0 when EGL_CONTEXT_MAJOR_VERSION_KHR is set
to 1 / GLES1.

Mesa upstream issue:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/4586

Bug: angleproject:5809
Change-Id: I91dfafe2a89f0488556942813087e54499895088
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2797331
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
2021-04-07 14:30:11 +00:00
John Plate 2489a0c104 Fixed OpenCL headers for Windows
Bug: angleproject:5761
Change-Id: I29d1fd3bf862728a3e78418a4f98219828394452
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2807717
Commit-Queue: John Plate <jplate@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-04-07 12:30:01 +00:00
Jamie Madill 78dde332f2 Move restricted traces to CIPD.
All traces are now stored as DEPS entries in CIPD. The auto-generation
script generates the DEPS entries. Note that we don't include DEPS in
the list of generated outputs to simplify other rollers. Also we update
auto-generation to include full sources list to allow 'gn analyze' to
work successfully.

Usees a trace fixture for common code. This will enable a more compact
trace without as much repeated code. We must land a set of re-trace
traces to avoid breakage. 

Also includes a python script for uploading new traces to CIPD. The
script first checks if traces are already present in the cloud, and if
so it skips the upload. It will take a while to complete as the number
of traces grows larger as it takes a few seconds per trace.

The traces in this patch are also re-traced to use the common fixture
code instead of including duplicated code in each trace. They now form
a simple common interface and the autogenerated cpp is now simply a list
of properties.

I've also updated the capture/replay tests to use the simpler common
entry point integration. There is less auto-generated glue code now.
We now use a new serialized string query extension instead of calling
directly into ANGLE's internals.

Also includes a docs update. The capture/replay sample is broken and
we'll need to update it in a follow-up CL. Also includes a few necessary
fixes to the retracing script.

Bug: angleproject:5811
Change-Id: I977bc6dc56843c8966377fc445ae97e91e17319a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2797833
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
2021-04-05 23:00:39 +00:00
Mohan Maiya dd5705e773 Add missing qualifier type handling in translator
Translator checks tessellation shader unsized array type qualifier.
sample in/sample out were missing in handling qualifier type.

Bug: angleproject:5557
Test: GLSLTest_ES31.VaryingTessellationSampleInAndOut*
Change-Id: I8a2f2c4c4fcc9cc88000d3b2d448ab51fb9e5d38
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2776263
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
2021-03-24 17:33:10 +00:00
Amy Liu 49babcbc07 Fix crash of MultithreadingTest end2end tests.
Extension platformANGLEContextVirtualization is currently only
supported in the OpenGL backend, it's confused to validate it
when the test is set up by WithNoVirtualContexts(). It'll generate
crash when it's not OpenGL backend.

Bug: angleproject:5636
Change-Id: Ib04fb4a3d29beaac5162e63af5ef1fd80c8a420c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2709821
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-02-24 21:05:14 +00:00
Lubosz Sarnecki 37752956fd Generators: Use fixed year in license headers.
Remove dynamic year generation from generator scripts, as required by
the Chromium C++ style guide.
The dynamic year values were replaced by the current year at the time
the file was created according to git log. The code to dynamically
generate the year was removed.
This patch also refreshes generated files and hashes.

Bug: angleproject:5516
Change-Id: I735028bccb5c83217e92c380538f1abf0a906b2c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2690950
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2021-02-23 17:17:12 +00:00
Cody Northrop 0fa6c307ac Enable ES 3.2 in ANGLE's loader
Test: Capture and replay ES 3.2 apps
Bug: angleproject:5652
Change-Id: I2dac84d3cf6534ee1b10889ba1312ae247ae8f62
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2698391
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2021-02-17 15:43:56 +00:00
Jamie Madill a8a2a71b3a Vulkan: Support y-flip with no driver support.
We can reuse the surface rotation matrix code to do the y-flip.
This requires the SPIR-V transformation support. Because not
all rotations are encoded into the table we can only support
rotation with the driver support for y-flip (currently).

Includes some very minimal regression testing. This work is
targeted towards supporting vk-portability implementations
which are not as up-to-date with Vulkan features.

Bug: angleproject:5596
Change-Id: I270fa1efc03267551d28df33ddac9972e1343d60
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2665892
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-02-10 17:03:45 +00:00
Shahbaz Youssefi 5b8dec52b6 Reland "Use is_apple instead of is_mac and is_ios everywhere"
This reverts commit 51603c63d1.

Reason for revert: Fixed issue that broke Skia build

Original change's description:
> Revert "Use is_apple instead of is_mac and is_ios everywhere"
>
> This reverts commit 2762641a3a.
>
> Reason for revert: is_apple is not universally defined. Breaks ANGLE roll into Skia.
>
> Original change's description:
> > Use is_apple instead of is_mac and is_ios everywhere
> >
> > Bug: chromium:1161513
> > Change-Id: Id7d582f127f4b79ea6fc5b8ad39fff768c45f477
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2611312
> > Reviewed-by: James Darpinian <jdarpinian@chromium.org>
> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
>
> TBR=jdarpinian@chromium.org,syoussefi@chromium.org
>
> Bug: chromium:1161513
> Change-Id: I831e60149f410044a79d9f66aa9ddd9902410fd7
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2618039
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>

TBR=jdarpinian@chromium.org,syoussefi@chromium.org

Bug: chromium:1161513
Change-Id: I3cf30aa047a1f208fa7d1acda1d6d4e5da7b6ad5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2622244
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-01-12 15:44:03 +00:00
Shahbaz Youssefi 51603c63d1 Revert "Use is_apple instead of is_mac and is_ios everywhere"
This reverts commit 2762641a3a.

Reason for revert: is_apple is not universally defined. Breaks ANGLE roll into Skia.

Original change's description:
> Use is_apple instead of is_mac and is_ios everywhere
>
> Bug: chromium:1161513
> Change-Id: Id7d582f127f4b79ea6fc5b8ad39fff768c45f477
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2611312
> Reviewed-by: James Darpinian <jdarpinian@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>

TBR=jdarpinian@chromium.org,syoussefi@chromium.org

Bug: chromium:1161513
Change-Id: I831e60149f410044a79d9f66aa9ddd9902410fd7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2618039
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-01-09 04:51:43 +00:00
Mohan Maiya 68f35f242a Vulkan: Add GL_EXT_clip_control entry points
Addition of the entry points for GL_EXT_clip_control extension.

Bug: angleproject:5471
Change-Id: If17ba0120bdb226cc5728bfea83e9085260eba19
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2615862
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
2021-01-08 17:55:59 +00:00
James Darpinian ebf0070383 angle_end2end_tests passes on iOS!
Miscellaneous test skips and fixes for iOS.

Bug: angleproject:5417
Bug: angleproject:5491
Change-Id: Id0785e6243949fc756e4d7923dbbe77a411052f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2606656
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
2021-01-06 23:08:43 +00:00
Shahbaz Youssefi 2762641a3a Use is_apple instead of is_mac and is_ios everywhere
Bug: chromium:1161513
Change-Id: Id7d582f127f4b79ea6fc5b8ad39fff768c45f477
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2611312
Reviewed-by: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-01-06 21:28:50 +00:00
Jonah Ryan-Davis 88fec1e88f Code generation for NV_framebuffer_blit
Generate the entry points for NV_framebuffer_blit.

Bug: angleproject:5474
Bug: chromium:1157057
Change-Id: Iadffa24ce7368d8ab6c4bf9d5b6c016276e762f5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2602242
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2020-12-23 23:39:50 +00:00
James Darpinian 0dbe7cdde4 iOS testing support
angle_white_box_tests build and runs and passes on the iOS
simulator with this change. angle_end2end_tests builds and runs but
crashes.

Bug: angleproject:4256
Bug: angleproject:5417
Change-Id: I8817e46415c4598cbfae49804727a2e9b21baff1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2600361
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2020-12-23 20:25:41 +00:00
Jamie Madill 00643e7d5e Use Android API to get storage path.
This pipes through to a system call via JNI. This will allow
Chromium changes to land that were prevented because ANGLE
hard-coded some parts of this path. This in turn will allow
us to more easily override these paths for changes needed
for Android R support.

Bug: chromium:1094062
Change-Id: I20d75b8ee40d418ba5c057f618640ef896248299
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2315483
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2020-12-22 17:40:34 +00:00
Mohan Maiya f32fbb51e8 Add EXT_shader_framebuffer_fetch_non_coherent entry points
Addition of the entry points for
EXT_shader_framebuffer_fetch_non_coherent extension.

Bug: angleproject:5454
Change-Id: I2b8ba5141eed61a0c3ba58aeb2eec12a2071e7f1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2590991
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-12-15 19:45:15 +00:00
Jamie Madill 5b6d60f84f Mac: Remove stderr output from lib preload.
This was causing the debug bots to fail.

Bug: angleproject:5467
Change-Id: Iea7fe0260e23c1c9770c431d52fea49335b3d0cf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2593568
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-12-15 16:15:06 +00:00
Le Hoang Quyen cb8903b143 Metal: Ignore OS's internal shader cache when testing.
Internal shader cache caused timeout in some dEQP tests.
Work-around: ignore the cache by hooking fopen function and return null
when the cache related files are accessed.

Bug: angleproject:5354
Change-Id: I12ca228540925e67454bf24ce1ba83d703882c87
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2580918
Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2020-12-15 02:42:59 +00:00
James Darpinian dea8629453 iOS build support
libGLESv2 builds with these changes on iOS, iOS Simulator, and
Mac Catalyst, using CGL or EAGL as appropriate. Tests will
require more work. Fixed several errors in the EAGL code which
hadn't been detected because the code wasn't built.

Bug: angleproject:4256
Bug: angleproject:5417
Change-Id: I29072d82607ef2500732c5cc00318fdab4a46b31
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2570211
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
2020-12-07 21:47:35 +00:00
Mohan Maiya 8670d6183a Add support for GL_EXT_debug_label
Add support for labeling of GL objects for debug purposes.

Tests: DebugTest.ObjectLabelsEXT*
Bug: angleproject:5337
Change-Id: I792a27c69395ed62da70c3f619bef71776fba432
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568711
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
2020-12-03 00:49:07 +00:00
Shahbaz Youssefi bc82325e34 Fix RedGreenGradient to not output 0 for half the image
The shader directly used v_position.xy as output color, but for half of
the image x and y are negative and the respective channel became zero.

This change makes the shader use v_position.xy*0.5+0.5.  Additionally,
the tests that use this shader are changed to mathematically derive the
pixel colors instead of using magic numbers.

Bug: angleproject:5395
Change-Id: Ic11c362c22ca725aa173faa5fd6033a02a4303fd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2559265
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2020-11-25 18:01:39 +00:00