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>
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>
In this scenario:
- Clear color
- Invalidate depth
- Clear color
The invalidate step flushed the deferred color clear, but the following
clear did not expect an open render pass without any draw calls in it.
This change fixes this issue, while simultaneously optimizing invalidate
by making sure the clears accumulated during syncState() are redeferred
instead of flushed.
This issue was discovered in
https://chromium-review.googlesource.com/c/angle/angle/+/3266176 where,
as part of an unrelated fix, an accidental render pass closure is
removed.
Bug: chromium:1267424
Change-Id: Icfc0a53dbf84e6339ee23960ed847444830054e6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3266178
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This reverts commit 017161701b.
Reason for revert: Blocking roller, please re-land with the fix.
Original change's description:
> Metal: Reintroduce GPU power preference selection code.
>
> This CL re-introduces the GPU power preference code to
> the metal backend. It also reworks EGLDisplay caching
> in the frontend to cache based on the native display
> as well as the power preference attribute.
> A new extension, EGL_ANGLE_display_power_preference is
> added based on EGL_ANGLE_power_preference. This extension
> is a client extension that allows selection of GPU on
> display creation, similar to how GPUs are selected on
> context creation in EGL_ANGLE_power_preference.
> This CL adds EGLDisplayPowerPreferenceTest and enables it on
> the metal backend.
>
> Bug: angleproject:6143
> Change-Id: I0a081dcd2e3f18ab365fdd3498ddcb6e2ba35212
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3231986
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Gregg Tavares <gman@chromium.org>
> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
TBR=kbr@chromium.org,gman@chromium.org,jonahr@google.com,jmadill@chromium.org,angle-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I4f775bf7139253a87b033a30e0da2100b3c1bb02
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:6143
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270749
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Since these variables are to be considered inputs as well as outputs
initializing them would overwrite the valid input values, hence skip
initialization.
Bug: angleproject:6608
Change-Id: Id8baf856a23ac84d18c61dd54cd6095128190075
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3253377
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
When running only a few tests the script has the tendency to sleep
a long time after the tests were finished. So limit the sleep time
by the number of remaining jobs.
Bug: None
Change-Id: I52ad39bf047abf93cd900f687bd3aae3962e9e20
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3263999
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
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>
Add flushCommandsAndEndRenderPassWithoutQueueSubmit() to allow
ContextVk::flushAndGetSerial() to only issue a single vkQueueSubmit().
Bug: angleproject:6546
Change-Id: Ia3fc2bb93e88583ebd80ee153749dc8ca42245dc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3200673
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
optimalBufferCopyOffsetAlignment is the optimal buffer offset alignment
in bytes for vkCmdCopyBufferToImage2KHR, vkCmdCopyBufferToImage,
vkCmdCopyImageToBuffer2KHR, and vkCmdCopyImageToBuffer. The per texel
alignment requirements are enforced, but applications should use the
optimal alignment for optimal performance and power use.
To improve efficiency, this CL updates ContextVk::mStagingBuffer's
alignment to the max of:
- minMemoryMapAlignment
- nonCoherentAtomSize
- optimalBufferCopyOffsetAlignment
On ARM, this is not expected to have any affect, since all three values
are 0x40, but other platforms may see a benefit.
Bug: angleproject:4297
Change-Id: I9185da111e09c5d782eb1dedb10369727cb9bf51
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3256007
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
If a framebuffer binding change is followed by glInvalidateFramebuffer,
ANGLE was not syncing the framebuffer binding.
- This means that invalidation was being done on the previous
framebuffer.
- Paired with deferred clears, this was causing ContextVk to start a
render pass on the previous, potentially deleted, framebuffer.
Bug: chromium:1267027
Change-Id: I092a0c8dd764db9e49258b694c970babb19cf24b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3266175
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
ASAN is not supported in 32-bits on Windows.
Bug: angleproject:5795
Change-Id: Icabf31b8c9ad4d371217c9f4a288f909888eae61
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3265532
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
This CL re-introduces the GPU power preference code to
the metal backend. It also reworks EGLDisplay caching
in the frontend to cache based on the native display
as well as the power preference attribute.
A new extension, EGL_ANGLE_display_power_preference is
added based on EGL_ANGLE_power_preference. This extension
is a client extension that allows selection of GPU on
display creation, similar to how GPUs are selected on
context creation in EGL_ANGLE_power_preference.
This CL adds EGLDisplayPowerPreferenceTest and enables it on
the metal backend.
Bug: angleproject:6143
Change-Id: I0a081dcd2e3f18ab365fdd3498ddcb6e2ba35212
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3231986
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Gregg Tavares <gman@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
A GPU WRITE->HOST barrier frequently issued when the GPU outputs to a
host-visible buffer used the ALL_COMMANDS stage mask causing a best
practices message. This message is suppressed in ANGLE, but shows up in
RenderDoc and clutters the output.
Bug: angleproject:5070
Change-Id: I59aa7f8c7b3bf2788a3f7ae0ab6abdb4d3cd175e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3265606
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
When running with Wayland, EGL returns rgb10 buffer format in
egl config, which makes assertion to explode in formatutils as
this format is not in list of supported formats.
GL_RGB10_EXT is under the ES1 extension GL_OES_required_internalformat.
Thus, add it to the format table.
Bug: chromium:1231934
Change-Id: Ib47af538b16d6c7a652a44e0674757d292ac1394
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3253376
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
If an app requests to create a surface with GL_RGB8, override it to be
GL_RGBA8 for Android.
This is to workaround an issue with the Android Vulkan loader which
limits which formats can be used with swapchains.
This CL also adds GL_RGB8 back to DisplayVkAndroid::generateConfigs(),
effectively reverting the following CL:
https://chromium-review.googlesource.com/c/angle/angle/+/3235466
This is being done with this CL (rather than reverting) since these
changes are required to handle surfaces created with GL_RGB8.
Bug: angleproject:6277
Bug: angleproject:6651
Change-Id: Iad78ea0d7bdf12e1e309ed6a7181f08fac38b9de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3258143
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
Makes some VkFlags into VkAccessFlags to aid with code search. Also
corrects a few typos.
Bug: angleproject:6566
Change-Id: Ia4d14d38bb6d4e8c4c71fed6038c12edae112be9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3264224
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
This missing reset was causing incorrect state validation to
persist in a few instances.
Bug: chromium:1266437
Change-Id: I7ab47c81bf9f855e3ad75048f9d1aaefbc2291df
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3262477
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
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>
If an app destroys a context, but keeps it current on a thread, ANGLE
will reset the context, but can't delete it. This can lead to a segfault
if ANGLE attempts to call Context::finish() on a destroyed context.
To solve this, check if the context has been destroyed in
ShareGroup::finishAllContexts().
Bug: angleproject:6653
Change-Id: Ib30e352ad6395e01f8fab0095cd6231dfb10d8ae
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3260726
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
In the process of dropping ANGLE_multiview in favor of OVR_multiview,
the framebuffer completeness checks have become stale. In particular:
- There is no requirement that the base layer of the attachments match
- There _is_ a requirement that base+count layers are within the texture
boundaries.
Bug: chromium:1264988
Change-Id: I86837b587ad5befaa6a545c5a24507e8dff0b568
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3259272
Reviewed-by: Alexis Hetu <sugoi@google.com>
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This CL introduces the concept of having optimized shaders for given
state combinations. In this first pass, all uniform bools have been
moved to hard coded values in the GLES1 ubershader.
Frame times on Android ARM with locked GPU clocks:
Trace Before After
dr_driving: 27.8145 -> 4.2986
sonic_the_hedgehog: 17.9779 -> 2.8223
summoners_war: 93.2040 -> 15.9810
wordscapes: 53.9227 -> 7.6167
zillow: 15.0323 -> 2.9368
Bug: angleproject:6644
Bug: angleproject:6652
Change-Id: I548bc5c6aa24bad5fbd740b9552c4a703ae41354
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251688
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Rework vertex buffer caching to allow us to reuse parts
of converted buffers.
Reusing conversions dramatically drops the memory usage
when drawing index ranges by offset with
unaligned attributes.
Bug: angleproject:6638
Change-Id: I79797da202629b1632e1397ce1227ee3d7a1c9d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251467
Commit-Queue: Kyle Piddington <kpiddington@apple.com>
Reviewed-by: Le Hoang Quyen <le.hoang.q@gmail.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Consider the following GL commands:
glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN)
glBeginTransformFeedback()
glDrawArrays()
glPauseTransformFeedback()
glDrawArrays()
glResumeTransformFeedback()
glDrawArrays()
glEndTransformFeedback()
glEndQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN)
The renderpass is broken for each of the draw calls, leading to
pauseRenderPassQueriesIfActive() and resumeRenderPassQueriesIfActive()
being called when the RP is stopped/started. This leads ANGLE to
generate 3 TransformFeedbackPrimitivesWritten queries when looping
through the "active" queries, since no consideration is made for XFB
actually being active/unpaused.
ARM doesn't support the TransformFeedbackPrimitivesWritten query when
XFB is disabled. Instead, the query is never completed and the results
are never available. It could probably be argued that this is an ARM
bug, and they should just output '0' if XFB isn't active during the
query.
Regardless, ANGLE shouldn't be issuing the queries when XFB is no
active, since it's wasteful.
Bug: angleproject:6622
Test: dEQP.GLES3/functional_transform_feedback*
Test: TransformFeedbackTest.TransformFeedbackQueryPausedDrawThenResume
Change-Id: I380fb60405d7f538b802bb0df72bf609f0bc58e9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3246532
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>