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

468 Коммитов

Автор SHA1 Сообщение Дата
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
Jonah Ryan-Davis 3b10dda6a4 Change to module directory when loading swiftshader ICD.
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>
2021-05-11 16:03:16 +00:00
Shahbaz Youssefi 81f03cc092 Allow translator to use headers from common/spirv
Bug: angleproject:4889
Change-Id: Ia297888a97c0ba9cec1283db7f94f2e5b362c27e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2815179
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-05-06 21:24:55 +00:00
John Plate dfe208f188 Add loader for CL pass-through back end
Bug: angleproject:5904
Change-Id: If4960f3150f6bbc85a30f0f6ac5c9e668e6ff756
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2864022
Commit-Queue: John Plate <jplate@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-05-06 13:06:09 +00:00
Shahbaz Youssefi e2c87b4f5e Fix Vulkan-only build
The translator_gl_d3d_only target cannot build if neither of the gl or
d3d backends are built.  This target is used by Chrome's validating
command decoder only.

Bug: angleproject:5922
Change-Id: Ibebae6d6aa78ad88498a727d3b0e1695bb110535
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2871969
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-05-05 17:37:06 +00:00
Tim Van Patten 57202fb075 Fix Rolling ANGLE into AOSP
Rolling ANGLE into AOSP currently generates several build errors. This
CL fixes them.

Bug: angleproject:5919
Bug: angleproject:5873
Change-Id: Ic24c3c27a2dd3a1db4d6d2e3642eb1b16148569a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2863883
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
2021-05-03 17:29:36 +00:00
John Plate 05fb22724f Add support for OpenCL ICD Loader
Bug: angleproject:5908
Change-Id: Idafc0d15b69f9a21f2ab5e48c4c34f0dc0e0ee96
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2854598
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: John Plate <jplate@google.com>
2021-05-03 17:27:16 +00:00
John Plate 16a919b174 Add stubs for CL platform layer back ends
Bug: angleproject:5904
Change-Id: If23c7f76013a17c3c67c13194566438035beb3d1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2853582
Commit-Queue: John Plate <jplate@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-04-27 18:43:49 +00:00
Hans Wennborg 9064bdf7f4 [build] Turn off -Wdeprecated-copy warnings
It fires with newer versions of Clang (see bug).

Bug: chromium:1201858
Change-Id: Ie55b39a0422a5f45b4eb6bdfcc77114e1ef554bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2846836
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2021-04-23 15:24:48 +00:00
John Plate e25f3b105f Generate empty CL object classes
Bug: angleproject:5886
Change-Id: I01566f40e85bd7f5531536fdc1df42965622a939
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2844969
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: John Plate <jplate@google.com>
2021-04-22 17:19:56 +00:00
Jamie Madill f78927b056 Remove libGLESv1_CM static.
These entry points are already duplicated into libGLESv2. Including
them in the static build causes a duplicate symbol error on Android.

Bug: angleproject:2344
Change-Id: I56a2f2029e7da49215e64484c1d1316add6ff1c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2842354
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-04-21 20:16:02 +00:00
Jamie Madill 002e562277 Android: Enable APK build.
Bug: angleproject:2344
Change-Id: Iaad7199d2bcbb961d64f14eb640d472c52d7abc6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2842564
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-04-21 19:06:51 +00:00
Xiaoxuan Liu ed4f7cb63e Reland "Reland "Add support for Linux GPU info with Vulkan backend""
This is a reland of 9a8397327f

Chrome Linux crash issue could be fixed in
0615bbde39, let's reland this now.

Original change's description:
> Reland "Add support for Linux GPU info with Vulkan backend"
>
> This is a reland of 5c09c1f882
>
> Extra change: Add new ANGLE_HAS_VULKAN_SYSTEM_INFO compile
> variable for GetSystemInfoVulkan() in linux platform.
>
> Original change's description:
> > Add support for Linux GPU info with Vulkan backend
> >
> > 1. Add support for Linux GPU info with vulkan backend: for
> > dev board without PCI support, try vulkan backend to get
> > GPU info.
> > 2. Fix getVulkanInstance() issue when loading non-exist lib:
> > return NULL instance if open lib failed.
> >
> > Bug: angleproject:5717
> > Change-Id: I03c11da25a8787496d098f6c9d6b4c53701383e4
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2734375
> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
> > Commit-Queue: Jamie Madill <jmadill@chromium.org>
>
> Bug: angleproject:5717
> Change-Id: Iaaab8f512b6ec1d524d7ebb3b4252fec3cfe7dc3
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2739097
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

Bug: angleproject:5717
Change-Id: Iad6736f9137b7e9640c97fa2b9eded3fd37ac88f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2821410
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-04-16 18:36:43 +00:00
Tim Van Patten 085044d1f3 Fix angle_expose_non_conformant_extensions_and_versions
The GN arg angle_expose_non_conformant_extensions_and_versions was not
being referenced correctly in the Vulkan backend, so it was not being
properly enabled in RendererVk.cpp. This CL updates the BUILD.gn files
to fix this issue.

Bug: b/184767884
Change-Id: I7244aad9112c38bf76544f8c767563a7f0cf1b2f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2816165
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
2021-04-09 18:57:39 +00:00
Jamie Madill 54dfb62c24 Make "force context check" an optional GN flag.
Previously it was enabled by default in every build that includes
D3D11. This would impact CPU overhead in Chrome and other targets
that don't need this feature.

Bug: angleproject:5828
Change-Id: Ic9d700847c72978540b66fdaf7a62f959779f2e6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2809855
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Doug Horn <doughorn@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-04-08 15:47:50 +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
Jamie Madill 67e4aff55e Fix rapidjson build error in Skia.
Instead of using defines in the header, use the same approach as we do
with frame capture by defining a stub "mock" cpp file.

Bug: angleproject:5805
Change-Id: Ief1cb6497ddafc9656bb0e7d6a921eff3610a7fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2801695
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-04-02 20:35:13 +00:00
Gert Wollny b3a8033d77 JsonSerializer: use stubs when building without rapidjson
Bug: angleproject:5805
Change-Id: Ibf51b8b75c3feb6efdef969effb3f50e2474c6b3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2795772
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-04-02 09:57:21 +00:00
Yuly Novikov 3ad3a9acdb Fix and re-enable component build of angle_apks
These were disabled in http://crrev.com/c/1387344, after breaking
android-dbg (now android-archive-dbg) in crbug.com/916751.

Re-enable them, so that CQ bots can be switched to component build,
which is more stable due to http://anglebug.com/4396.

The fix is to correct the library names,
which have .cr.so suffix in component builds.

Bug: angleproject:4483, angleproject:2981, chromium:916751
Change-Id: Ie9cb6e11513ecd2b5e4daa3f636296a4500ddfb9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2800193
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-04-02 01:30:01 +00:00