* Removed remaining mentions of ANGLE_multiview
* Removed AST transformations used only in
the side-by-side multiview implementation
* Changed the type of the internal ViewID_OVR
variable to use the dedicated qualifier
* Removed side-by-side multiview support
from the D3D11 renderer
* Removed an unused helper for side-by-side
multiview support from the OpenGL renderer
* Removed obsoleted test suppressions
Fixed: angleproject:3341
Change-Id: I5e0706cbf26ea820b51400124ddbf2624b738f17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4660046
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
ANGLEExtensionAvailability test should allow vendors
that support VK_EXT_image_2d_view_of_3d Vulkan extension
to expose EGL_KHR_gl_texture_3D_image extension string
with the Vulkan backend.
Bug: angleproject:7320
Test: ImageTest.ANGLEExtensionAvailability*
Change-Id: I3f6d407e100827604124e312bb61a59dbfb50dac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4658874
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
CopyTexSubImage fails with certain formats on Pixel 2 & 4 with a driver
error. TextureGL::copySubTextureHelper has a fallback path to handle
errors, but it gets skipped because BlitGL::copyTexSubImage uses
ANGLE_GL_TRY which doesn't check for GL errors in release builds. This
CL fixes that by using ANGLE_GL_TRY_ALWAYS_CHECK instead which is anyway
intended for any GL call that might allocate memory behind the scenes.
Bug: chromium:1458040
Change-Id: If660f3ef9968338d4ecf7fa20ab481aad84ed981
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4662093
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Speculative fix of the crash.
New logic will ensure that `currentMutex` is not `nullptr` when returned
from `AllocateGlobalMutexImpl()`
Also removed explicit memory order for safety (no actual difference in
generated code on ARM64/x86-64, but ARM generates less instructions).
Bug: chromium:1457915
Change-Id: I8d932ee499f9d8ee4e38ab2173f4f1cefd0aa294
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4650794
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
If sync object has already finished, there is no need to insert pipeline
barrier. With this CL, asphalt_9 average frame time reduces from 5.464
ms to 5.268 ms (-3.58%), making it 85% of native GLES (4.49 ms) on pixel
7 pro.
Bug: b/277644512
Change-Id: I112ccef0619da3c05cba44066327edc0bb81c366
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4651599
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Some state are purely local to the context when get or set. For
example, the state of depth test does not affect and is not affected by
any other state.
Some state on the other hand may affect other contexts. In particular,
some objects are shared between contexts of a share group, and may
affect each other through the observer interface.
These sets of state are separated to create a clear boundary between
state that can and cannot be accessed without holding the share group
lock. A follow up change removes locking from the entry points that
purely access the former set of states.
For the latter state, it is likely possible to access most if not all of
them without holding a lock, but careful inspection is required before
that can be considered. In particular, most entry points that simply
bind an object are likely harmless if the ref counter is turned atomic.
Bug: angleproject:8224
Change-Id: I91c3fa9de870c13d48012a5e06c177dab4010907
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4651375
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
The hash key was not correctly streaming the chunk index into the key
string -- "chunkIndex" here is a uint8_t, which the ostream incorrectly
identified as a character rather than byte. So the "std::hex" modifier
didn't have any effect and chunkIndex 0 had a truncated key.
Bug: angleproject:8231
Change-Id: Icb4977b658214979e08f66fcb98217259d4799ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4639493
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
We had multiple different places that defined these, and with varying
naming schemes. Centralize them to be defined in platform_helpers.h.
Also renaming the IsApple(uint32_t) functions to IsAppleGPU(uint32_t) to
avoid ambiguous meaning: "IsApple" should mean "is Apple-vended OS"
while "IsAppleGPU" should mean "is Apple GPU vendor ID".
Bug: angleproject:8229
Change-Id: If4e3fc5ac1b5b8ad416663950a1b2ee912ccad99
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4647291
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Steven Noonan <steven@uplinklabs.net>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This optimization is a preparation for future commits.
Performance was tested by defining `ContextMutexType = angle::Spinlock`
to use `SharedContextMutex<angle::Spinlock>` as `mSharedContextMutex`.
Test result is average time for 1000'000 `glGetError()` calls on S906B
with locked CPU frequencies:
SharedContextMutex<angle::Spinlock>
Before the optimization: 14.289 ms
After the optimization: 12.941 ms (-9.4%)
Performance when not using `angle::Spinlock` (current code):
SingleContextMutex: 9.115 ms (-36.2%)
SharedContextMutex<std::mutex>: 29.186 ms (+204.3%)
Bug: angleproject:8226
Change-Id: I447ff807cd6b72ff3fc115e73736fe63eb642785
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4632728
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Fixed End2End tests causing valiadation errors where
VK_EXT_primitives_generated_query was being enabled without enabling
VK_EXT_transform_feedback.
Consolidated the DEQP-GLES3 expectations for the
functional.transform_feedback* tests, updated some changed
test names.
These test expectations were collected from the 43.0 driver
version.
Bug: b/285628492
Bug: angleproject:8212
Change-Id: I224a2eec33ee56b7303d17aebd998de65354106c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4626241
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Mark Łobodziński <mark@lunarg.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mark Łobodziński <mark@lunarg.com>
The Vulkan loader somewhat recently introduced a requirement that
clients must opt-in to using portability implementations of Vulkan (such
as MoltenVK). Since there is no native Vulkan driver for macOS (and
therefore no alternative), unconditionally enable the portability
enumeration extension there.
Bug: angleproject:8229
Change-Id: I24f0f24e25abd277855ed9ac4de370cfb47d3266
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4639495
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Steven Noonan <steven@uplinklabs.net>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
The previous CL added the feature of freeing garbage memory in the
event of device OOM. However, it was for image allocations only.
* Extended finishing commands and freeing the garbage to buffers.
* Added unit test to allocate buffer after freeing memory space on the
device.
Bug: b/280304441
Change-Id: I540b27a41b34d1ceb1cd3119213341c9f290ea38
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4540209
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Currently image allocations fall back to system memory in case of
a device OOM. However, in some cases, it is also possible to gain
some memory by freeing garbage memory from the device. This allows
us to keep the allocation on the device memory.
* Updated the image allocation fallback, so we will try cleaning the
garbage memory through the renderer before retrying the allocation.
* finishOneCommandBatchAndCleanup() in RendererVk, which will call a
similar function in its CommandQueue. It will be called until there
are no more in-flight submissions.
* The existing finishOneCommandBatchAndCleanup() in CommandQueue has
been renamed to finishOneCommandBatchAndCleanupImpl().
* Updated the flags used for VMA image allocations. If any device memory
is freed after garbage cleanup to make enough space for the new
allocation, it will take precedence over the system memory.
* Added unit tests in which a new image allocation could happen on the
device after freeing the garbage memory.
* They use a 2D texture and a 2D texture array for garbage.
Bug: b/280304441
Change-Id: Ia5e605e180833b44af8c77550ab1b0b8ba21724e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4547941
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
While looking at disassemble of
DescriptorSetDescBuilder::updateOneShaderBuffer() function, I noticed
that there are a lot of CPU cycles spent in FastMap::operator[]. What
happend here is that we are increasing size one by one as we build
descriptorSet, and that hit `if (mData.size() <= key)` case and we end
up resize the underline FastVector, and that resize also initialize the
element with zeros, which immediately overwrite by actual data. Since we
actually know the eventual size of
DescriptorSetDescBuilder::mDesc/mHandles/mDynamicOffsets, we could just
switch to angle::FastVector which will avoid this check size and grow
every time we write to it. This CL switches the use of FastMap in
DescriptorSetDescBuilder to FastVector. The only trick we need to watch
out is that previously the new elements are always zero filled and now
it does not. So we need to make sure we write every field of structure.
This CL also renames WriteDescriptorDescBuilder to WriteDescriptorDescs
since when it is read only we are passing it as const reference already,
there is no added advantage to have two classes.
Bug: b/282194402
Change-Id: I06a063cc51585fc17fbf0d5aa916b9aa0ab88dd4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4581881
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Currently if we try to define a 2D texture array in ES2, a crash
occurs during its validation. Since texture3DOES only adds support to
3D textures, we should make sure the validation only passes if ES3 and
above are used.
* Added check for 2D texture array usage in validating glTexImage3D().
Bug: angleproject:8213
Change-Id: Ib477d8b6eec89c35d605a1b575bfb5519d19452e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4618955
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Android CTS and Khronos CTS use different set of
dEQP tests. android/cts contains mustpass lists
for Android CTS. We have test coverage in the
Android CTS in Android testing infra, and we would
like ANGLE standlone deqp test runner to cover the
Khronos CTS. Update the dEQP-EGL test runner to use
the mustpass list that Khronos CTS uses.
Since the test lists changed, some tests in
expectation files are no longer needed, as they
are not within Khronos CTS mustpass list. Keeping
them in the expectation file will cause test runner
exception as the test runner does check if the test
listed in the expectation file is in the mustpass list.
Bug: b/286921997
Bug: angleproject:6277
Bug: angleproject:7506
Bug: angleproject:6528
Change-Id: I7851b854322985f564cbb56d804f04f663d947aa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4619627
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
1. Always upload color values encoded in sRGB colorspace for
sampling tests and linear colorspace for rendering tests.
Depending on attribute list, the test will either expect
color decoded in linear space or sRGB color value as is
2. Add helper functions that determine expected output color
for a given attribute list and EGLImage usage
Refactor TEST and helper functions to account for the above updates
Test: ImageTest*_Colorspace*
Bug: angleproject:3756
Change-Id: I54ae22b2d379e6fdfa04429849de5efe9684caf4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4643452
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Overwritten features were never reset even if a display was
terminated. On platforms that reuse displays for all tests
in the end2end suite, overridden feature would leak into
subsequent tests causing unexpected failure.
Bug: angleproject:8235
Change-Id: I1b359bc762a2bca8db4e4dbc7a587604e5bd6a5b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4643453
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
With the conversion of the interface variable info map keys to SPIR-V
ids, there is no longer a benefit to bucket resources by their type.
This change removes this bucketing and flattens the map.
Bug: angleproject:7220
Change-Id: If83cb02ca9e91f72dddb2deb7313fee40f9f06c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4632577
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
The shader interface variable map had a "resource index" -> info map to
optimize descriptor set building. That avoided hashing the resource
name when the rest of the map was name-based.
With the map using SPIR-V ids now, there is no reason to maintain this
map; SPIR-V ids can be used to look up the info just as efficiently.
Bug: angleproject:7220
Change-Id: I619783dce558a59184955cc314c1f41e6733f1b7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4630728
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
When creating a new pipeline cache and the blob cache doesn't have
a matching one we can load, we unintentionally skipped serializing it to
the blob cache until the pipeline cache state changed later on.
Bug: angleproject:8230
Change-Id: If86d1bd169a63da9f9a394284a754bccb7d52e20
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4639496
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>