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

486 Коммитов

Автор SHA1 Сообщение Дата
Tim Van Patten e28083ad6f Enable RenderDoc capture for debug builds
Enable RenderDoc capture in builds where Vulkan Validation Layers are
enabled. This essentially enables the '--renderdoc' flag for debug
builds when running end2end/deqp tests to make it easier to debug tests.

This CL also add the '--no-renderdoc' flag to force disabling RenderDoc
capture.

Bug: angleproject:6072
Change-Id: Iae7aae30aae9bdc58a7546118d156aef2047c210
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270600
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
2021-11-19 21:13:25 +00:00
Jamie Madill 6a70398c9f GN: Ensure using_sanitizer is declared even without //build.
Bug: angleproject:5795
Change-Id: If37375a9925d8449a15a63e98caf60d7dc75a751
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3289936
Owners-Override: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-11-19 16:44:15 +00:00
Jamie Madill 89e3de9720 GN: Add symbolizer data for sanitizer builds.
This is necessary to produce correct stack traces.

Bug: angleproject:5795
Bug: chromium:1268935
Change-Id: I011d0948779718ed38305624c87a193a6ad0f8bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276512
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2021-11-17 16:10:21 +00:00
Jamie Madill d27552f21f Re-land: "Vulkan: Allow SystemInfo to pick ICD."
Re-land fixes build on iOS and Android with ANGLE/Vulkan.

This will be used in conjunction with SwiftShader.

Bug: angleproject:6496
Change-Id: Id38403da1e377bba293dc8368d1c1aac29bf56a9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3282426
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2021-11-16 03:56:34 +00:00
Jamie Madill a9f2e87ec9 Revert "Vulkan: Allow SystemInfo to pick ICD."
This reverts commit b5adbe272e.

Reason for revert: Fails GN check on Android/iOS in Chrome:
https://chromium-review.googlesource.com/c/chromium/src/+/3276779/

Original change's description:
> Vulkan: Allow SystemInfo to pick ICD.
>
> This will be used in conjunction with SwiftShader.
>
> Bug: angleproject:6496
> Change-Id: I894aa4cf3b9473738b549de9941eb82e09234121
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276515
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>

TBR=syoussefi@chromium.org,jmadill@chromium.org,angle-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I198802d6bc93993d3544ed4627e131cb7b93f381
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:6496
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276045
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-11-12 15:03:02 +00:00
Jamie Madill b5adbe272e Vulkan: Allow SystemInfo to pick ICD.
This will be used in conjunction with SwiftShader.

Bug: angleproject:6496
Change-Id: I894aa4cf3b9473738b549de9941eb82e09234121
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276515
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-11-11 18:28:01 +00:00
Craig Stout 24136212d6 Allow GN specification of shared library extension name
For use as system libraries in virtualized Linux environments,
allow use of custom sonames.

Bug: angleproject:6672
Change-Id: If297e3eaa090bfd08cb9df68a4c727da72228bcc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3268941
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2021-11-09 20:22:44 +00:00
Sylvain Defresne 5ae7342b76 [ios] Remove support for building with Xcode clang
Chromium //build will soon remove the `use_xcode_clang` variable.
Remove it from Angle to avoid breakage when the variable is gone.

This is a followup to https://crrev.com/c/angle/angle/+/3259713
where one use of `use_xcode_clang` was not left by mistake.

Bug: chromium:1266466
Change-Id: Idbd8b3daeacac1ba88fc818f3939bdcd15e449c8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3269890
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-11-09 17:26:54 +00:00
Maksim Sisov fa2e374974 Reland "rename use_x11 to ozone_platform_x11"
This is a reland of 86f2854579

X11 shouldn't be enable for is_chromecast cases as
the original use_x11 gn arg is only enabled on linux && !chromecast.

Original change's description:
> rename use_x11 to ozone_platform_x11
>
> Ozone is default now in Chromium and non-Ozone/X11 (aka use_x11) is
> deprecated. During the transition period use_x11 == ozone_platform_x11.
>
> Bug: chromium:1096425
> Change-Id: Ia691ce249bc49040956bed033891799127a57bbc
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3151755
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>

Bug: chromium:1096425
Change-Id: I6f8dbacb756ce57ca7379bbd991ca1ff470c244d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3263987
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
2021-11-09 06:35:56 +00:00
Sylvain Defresne 30afc25e1f [ios] Remove support for building with Xcode clang
Chromium //build will soon remove the `use_xcode_clang` variable.
Remove it from Angle to avoid breakage when the variable is gone.

Bug: chromium:1266466
Change-Id: I3f95ffe611cc38c9de76e9744186efff3332d539
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3259713
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-11-04 19:57:28 +00:00
Jamie Madill 577cfeff92 GN: Remove unneeded version header visibility rule.
These Chrome targets are now migrated to use the encapsulated API.

Bug: angleproject:2551
Change-Id: I6970f7ad85af089fd41c79476a2bdd4e605949c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3248143
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-10-28 14:56:58 +00:00
Hans Wennborg 6ce6788639 Drop -Wweak-template-vtables
Clang is dropping suport for this flag, see bug.

Bug: chromium:1264351
Change-Id: I09b3d42889eecb8e786c52c205f28507fc797c5a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3250885
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-10-28 14:23:48 +00:00
Jamie Madill d8c18ac6d8 Re-land: "Isolate commit_id.h from other code."
Re-land limits the angle_version deps to Windows to fix an iOS
visibility rule violation in GN.

Instead of recompiling multiple source files, we can seal off the
files that include commit_id to prevent recompilations when the
commit changes and source files don't change.

Bug: angleproject:2551
Change-Id: I033f00ec7afe4bfd01e29e0eea8848eea27747a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233899
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-10-20 14:42:23 +00:00
Shahbaz Youssefi 7defdb6044 Revert "Isolate commit_id.h from other code."
This reverts commit 6d7ebf656d.

Reason for revert: Suspected reason for failing ANGLE roll into Chromium

Original change's description:
> Isolate commit_id.h from other code.
>
> Instead of recompiling multiple source files, we can seal off the
> files that include commit_id to prevent recompilations when the
> commit changes and source files don't change.
>
> Bug: angleproject:2551
> Change-Id: I98800c5a8e04ec7d4c3e57ea0eb3b636d3b224bb
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212895
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>

Bug: angleproject:2551
Bug: angleproject:6588
Change-Id: I19f41141f57d0683efb9a4ec043e078a9f7dc925
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226056
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-10-19 16:18:10 +00:00
Jamie Madill 6d7ebf656d Isolate commit_id.h from other code.
Instead of recompiling multiple source files, we can seal off the
files that include commit_id to prevent recompilations when the
commit changes and source files don't change.

Bug: angleproject:2551
Change-Id: I98800c5a8e04ec7d4c3e57ea0eb3b636d3b224bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212895
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2021-10-18 16:02:56 +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
angle-autoroll 66c89b0fe4 Fix and disable MSVC warnings
Needed because some warnings are no longer disabled after
http://crrev.com/c/3189512.

Also includes https://github.com/KhronosGroup/OpenCL-Headers/pull/179,
needed after clang upgrade to llvmorg-14-init-5410-gd0473681

Bug: chromium:1257173
Change-Id: I4f844aa972362c488cb6d37244439e2126f2c1c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3210629
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2021-10-07 06:08:03 +00:00
Jamie Madill 0004ecc2a4 Write GL info to test artifact in end2end_tests.
These will show up as glinfo.json in the "cas outputs" of the shard
that runs these tests.

We currently have information for Pixel 4, NVIDIA and Intel Win/Linux,
and SwiftShader Windows. GLES 1.x extensions are treated separately.
Some WebGL/Mac-only/D3D-only extensions show as unsupported anywhere.

In order to capture artifacts on Android, we use a render test output
parameter.

Bug: angleproject:6379
Change-Id: I560b219b5a586cdbb68d272090f38eedc76aba20
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3176780
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2021-09-30 15:31:09 +00:00
Jamie Madill afe0dd9edf Revert "rename use_x11 to ozone_platform_x11"
This reverts commit 86f2854579.

Reason for revert: Suspected for breaking the ANGLE roll:
https://crrev.com/c/3171455

Original change's description:
> rename use_x11 to ozone_platform_x11
>
> Ozone is default now in Chromium and non-Ozone/X11 (aka use_x11) is
> deprecated. During the transition period use_x11 == ozone_platform_x11.
>
> Bug: chromium:1096425
> Change-Id: Ia691ce249bc49040956bed033891799127a57bbc
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3151755
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>

Bug: chromium:1096425
Change-Id: Ifa0a2f5f1323704d7e9d308210efb26c9987b5cd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3181561
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-09-24 13:15:30 +00:00
Jamie Madill 786d38af55 Fix build in some configurations.
Relevant configuration:
- is_debug = true
- angle_enable_annotator_run_time_checks = true

Patch authored by Igor Nazarov <i.nazarov@samsung.com>

Bug: angleproject:6401
Change-Id: I8c1ad38e71a90db8ef45d431bfefb1ff1153c1b4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3165656
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-09-21 16:38:48 +00:00
Maksim Sisov 86f2854579 rename use_x11 to ozone_platform_x11
Ozone is default now in Chromium and non-Ozone/X11 (aka use_x11) is
deprecated. During the transition period use_x11 == ozone_platform_x11.

Bug: chromium:1096425
Change-Id: Ia691ce249bc49040956bed033891799127a57bbc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3151755
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2021-09-20 17:44:38 +00:00
Jamie Madill 1af5c46c7a Move JsonSerializer from libANGLE to common.
This lets us use the serializer from outside of libANGLE. The plan is
to use it to serialize a list of supported extensions from the tests.

Bug: angleproject:6379
Change-Id: Ib7b64cca32e733e342b80f893d3752318089f0c2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3163361
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-09-17 17:06:19 +00:00
Jamie Madill 23b1674302 Fix compilation when disabling D3D back-ends.
Common code areas weren't compiling when disabling combinations
of the D3D9 and D3D11 back-ends. With manual testing this fixes
various combinations of angle_enable_d3d9/d3d11/gl.

Bug: angleproject:5925
Change-Id: Ie14f2b4c6169cf96c662e7ae6999751007d9adb0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3162836
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2021-09-16 23:11:04 +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
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
Geoff Lang 48da7e7e7c Add a gn arg to enable collecting Vulkan system info on Linux
Some ANGLE users may wish to enable this path before the crashes
are resolved.

Bug: angleproject:5717
Change-Id: I7ed3a575e639cda9d88475cc38f32d7bbc37e84c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3144372
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2021-09-08 01:16:18 +00:00
Shahbaz Youssefi 58930a73ce Translator: Facilitate integration in FireFox; Part 2
Support for desktop GLSL builtins is now controlled by a gn arg, instead
of being tied to is_android.

Bug: angleproject:6188
Change-Id: Ia152d31bd49ca6de2b29873ee4998c1598904382
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3076285
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-08-27 04:27:01 +00:00
Alexey Knyazev 47279c726e Adjust compressed texture validation; add test
- Format check happens before target check to accommodate
for unknown / disabled format enums.
- PVRTC1 and ETC1 enums are not allowed for 2D Array
and 3D targets.
- PVRTC1 sRGB formats require enabling two extensions.
- New noCompressedTexture3D limitation for older Metal
versions.

The test checks that only the appropriate entry points
are affected after enabling compressed texture extensions.

Bug: angleproject:5731, angleproject:6280
Change-Id: I4943cd3a82f60f9348215caa8639e0bc3e8b45db
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3094018
Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-08-25 14:50:26 +00:00
Peter Kasting d4d6c23c7c Fix a recently-introduced case of -Wunreachable-code-aggressive.
Also enable this and -Wunused-but-set-variable to avoid regressing them.

Bug: chromium:1066980
Change-Id: I1fd7a57c2bf14513d657b69b70e35ad727c75ffd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3065355
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-08-01 03:34:10 +00:00
Shahbaz Youssefi 8f77e0bc6e Define angle::HashSet potentially using abseil
Split change from CL using it for simplicity.

Bug: angleproject:4889
Change-Id: Ie3e621dee624020581e9fd7679639332718948f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3061439
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-07-29 21:29:42 +00:00
Shahbaz Youssefi b8d6f8aa93 Translator: Facilitate integration in FireFox
Instead of relying on is_apple to build workarounds applied on apple
hardware, a new build argument is added for this purpose.  This allows
FireFox to more easily include these files in their build system (which
builds every workaround on every platform).

The workarounds are reorganized too and moved from tree_ops/gl/mac to
tree_ops/apple.  RewriteRowMajorMatrices is moved there too as it's now
used by both gl and metal.  This workaround is large, and removing it
from non-apple builds improves binary size (~40KB on Linux).

Bug: angleproject:6188
Change-Id: I8e1dab44d0235bb6b8341d53721bdd0d157d46c6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3047385
Reviewed-by: Jeff Gilbert <jgilbert@mozilla.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-07-27 03:05:45 +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
Jeff Gilbert afda22b085 Define ANGLE_IS_64_BIT_CPU in common/platform.h.
This is more reliable and reduces reliance on build flags.
Vendoring into Firefox, it's not trivial to replicate build flags,
but C++-native checks always work.

Bug: angleproject:6186
Change-Id: Idafd4ef1954efbfa79eae86cddfaa8f2e3992296
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3036589
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-07-20 12:27:13 +00:00
Jamie Madill 2b86e2d60f GN: Update dcheck/assert conditions.
In preparation for a Chromium change that makes dchecks enabled
by default in Release builds, we'll keep ASSERT disabled in
Release by default. We add a new flag 'angle_assert_always_on'
for controlling ANGLE ASSERT behaviour.

Also slightly refactors the direct SPIR-V generation GN.

Chromium CL: https://crrev.com/c/2893204

Bug: chromium:1225701
Change-Id: I01a6def28d7c21e771e9800889a6b9c274972de2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035447
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-07-19 19:05:44 +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
Sergey Ulanov b73eee719c Reland: [Vulkan] Add DisplayVkNull
Currently all DisplayVk implementations depend on VK_KHR_swapchain and
VK_KHR_surface extensions. When running Chromium on Fuchsia these
extensions are never used (content is shown on the screen using
ImagePipe API without dependency on swapchain). ANGLE still depended
on these extensions for DisplayVkFuchsia.
This CL adds DisplayVkNull, which allows to run ANGLE without dependency
on swapchain. It's usable only offscreen and cannot present content on
a surface.

Bug: chromium:1203879
Change-Id: I5cadcdf46ed1cfb5ebb3cb69dbfef063e9e2b826
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3012368
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-07-08 23:47:18 +00:00
Jamie Madill cb87d78c58 Enable -Wshadow with Clang.
Also fixes a few instances of variable shadowing in the code.

Bug: angleproject:6148
Change-Id: Ic51d722a3f953f246f51af6d74abb302f832cf44
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3014875
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-07-08 15:26:36 +00:00
Shahbaz Youssefi 955b4620db Fix angle_commit.h dependency when git packs refs
If there are too many files in .git/refs/heads/, git packs them in
.git/packed-refs.  This breaks the build as gen/angle/angle_commit.h
depends on .git/refs/heads/<branch-name>.

With this change, when gn is run and the dependency to this file is set
up, it's unpacked from .git/packed-refs if it's missing from
.git/refs/heads/.

One corner case not solved by this change is if a commit is amended with
no changes and git packs the refs (and so the
.git/refs/heads/<branch-name> file goes away), ninja doesn't rerun gn as
it doesn't believe there to be any changes, yet fails the build as the
dependency is now missing.  Running `gn gen` manually fixes the issue.
The issue is automatically fixed when switching branches.

Bug: angleproject:6131
Change-Id: Ie2404e874a5cb3374a652b93faa143acb68eaa19
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3001906
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-07-05 16:53:25 +00:00
Peter Kasting 1bffabe880 Fix -Wunreachable-code-aggressive.
Bug: chromium:1066980
Change-Id: I1fa08a40dbf223d60a10681af33ca8a29b12bf8b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2991094
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-07-03 03:23:44 +00:00
Jamie Madill 1b104dd945 Finish switch to angle_version.h.
Bug: b/168736059
Change-Id: I1232c8284f37aadb374840aca8f40e4569382c7b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2920490
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-06-23 15:47:17 +00:00
Tim Van Patten 7753c83787 Fix roll_aosp.sh 'gn gen' failure
The 'gn gen' step in roll_aosp.sh is failing due to trying to access
third_party/rapidjson/BUILD.gn, which isn't in AOSP. The rapidJSON
library is required to build the ANGLE libraries with frame capture
enabled, which isn't necessary for AOSP builds.

This CL adds the GN arg 'angle_has_rapidjson' which roll_aosp.sh will
set to 'false' to prevent 'gn gen' from attempting to access
third_party/rapidjson/BUILD.gn.

Bug: b/187342779
Change-Id: I6fcc0e94b6325be7523e35f966b8e4dbc708e3b0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2973338
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
2021-06-21 18:10:19 +00:00
Kyle Piddington d7aa013091 Upstream Apple's direct-to-Metal backend: compile translator.
This change is meant to merge the translator 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 translator code in a state that
compiles, but not to switch the Metal backend over to use this
translator backend yet.

Bug: angleproject:5505
Change-Id: I68a6354604498cd5fd1eb96c13fc56f3b38f2bd0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897536
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2021-06-02 15:01:18 +00:00
Jonah Ryan-Davis e2fc818ac1 Reland Change to module directory when loading swiftshader ICD.
This is a reland of commit 3b10dda6a4.

Extra changes:
Be explicit about calling GetModuleHandleA
Do not use the general GetModuleHandle, which may use wide strings
Refactored ConcatenatePath and add tests

GetModuleDirectory should return the full path, not relative.
ANGLE wasn't able to locate the vulkan ICD file because it was
searching down an invalid relative path. This can be fixed by
ensuring the module directory is always the full path.
on some platforms.

Original change's description:
> When loading vulkan, we can be running from any directory. We need
> to change to the module directory to ensure the swiftshader ICD is
> loaded properly. For example, in some Chrome releases, libGLESv2.dll
> and libvk_swiftshader.dll are in a subdirectory relative to chrome.exe
>
> Bug: chromium:1198567
> Change-Id: I9e68927e512b239728fb2903d1a04702508a4948
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2873452
> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

Bug: chromium:1198567
Bug: angleproject:5949
Change-Id: I63fbe93f8492b7f23566f8193b1b8fe784a34f71
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2904586
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2021-05-20 18:39:46 +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
Geoff Lang 88156d2686 Revert "[Vulkan] Add DisplayVkNull"
This reverts commit cbbaf76b75.

Reason for revert: Suspecting this breaks the fuchsia_x64 bot WebGL
tests.

Ex: 
https://chromium-review.googlesource.com/c/chromium/src/+/2904812

Original change's description:
> [Vulkan] Add DisplayVkNull
>
> Currently all DisplayVk implementations depend on VK_KHR_swapchain and
> VK_KHR_surface extensions. When running Chromium on Fuchsia these
> extensions are never used (content is shown on the screen using
> ImagePipe API without dependency on swapchain). ANGLE still depended
> on these extensions for DisplayVkFuchsia.
> This CL adds DisplayVkNull, which allows to run ANGLE without dependency
> on swapchain. It's usable only offscreen and cannot present content on
> a surface.
>
> Bug: chromium:1203879
> Change-Id: I4d1307060967ffa68877c4300ea4d5590eeb2152
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2861313
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>

Bug: chromium:1203879
Change-Id: I6701ffff48fcb925f387e63b356d2d5cf360ea7e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2904183
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-05-19 13:52:50 +00:00
Jonah Ryan-Davis ffb71dc28f Revert "Reland Change to module directory when loading swiftshader ICD."
This reverts commit c8c414b084.

Reason for revert: Breaking fuchsia_x64 and ANGLE autoroller

Original change's description:
> Reland Change to module directory when loading swiftshader ICD.
>
> This is a reland of commit 3b10dda6a4.
>
> Extra changes:
> Be explicit about calling GetModuleHandleA
> Do not use the general GetModuleHandle, which may use wide strings
>
> GetModuleDirectory should return the full path, not relative.
> ANGLE wasn't able to locate the vulkan ICD file because it was
> searching down an invalid relative path. This can be fixed by
> ensuring the module directory is always the full path.
> on some platforms.
>
> Original change's description:
> > When loading vulkan, we can be running from any directory. We need
> > to change to the module directory to ensure the swiftshader ICD is
> > loaded properly. For example, in some Chrome releases, libGLESv2.dll
> > and libvk_swiftshader.dll are in a subdirectory relative to chrome.exe
> >
> > Bug: chromium:1198567
> > Change-Id: I9e68927e512b239728fb2903d1a04702508a4948
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2873452
> > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
>
> Bug: chromium:1198567
> Bug: angleproject:5949
> Change-Id: Ib34067002c788f00b5ae2fa11d1e465f57bd7be8
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2893503
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Cody Northrop <cnorthrop@google.com>
> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>

Bug: chromium:1198567
Bug: angleproject:5949
Change-Id: Ic0be8949cc27b231be4f982ea6e22beed590d24d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2903786
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-05-18 18:26:06 +00:00
Jonah Ryan-Davis c8c414b084 Reland Change to module directory when loading swiftshader ICD.
This is a reland of commit 3b10dda6a4.

Extra changes:
Be explicit about calling GetModuleHandleA
Do not use the general GetModuleHandle, which may use wide strings

GetModuleDirectory should return the full path, not relative.
ANGLE wasn't able to locate the vulkan ICD file because it was
searching down an invalid relative path. This can be fixed by
ensuring the module directory is always the full path.
on some platforms.

Original change's description:
> When loading vulkan, we can be running from any directory. We need
> to change to the module directory to ensure the swiftshader ICD is
> loaded properly. For example, in some Chrome releases, libGLESv2.dll
> and libvk_swiftshader.dll are in a subdirectory relative to chrome.exe
>
> Bug: chromium:1198567
> Change-Id: I9e68927e512b239728fb2903d1a04702508a4948
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2873452
> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

Bug: chromium:1198567
Bug: angleproject:5949
Change-Id: Ib34067002c788f00b5ae2fa11d1e465f57bd7be8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2893503
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2021-05-14 20:23:09 +00:00
Sergey Ulanov cbbaf76b75 [Vulkan] Add DisplayVkNull
Currently all DisplayVk implementations depend on VK_KHR_swapchain and
VK_KHR_surface extensions. When running Chromium on Fuchsia these
extensions are never used (content is shown on the screen using
ImagePipe API without dependency on swapchain). ANGLE still depended
on these extensions for DisplayVkFuchsia.
This CL adds DisplayVkNull, which allows to run ANGLE without dependency
on swapchain. It's usable only offscreen and cannot present content on
a surface.

Bug: chromium:1203879
Change-Id: I4d1307060967ffa68877c4300ea4d5590eeb2152
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2861313
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-05-14 20:05:19 +00:00
Gert Wollny 25b53ceb65 Revert "Change to module directory when loading swiftshader ICD."
This reverts commit 3b10dda6a4.

Bug: angleproject:5954
Change-Id: I6199dc099dbf42605bbfc549e39cb6477e67442c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2891771
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2021-05-12 20:06:20 +00:00