ANGLE needs to set VK_ICD_FILENAMES for the Vulkan loader to discover
SwiftShader's ICD. Enable this logic on Fuchsia.
Also updated ConcatenatePath() to handle absolute paths correctly.
Bug: chromium:1225002
Change-Id: Ib69be0d7dcaef09f1da9d411023e90a3b7b4fca2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3292347
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
GLES allows FBO ID's to be reserved on bind, so if a FBO is bound with
and ID that was not yet reserved by a glGenFramebuffers call, update the
resource tracking and the resource map to account for this resources
that was created on bind.
Bug: angleproject:6425
Change-Id: I343fc17bfbbfd9c8c47d6fe207a4f3817acb835d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3190970
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
To make sure instanceCount == 0 is no-op according to OpenGL ES
3.2 spec section 10.5.
Before the fix the behavior on linux (gl) and win (d3d) are
inconsistent.
Bug: angleproject:3402
Change-Id: I70ec215d8b65c1591b4c816f76c92e88e9f0dc61
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3293749
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
This change reverts the sync order swap done in
CL a280c671f1,
to address a performance issue in TRex.
The crash that sync order swap was
trying to resolve was addressed by
another CL 0fcad6260a.
Bug: angleproject:6014
Change-Id: Ie49628295b6dcd5d012dc795bf123865b1a7f893
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3292636
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
When transform feedback is not active, make sure the code that captures
xfb is not generated, even though it's guarded against with an if. This
is because no buffer is bound to the capture buffer, and by avoiding
generation of code that references that buffer, SwiftShader will not
attempt to access the missing descriptor set.
Currently, the actual declaration of the buffer is left in the SPIR-V,
which seems to be benign. If that causes issues in the future, the
SPIR-V transformer can be modified to remove that variable as well.
Bug: chromium:1209285
Change-Id: I83da8d1dea5390ecacc681f8ada9f586932deaa4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3294661
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Chrome uses display-level texture share groups for WebGL contexts. When
this extension is in use, make sure all internal contexts are created in
the same share group.
Bug: chromium:1268830, chromium:1268389, chromium:1268218
Change-Id: I3925dffb9bb23fbbc7adcd3bee8cd62323b993e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3285213
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
The Ci logs are quite long and it is difficult to find the log for
the actual CI failures, so repeat the logs for unexpected failures,
crashes, compile errors, and timeouts at the end of the log.
Bug: angleproject:6542
Change-Id: Id9dff4cc70649d0d9cc8bd4509477fbe3ef10de8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3291653
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
This is a reland of d721cdefdc
Adding a missing include.
Original change's description:
> Fix unused variable "useSwiftShader"
>
> -Wunused-but-set-variable when rolling into Chromium crrev.com/c/3293895
>
> Bug: angleproject:6496
> Change-Id: I02f7de303b52319c6a1821d7b697b7ee9bea8f89
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3292034
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Commit-Queue: Tim Van Patten <timvp@google.com>
Bug: angleproject:6496
Change-Id: Id39e10a8f343600ea6b2f023442b4d8c7e1856dc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3292036
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
-Wunused-but-set-variable when rolling into Chromium crrev.com/c/3293895
Bug: angleproject:6496
Change-Id: I02f7de303b52319c6a1821d7b697b7ee9bea8f89
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3292034
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
The validation was correctly generating an error but ANGLE
was not aborting the API calls for several validation calls.
This was detected by UBSAN tests which would trip a division
by zero.
Test: GLSLTest_ES3.GLVertexIDIntegerTextureDrawArrays/*
Bug: angleproject:5795
Change-Id: I5d5d8448454ce19cb4bdf1cd76a6ce513a6e9c6e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3293821
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
This variable was getting garbage data in UBSAN. Fix it by setting
an initial value of false.
Bug: angleproject:5795
Change-Id: I0a40bea427d7c02c8a12616c472c8d9ce70cb937
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3293822
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
The test math was causing an signed overflow in the most extreme
case.
Test: GLSLTest_ES3.GLVertexIDIntegerTextureDrawArrays/ES3_Vulkan_SwiftShader
Bug: angleproject:5795
Change-Id: Id6b845577cb6ce585ec67251dcb6111d5773012f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3289942
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Some versions of MSVC have a bug that it will not detect when
all values of an enum are exhausted in a switch statement, which
leads to a warning that not all code path return a value, and
since the warning is treated as an error, compilation fails.
Bug: angleproject:6721
Change-Id: I4d62191ce83a04ba554dd804f13e7d428afd86a4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3291649
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>
This CL continues the process of removing uniform values from
the GLES1 ubershader to increase speed on mobile platforms.
The first phase removed bools 2091451e.
We've identified integers (enums) as providing the biggest bang for
buck to optimize speed while having acceptable program generation.
Allowing floats as well proved too much specialization. Many GLES1
conformance tests would grind to a halt while providing little to no
benefit to app traces.
This CL does the following:
* Create a GLES1ShaderState class that contains hashable data
* Populate it with all states influencing ubershader generation
* Hash the class to perform the lookup of existing programs
Frame times on Android ARM with locked GPU clocks:
Trace Before After
dr_driving: 4.2986 -> 0.8155
sonic_the_hedgehog: 2.8223 -> 0.6254
summoners_war: 15.9810 -> 2.3937
wordscapes: 7.6167 -> 1.1496
zillow: 2.9368 -> 1.9318
Test: end2end, perftests, gles1_conformance
Bug: angleproject:6644
Change-Id: I060280e282d7b514d3e410c4f8c5e09659e85d3b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3280355
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
In anticipation of GLES1 ubershader updates that result
in faster frame times, but more compiles.
The GLES1 conformance tests iterate through every state and
render one frame, which is slower when you link a new program
for each.
Bug: angleproject:6644
Change-Id: I70501ea38505428569ba518710ecb03ce198db18
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3292511
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
This was being applied to "vulkan" when it should be higher in
the chain of depedencies. This CL moves it to "vulkan_icd".
Bug: angleproject:6496
Bug: chromium:1271193
Change-Id: I064caac6afe237d7008389f444d6ef9f37cff286
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3289937
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
These tests are heavily flaking and causing CQ churn. Mark them
as retriable until we can root cause the flakiness.
Bug: angleproject:6570
Change-Id: I9886a655b88737acbe7ce728fa32573ac4d6145f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3289104
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
This works around a race-condition during Android start-up, when ANGLE
is used as the default GLES driver and when render engine (RE) is
using SkiaGL (which uses ANGLE, which uses Vulkan). The race
condition occassionally results in different numbers of extensions
between ANGLE's first and second calls to
vkEnumerateDeviceExtensionProperties(). In that case, the second call
would return VK_INCOMPLETE instead of VK_SUCCESS. That caused ANGLE
to fail to initialize, causing RE to fail to initialize.
This change works around this problem by increasing the number of
extensions asked for in the second call to
vkEnumerateDeviceExtensionProperties().
Background: Surface Flinger uses Hardware Composer (HWC) for
hardware-based composition (e.g. using overlays), and RE for GPU
composition (e.g. rendering to combine multiple app and system windows
together). SF, RE, and HWC all start about the same time. HWC sets a
property if it can support display timing. This gets passed through
SF to RE's Vulkan loader. The Vulkan loader uses that property to
determine whether to enable the VK_GOOGLE_display_timing extension.
The Vulkan loader used to make a synchronous call to SF in
vkEnumerateDeviceExtensionProperties() in order to get this property.
That took some number of milliseconds to complete and affected the
start-up time of every Vulkan/ANGLE app. To eliminate that
performance problem, the property now propogates in an asynchronous
manner. At that time, it was thought that RE would always get the
property in time. However, a partner's experience is that
VK_INCOMPLETE is happening 0.5% of the time.
ANGLE doesn't need to use the VK_GOOGLE_display_timing extension.
This is because the Android EGL loader provides the related
EGL_ANDROID_get_frame_timestamps extension. The issue that ANGLE is
working around is that it shouldn't fail to initialize in this
situation.
Bug: angleproject:6715
Bug: b/206733351
Change-Id: I4eb2197cdcc9692518b1bf5984d06fc8a1a7d145
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3290506
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
TSAN showed we could have a data race when multiple threads
were releasing objects because of the singleton handle
counter.
Bug: angleproject:6714
Change-Id: I23b5d343bec421a663198e7efc30c78dab2bde8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3288328
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
TSAN showed thread contention could happen during make current
calls and when inserting debug markers.
Bug: angleproject:6714
Change-Id: I343b0bd6efbd46621f9e69bd8a329c135aed0d90
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3288327
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
- Fixes logging (needed reload)
- Improves logging messages (less spam)
- Reduces time in test calibration & sampling
- Record failures on test errors more robustly
- Redesign the result recording class
Bug: angleproject:6090
Change-Id: I53fd86e9e009bd52ec98507334c69b05e711d83e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3288206
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
The list of gles1 sources is used in several targets without a
common config.
Bug: angleproject:6703
Change-Id: Ib78719c9dc322075dfba05380e99ec1ada8a3265
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3289616
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>