255 Commits

Author SHA1 Message Date
Avi Drissman
f2e0f8a0b2 Don't allow ANGLE to be compiled as ARC
Chromium is switching to compilation with ARC. While there are
remnants of ARC dual-compilation, ANGLE isn't ready for that, so don't
allow it to be compiled with ARC.

Bug: chromium:733237, angleproject:8267
Change-Id: If5c8d5ab039fb44e10102df616e72dbcfd55ac70
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4698494
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-07-20 18:35:39 +00:00
Kimmo Kinnunen
16841d6256 Reland "Remove SPIRV_METAL references from .gn and tests"
The backend was removed but the references were not.

Update ShaderBinaryTest to properly skip tests if shader binaries are
unsupported in the current ANGLE backend.

Forcibly re-enable building of the Vulkan backend on macOS to keep
ANGLE's SwiftShader backend working.

Fixed: angleproject:6081
Change-Id: I5e6e47d5fe05b0dd6ec150b6db9fe5d75e580173
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4594582
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-06-06 19:19:08 +00:00
Yuly Novikov
c37d74a5b4 Revert "Remove SPIRV_METAL references from .gn and tests"
This reverts commit f7badd3faa.

Reason for revert: disables SwiftShader fallback on Mac

Original change's description:
> Remove SPIRV_METAL references from .gn and tests
>
> The backend was removed but the references were not.
>
> Update ShaderBinaryTest to properly skip tests if shader binaries are
> unsupported in the current ANGLE backend.
>
> Fixed: angleproject:6081
> Change-Id: I54bb4080763fbc0dcc2515e71ccd5df5c536db5b
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4591046
> Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>

Change-Id: Id41035017830d8b36b29bc4497919c6b01fc3f35
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4595018
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-06-06 17:08:06 +00:00
Kimmo Kinnunen
f7badd3faa Remove SPIRV_METAL references from .gn and tests
The backend was removed but the references were not.

Update ShaderBinaryTest to properly skip tests if shader binaries are
unsupported in the current ANGLE backend.

Fixed: angleproject:6081
Change-Id: I54bb4080763fbc0dcc2515e71ccd5df5c536db5b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4591046
Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-06-06 14:21:52 +00:00
McKnight22
9de2cfb065 [riscv64][android] support 64-bit builds on riscv64
For arch riscv, android supports riscv64 only.
So, only riscv64 is added to be supported.

co-authors: McKnight22 <tao.wang.2261@gmail.com>
            Wang Chen <wangchen20@iscas.ac.cn>

Bug: angleproject:8165
Change-Id: Iaa732ece963e82abeb7ae517eae3a26e1314f56c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4530628
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2023-05-17 01:16:21 +00:00
Roman Lavrov
961788fdee Capture/Replay: reorganize trace-related gni
Move trace-related code from gni/angle.gni to
src/tests/angle_traces.gni

Rename template angle_trace_library to angle_trace_libs as the idea is
for it to build multiple libs.

Name outside-of-apk lib group ${target_name}__unpacked_libs which is
more consistent with how targets are usually named in gn, and makes the
dependency explicitly tied to template instantiation.

Bug: b/276474703
Change-Id: I316f2a549063b8ebae177f4ffc0d4a8de1942384
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4508387
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-05-05 17:12:13 +00:00
Roman Lavrov
3ad1d7024a angle_trace_tests_android_binaries: test -> group
We don't need it to be a test to begin with. But I looked into it
because test with use_raw_android_executable=True makes things
really complicated due to the way this is implemented upstream:
'''
this __dist target here
    https://crsrc.org/c/testing/test.gni;drc=acb6ab509901650450fc387c0d9f09eb6f3f3248;l=265
which uses create_native_executable_dist
which copies files according to the list of libs:
    https://crsrc.org/c/build/config/android/rules.gni;drc=a8c26a11f6cf763a5e81b2bced40584a678b9b8a;l=94
which is actually generated not at build time but by gn gen
(also called when editing gn args)
and so the inputs are not the libs themselves but
this file which only contains a list of file names
so when libs change there is no change to the inputs of this rule..
so it doesn't get invoked and the copy doesn't happen
'''

One caveat is we need to produce a list of .so libs as a data dependency
for them to be picked up by isolate

Bug: b/276474703
Change-Id: I375a5be8499f13311654244036e36c60d945c363
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4507534
Auto-Submit: Roman Lavrov <romanl@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2023-05-05 14:25:59 +00:00
Cody Northrop
35461e60bd Android: Build traces outside of APK
Our trace list has gotten too large for a single APK (2GB).

To continue supporting compiled traces, we can now place the
libraries in the test application's home directory, which
is discoverable and executable without root.

To build and run with all traces, use `angle_trace_perf_tests`
as your build target, then use the local Android helper script:

$ autoninja -C out/<config> angle_trace_perf_tests
$ (cd out/<config>; ../../src/tests/run_angle_android_test.py \
   angle_trace_tests --filter='*among_us' \
   --verbose --local-output --verbose-logging \
   --fixed-test-time-with-warmup 10)

To continue using bundled libraries, specify your trace list in
GN args using `angle_restricted_traces` and use steps that
match other platforms:

$ autoninja -C out/<config> angle_trace_tests
$ out/Android/angle_trace_tests --gtest_filter='*among_us*' \
   --verbose --local-output --verbose-logging \
   --fixed-test-time-with-warmup 10

Bug: b/276474703
Change-Id: I3829cf7016e21894eee8890e2b0d527e8214f04e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4420279
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2023-04-25 22:15:49 +00:00
Kimmo Kinnunen
20b6624a88 Metal: Support compiling on iOS without EAGL
Makes EAGL and CGL compilation exclusive to each other. Catalyst would
compile with both on ARM64, but only use EAGL.

Remove use of GLSL generation in MSL. Generating GLSL for MSL
compute and geometry shaders do not make sense.

Remove compilation of RewriteRowMajorMatrices for Metal.
It was removed from Metal in:
  b23bf47c9e
  Reland "Metal: rewrite default uniforms and uniform blocks"

Remove use of ANGLE_ENABLE_APPLE_WORKAROUNDS and gn variable
angle_enable_apple_translator_workarounds. The workarounds are just
unconditional business-as-usual implementation of ANGLE when ANGLE is
compile for PLATFORM_APPLE.

Fixed: angleproject:8129
Change-Id: I3af249708803fba816e2a7c92c35dddb84ce6946
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4428875
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Dan Glastonbury <djg@apple.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2023-04-19 09:22:51 +00:00
Roman Lavrov
a636aa5c74 Fix win-trace broken by tracegz.py
Gets invoked on win-trace resulting in errors like:

    FileNotFoundError: [Errno 2] No such file or directory: '..\\..\\src\\tests\\restricted_traces\\BindGeneratesResourceTest_Textures_ES2_Vulkan_SwiftShader\\BindGeneratesResourceTest_Textures_ES2_Vulkan_SwiftShader.json'

https://ci.chromium.org/ui/p/angle/builders/ci/win-trace/3788/overview

Bug: b/276742336
Change-Id: I2d86cdbcbc0286746e535a4b19f4d4b547b5783f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4436590
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Roman Lavrov <romanl@google.com>
2023-04-17 21:10:01 +00:00
Roman Lavrov
4e07335654 Trace Interpreter: gzip cpp and run gold tests.
New test step:
angle_restricted_trace_gold_interpreted_tests
similar to existing
angle_restricted_trace_gold_tests

but runs a subset of newest traces that have the right format.
Currently there are 8 of them and the filter is hard-coded in
test_suites.pyl. rise_of_empires can also be run interpreted but
happened to flake during testing so it's not included for now.

Trace cpp files are concatenated and gzipped
as a build step producing gen/tracegz_{trace}.gz
and these gz files are then distributed as part of the build

--trace-interpreter flag changes from boolean to string to support:
--trace-interpreter=gz:
* this uses the gz file above
* gold tests added in this CL use this option

--trace-interpreter=c:
* using uncompressed c/cpp file
* existing angle_trace_interpreter_tests runs a retrace
  saving .c files and uses this option

Bug: b/276742336
Change-Id: I69544f25bda873af191978195d02ffbdd34363c0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4424690
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-04-14 22:48:37 +00:00
Yuly Novikov
aa97369fca Use C++20 for MSVC builds as well
Build only ANGLE libraries on MSVC,
as there are many failures in tests,
which are beyond our scope to fix.

Bug: chromium:1380553
Change-Id: I7142730bfa1fc847630ff8115709e435aecf487a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4286569
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-02-27 20:33:05 +00:00
Jonah Ryan-Davis
587a19690e Enable X11 and OpenGL backends for CastOS.
X11 was disabled on CastOS back when 'use_x11' was copied over from
Chrome. There have been changes in ozone and CastOS is now available on
ozone x11, so ANGLE should support it too. The GL backend was also left
out when is_castos is true.

This CL should be followed up by a cleanup CL for ANGLE's gni file so we
can avoid these mistakes. The follow-up CL should be verified as a
no-op.

Bug: chromium:1409689
Change-Id: I6111af41f2e46b8451f19653a6b77c12d277dbe2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4219253
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-02-02 19:01:37 +00:00
Dave Tapuska
2e9909f5e6 Metal: Enable Metal on iOS in gni build.
Use is_apple instead of is_mac to enable metal on iOS.

Some iOS simulator Metal tests needed to be added to the test
expectations as they fail on the Intel buildbot. These will to be
progressively fixed out of band.

Bug: chromium:1411704, angleproject:7994
Change-Id: I4df036d76f48d165da444f769607194dbe7d4957
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4210649
Auto-Submit: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2023-02-01 22:56:30 +00:00
Yuly Novikov
a0b0ec00ba Disable building Mesa by default
CQ build broken after crrev.com/c/4117820.

Bug: angleproject:7689
Change-Id: Ib40ec5736011c0ae3df2a79a865247168b7bd077
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4123249
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
2022-12-22 23:36:16 +00:00
Amirali Abdolrashidi
58d7ace238 Vulkan: Add memory allocation log support in debug
* Added a memory tracker to the renderer object to keep track of the
memory allocations and deallocations in more detail.

  * This feature is used for debugging only.

  * To enable it, set angle_enable_memory_alloc_logging=true in GN args
    (added in renderer/vulkan/BUILD).

    * It is related to ANGLE_ENABLE_MEMORY_ALLOC_LOGGING in the code.

  * The tracker are updated in the memory allocation tracking functions
    if the feature is enabled. (The counter is always updated, even if
    the feature is disabled.)

  * At the end of a RendererVk object, it checks for and logs any
    remaining allocated memory from MemoryAllocationType members.

  * The data is stored in the map object "mMemoryAllocationTracker".
  The key used for it is currently of type angle::BacktraceInfo.

    * If angle_enable_unwind_backtrace_support is disabled, or not on
      Android, the key is an empty object.

  * MemoryAllocInfoMapKey is used as a key to access the allocation
    information.

Bug: b/242641395
Change-Id: If701a4bdea2f8738a830ee47e0c7c5cdacf95b87
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4050103
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
2022-12-02 20:15:44 +00:00
Amirali Abdolrashidi
f62405c5ac Add utilities to get the Android backtrace
* Added getBacktraceInfo(), which returns the backtrace information
  from the ANGLE code, including the addresses and the symbols if
  possible

  * Returns the data in an instance of the new class BacktraceInfo.

  * In order to access this function, backtrace_utils.h has been
    included in vk_utils.h

* New GN flag to make use of this feature:

  * angle_enable_unwind_backtrace_support

    * Current only available on Android (debug mode)

  * If the flag is disabled, getBacktraceInfo() returns an empty
    object.

* Added functions in util/ (per platform) to print the BacktraceInfo
  data.

  * Example of usage:
      angle::printBacktraceInfo(angle::getBacktraceInfo());

* Minor edit: Moved cstdint from android_util.cpp to its header.

Bug: b/258475923
Change-Id: I6115462a1a2845d40c7cafc14ce52df09ecdcf34
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3995843
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
2022-11-11 18:18:55 +00:00
Shahbaz Youssefi
78e28cb8f7 Vulkan: Remove glslang fallback
ANGLE's SPIR-V generator is battle tested by now.

Bug: angleproject:6210
Change-Id: I2ed88642e3ede435e3f906fbd701133be6873fb7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4002868
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2022-11-08 14:42:58 +00:00
Jamie Madill
04cf49bc56 Update Mesa build variables.
For gclient: angle_mesa -> checkout_angle_mesa
For BUILD.gn: build_angle_mesa gets set automatically.

Bug: angleproject:7689
Change-Id: I89ff8a54fc87d9fb28ac998331ffbd0d8eb246ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3989923
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2022-10-29 02:14:10 +00:00
Jamie Madill
41184c21df Add support for building Mesa + Zink.
Uses a conditional gclient variable "angle_mesa". You must set
this to True in your .gclient to download and configure Mesa.

After that you must also set angle_build_mesa=true in your GN
args. We call through to meson in order to setup and build.

Mesa sources and targets are written into an auto-generated GNI
file. We must update this file on the same cadence as Mesa rolls.

Because the version of libdrm we use in our sysroot is older than
Mesa requires, this CL also includes a custom libdrm build. Also
in order to run bison and flex on the old sysroot that Chrome
infra runs with, this CL includes a new version of flex and bison
that run without newer versions of GLIBC.

Bug: angleproject:7689
Change-Id: I1aeeda1e6f3cf1d5f878aeab5209afa7e1fb5324
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3933062
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-10-27 16:19:10 +00:00
Jamie Madill
dc62b3eef6 Capture/Replay: Add trace interpreter.
Also adds a self-test using the retrace script.

Bug: angleproject:7752
Change-Id: I1985b47250bef99726d2ca2d90bef859208e357e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3965128
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2022-10-21 23:12:02 +00:00
Jamie Madill
d25911dece Capture/Replay: Move trace fixture into util/
This will allow us to cleanly import the fixture headers
outside of libANGLE. We'll need to call into the trace fixture
in the trace interpreter, which will be in util/.

Bug: angleproject:7752
Change-Id: I3438989db8482924272c69e78d7ac5702e510648
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963363
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-10-20 17:44:08 +00:00
Jamie Madill
0e0ea0265b Split trace tests out into angle_trace_tests.
This makes angle_perftests strictly for microbenchmarks.
The trace tests are a better separated target because they
are for both gold correctness tests and performance.

You can now use the GN arg "build_angle_trace_tests" to control
building the trace tests. "build_angle_trace_perf_tests" is
still supported for compatibility.

Updates the infra scripts to use this new trace tests target.
Also updates the build so by default we'll build the trace
tests if you check them out, without needing a custom arg.

Also updates docs.

Bug: angleproject:7755
Change-Id: I2b1ae67799234cc1aefe7cda5f3af945c3f867fd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3953340
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2022-10-17 22:41:58 +00:00
Yuly Novikov
74b37bcbfb Remove run_gtest_angle_test script.
Shouldn't be used after crrev.com/c/3399045 and crrev.com/c/3035587

Bug: angleproject:5417
Change-Id: Iadf629d94a561a99ebfe2539dbabda5e17db5be6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3929144
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2022-09-30 15:08:39 +00:00
Constantine Shablya
b9df95ffdf Add option to enable System EGL on all test configs
Introduce angle_test_enable_system_egl build option
to enable ES1_EGL, ESL2_EGL and ES3_EGL on all test
instantiation macros. This allows GLES 1.x tests to
run on native drivers.

Test: angle_end2end_tests --gtest_filter="*/ES1_EGL"

Bug: angleproject:6201
Change-Id: I6981eb9e99f0cdbd030319f014a7b371ced7e1e7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3812046
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2022-09-07 19:08:56 +00:00
Eddie Hatfield
3960e63b1a Infra: Enable angle_deqp_gl46_tests on SwiftShader
This change disables the WGL frontend by default on
Windows when building ANGLE for desktop GL. This
is because the WGL frontend is not yet fully
implemented and it causes some of the trace tests to
fail. The WGL frontend should be enabled by default on
windows when more of its functionality gets implemented.

Test: angle_deqp_gl46_tests --use-angle=swiftshader
Bug: angleproject:7566
Bug: angleproject:7628
Change-Id: I69c695eb56d3858f715eeb86d28cc805e25c60eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858142
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2022-09-02 18:46:02 +00:00
Eddie Hatfield
d89c027e7c Add unimplemented GLX entry points to desktop GL
Test: Run glxgears and hit unimplemented in ANGLE

Bug: angleproject:7533
Change-Id: Ic7ed7506b6d0c5ef5022ae6899cbd6c4d351b178
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3852631
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2022-08-24 21:26:01 +00:00
Eddie Hatfield
5317b778e8 Enable desktop GLSL for desktop GL frontend
Bug: angleproject:7533
Change-Id: I91bd0c217880b05683b86449a9211b9844575ebc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3850471
Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2022-08-24 16:40:11 +00:00
Roman Lavrov
2de8bb42a9 Converge run wrappers into angle_test_util.RunTestSuite
Bug: angleproject:7299
Change-Id: Ifa882028a6f49579b4a9c6893053cb3bee8d83fd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3808302
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2022-08-08 14:48:23 +00:00
Eddie Hatfield
c54ed79053 Get desktop GL conformance tests to build
The target for these tests is angle_deqp_gl_tests.

Bug: angleproject:7533
Change-Id: I290822671d99da020f9a6a1f02bee43987644bf9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3766435
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2022-08-03 22:17:47 +00:00
Peng Huang
3dd6f5f74f Reland "Disable share context lock for Chromium"
This is a reland of commit e1741f4ba7

Original change's description:
> Disable share context lock for Chromium
>
> Bug: chromium:1336126
> Change-Id: I93b4e738a8816e6b318e5d5823bc9130f17deb37
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3781368
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Peng Huang <penghuang@chromium.org>

Bug: chromium:1336126,angleproject:7537
Change-Id: I15811bc2fef0ba22f6ac13d51c72ed96b2a12507
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3792046
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2022-07-28 21:22:31 +00:00
mark a. foltz
a78c01b27d [Cast Convergence] Remove is_chromecast in ANGLE.
is_chromecast is going to be removed from Chromium.  This is_chromecast
with is_castos, which will be set for builds that target Nest Linux
devices.

Upstream bug: https://crbug.com/1337084
Umbrella bug: https://crbug.com/1219802
Design doc (internal only): https://go/unified-cast-web-runtime

Bug: angleproject:7521
Change-Id: Id1a0df72e37868eabd1f851123eec615f6657570
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3782573
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2022-07-26 19:53:35 +00:00
Lubosz Sarnecki
45e5cf0147 Vulkan: Implement ASTC emulation.
Implement ASTC emulation using the astc-encoder library.
Add copy_image tests to deqp_gles31_test_expectations for desktop cards.
Add emulatedAstc limitation.
Don't expose emulated ASTC from WebGL contexts.
Introduce ANGLE_HAS_ASTCENC define to check for build availability.
Only build on angle_standalone configurations.

DEPS: Add astc-encoder.
image_util: Decode ASTC to RGBA.
TracePerfTest: Skip car_chase and genshin_impact on NVIDIA.

Bug: angleproject:7415
Change-Id: Ib2f3fd3f710164a2ecd5d5edf780227031bbfb84
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3697999
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2022-07-19 12:24:48 +00:00
Shahbaz Youssefi
c775dd498a Allow list of restricted traces to be overriden in gn args
When focused on profiling a single or a few traces, this speeds up build
and upload to Android.

Bug: angleproject:7404
Change-Id: I5234a6fa7e8167f86b5b33b8db526662a7d65bd9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3438425
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2022-06-28 03:05:46 +00:00
Brian Ho
1adf46a60a Enable X11 defines on ChromeOS
While the typical deployment of ChromeOS on physical hardware does
not use X11, the linux-chromeos-rel and linux-lacros-rel builders on
the Chromium CQ do. These builders compile a special version of
Chrome with all of the ChromeOS features (e.g. the system UI) that
runs on top of a generic Linux bot as a windowed application.

As a result, this special build of CrOS needs to interface with the
windowing system of the host Linux machine, which is X on the CQ
bots. These builds still have target_os=chromeos, so we need to
include is_chromeos to angle_use_x11 to get the right defines.

Unfortunately, this CL breaks the linux-chromeos bots as the X11
define makes ANGLE use VulkanXcbDisplay which in turn fails init as
SwANGLE does not support VK_KHR_xcb_surface. There's a Chromium CL
that fixes this by explicitly requesting the headless display. Thus,
we need to wait for that to land or else the Chromium CQ will break
on roll.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/3686625

Bug: b/233238923
Change-Id: Ifec50f68826aef2c3d732ae9dedabcd6d61f45a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3689809
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2022-06-14 14:29:54 +00:00
Jamie Madill
7df1f58164 GN: Add angle_build_tests.
This lets ANGLE builders disable targets they don't need or can't
build.

This will fix the roll into Skia broken by http://crrev.com/c/3645441.
Dawn will also need to update its .gn file to set angle_build_tests
to false.

Bug: angleproject:4964
Change-Id: Ie40bdd33d7b59e93813a35df20c4f09c32961f51
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3664296
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Auto-Submit: Jamie Madill <jmadill@chromium.org>
2022-05-24 15:55:37 +00:00
Jamie Madill
3da24b5cd3 Move trace loader code to a common location.
With that Capture/Replay will be able to make use of the same
code.

CL authored by gert.wollny@collabora.com.

Bug: angleproject:4964
Change-Id: Ie1ba663169a34929f5a169ab74c7042e9fd5deb0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645441
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-05-20 15:59:54 +00:00
Antonio Caggiano
2fb58a95b0 Re-land: "Vulkan: GBM platform"
Add support for GBM platform by implementing a Display with no WSI
extension.

Re-land fixes build script, including GBM Vulkan backend whenever ozone
platform GBM is enabled.

Bug: angleproject:7217
Change-Id: Icbf2d034b700e22ab4c351e479f472d65d832ebe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3637562
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2022-05-10 15:46:47 +00:00
Yuly Novikov
0db4c39b5b Revert "Vulkan: GBM platform"
This reverts commit 825d5b2c59.

Reason for revert: Fails link rolling into Chrome crrev.com/c/3635013
https://ci.chromium.org/ui/p/chromium/builders/try/chromeos-amd64-generic-rel/1149608/overview
https://ci.chromium.org/ui/p/chromium/builders/try/linux-chromeos-compile-dbg/1013047/overview
https://ci.chromium.org/ui/p/chromium/builders/try/linux-chromeos-rel/1189185/overview

Original change's description:
> Vulkan: GBM platform
>
> Add support for GBM platform by implementing a Display with no WSI
> extension.
>
> Bug: angleproject:7217
> Change-Id: Ia9089131c5984dfdd926d2f85f1c218df1e84d9a
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3596042
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

Bug: angleproject:7217
Change-Id: Ia8a4ca753a8f18d6a2c607010b5afabf6a78fe9a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3636059
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-05-09 20:04:14 +00:00
Antonio Caggiano
825d5b2c59 Vulkan: GBM platform
Add support for GBM platform by implementing a Display with no WSI
extension.

Bug: angleproject:7217
Change-Id: Ia9089131c5984dfdd926d2f85f1c218df1e84d9a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3596042
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2022-05-09 18:08:24 +00:00
Antonio Maiorano
b72cff8c0a Fix build flags not in declare_args when angle_has_build is true
Required so that these can be overridden in .gn files. Will allow us to
fix roll of ANGLE into Dawn.

Bug: angleproject:6902
Change-Id: I8636778969ae489fdc7420414957d43fcfb634a8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3627120
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-05-04 15:07:18 +00:00
Brian Osman
9200ba5371 Reland "Make SPIRV optional for Metal backend"
Updated default conditions to match old behavior.

This is a reland of commit 29287e1fc7

Original change's description:
> Make SPIRV optional for Metal backend
>
> This allows clients (ie Skia) to build ANGLE without needing
> all of the additional Vulkan dependencies. Developer builds
> will continue to include both the direct and SPIRV paths, for
> debugging purposes.
>
> Bug: angleproject:7155
> Change-Id: I1c38ee19e747df8b25fd2f8e8efa3b420a4d7766
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3605764
> Commit-Queue: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Auto-Submit: Brian Osman <brianosman@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

Bug: angleproject:7155
Change-Id: I439160f2e1f05a3dbe22df82336246a73a0a7d0b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3615012
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2022-05-03 02:48:26 +00:00
Cody Northrop
437053a163 Revert "Make SPIRV optional for Metal backend"
This reverts commit 29287e1fc7.

Reason for revert:
Possible root cause of Mac failures http://crbug.com/1320588

Original change's description:
> Make SPIRV optional for Metal backend
>
> This allows clients (ie Skia) to build ANGLE without needing
> all of the additional Vulkan dependencies. Developer builds
> will continue to include both the direct and SPIRV paths, for
> debugging purposes.
>
> Bug: angleproject:7155
> Change-Id: I1c38ee19e747df8b25fd2f8e8efa3b420a4d7766
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3605764
> Commit-Queue: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Auto-Submit: Brian Osman <brianosman@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

Bug: chromium:1320588
Change-Id: Id160118146dad1b8f1af40c60ddefd717516cd1d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3614527
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2022-04-28 16:38:31 +00:00
Brian Osman
29287e1fc7 Make SPIRV optional for Metal backend
This allows clients (ie Skia) to build ANGLE without needing
all of the additional Vulkan dependencies. Developer builds
will continue to include both the direct and SPIRV paths, for
debugging purposes.

Bug: angleproject:7155
Change-Id: I1c38ee19e747df8b25fd2f8e8efa3b420a4d7766
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3605764
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2022-04-27 21:03:37 +00:00
Yuxin Hu
80d50b9928 Add build arg to automatically attach renderdoc
Macro ANGLE_TEST_ENABLE_RENDERDOC_CAPTURE was defined
only for files under src/libANGLE, however, we need to
use this Macro in filed under src/tests/. Move the Macro
config from BUILD.gn to src/tests/BUILD.gn.
Also add a new gn arg angle_enable_renderdoc
to control enable/disable the Macro.

Bug: angleproject:6072
Change-Id: I3879015e9bdfe2530012ea39729a31c47129ce4c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3609024
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2022-04-27 18:14:27 +00:00
Roman Lavrov
ebfb9b9f00 Configure logging in perf and gold tests to include time.
Currently no timestamp is logged:
[I2022-04-25T18:45:14.761163Z 548 0 cmd_stream.go:336] {cmd}
INFO:root:adb --version ...

Before switching to android_helper relative timestamps in seconds
were printed, set up by catapult. Timestamps proposed in this CL are
more consistent with outer logging but keep prefix short. Example:

[I2022-04-25T18:45:14.761163Z 548 0 cmd_stream.go:336] {cmd}
I18:45:14.999999Z adb --version ...

Bug: angleproject:6854
Change-Id: I8ef7c9ae44eb5dba564a41456ce9417e3fe0f06c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3606913
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
2022-04-26 16:33:45 +00:00
Roman Lavrov
b5d34da088 Add src/tests/py_utils/ for utils, angle_path_util for imports.
Detect if angle or chromium checkout when adding deps paths,
so that random paths from above angle_root don't get added to
sys.path when imported from an angle checkout.

Bug: angleproject:6854
Change-Id: I4cd3334a2313d921f8651de7056f4f3798b8e072
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3582978
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-04-14 09:59:30 +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
Cody Northrop
e3c4491963 Debug: Add angle_enable_trace_events
Include the following GN arg to print all GLES and EGL commands:

    angle_enable_trace_events = true

Bug: angleproject:7126
Change-Id: I78eb061c10ed519d6a0b0357eea11567d1cfb518
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3551656
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2022-03-26 23:28:50 +00:00
马爱国
8a2a4fa70f Add loongarch support
Bug: angleproject:7104
Change-Id: I9b9c57b76463f16d0c3c7ccc8b81c1bb657a3cc8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3522459
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2022-03-18 03:01:54 +00:00