651 Commits
Author SHA1 Message Date
Jamie Madill 5ca36d3c56 Trace Interpreter: Properly support resource ID maps.
Previously we were using the key value as the resource value.
In some cases these values would become mismatched when running
a replay, which would cause interpreter errors.

Bug: angleproject:7887
Change-Id: I7f8e687986e8282a6df066bdae5ace07e4510b47
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4140258
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2023-01-09 17:08:59 +00:00
Jamie Madill 9c1598af45 Trace Replay: Fix UBO access in the trace fixture.
This bug was from the rework to use encapsulated functions.

Bug: angleproject:7731
Bug: b/262815739
Change-Id: I3965c04439c8f4c2e67708bd2536b8beb3270880
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4144178
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Roman Lavrov <[email protected]>
2023-01-06 20:11:23 +00:00
Jamie Madill e5e78ab416 Trace Interpreter: Auto-gen ReplayCustomFunctionCall.
This makes it easier to add or remove fixture functions.

Bug: angleproject:7775
Change-Id: I1c56465cfa0580414715f562cadc916c4baf3d11
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4128718
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
2023-01-03 16:40:53 +00:00
Shahbaz Youssefi 301ed54556 Vulkan: Pass context to layout getters
In preparation for a change that optionally uses read/write
depth/stencil layouts.  Context is used to test for the
supportsMixedReadWriteDepthStencilLayouts feature to know whether those
layouts are supported or that a fallback must be chosen.

Bug: angleproject:7899
Bug: b/192477489
Change-Id: I1453dc9d060453a3806ad0f261b94368fe01fb29
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116735
Auto-Submit: Shahbaz Youssefi <[email protected]>
Reviewed-by: Amirali Abdolrashidi <[email protected]>
Reviewed-by: Charlie Lao <[email protected]>
Commit-Queue: Charlie Lao <[email protected]>
2022-12-21 23:06:42 +00:00
Alexey Knyazev 28e7adca96 GL: Implement clip distance state emulation
Pass the current set of enabled clip distances
to vertex shaders via an internal uniform and
dynamically set disabled elements to zero.

Bug: angleproject:7880
Change-Id: I709d31dc7ca0606decf49adf674460a941837683
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4094314
Commit-Queue: Alexey Knyazev <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2022-12-20 05:05:49 +00:00
Amirali Abdolrashidi cd5400952a Vulkan: Add memory log at allocation error
* Added logging memory allocation information in handleError() in the
  event of an error from ANGLE_VK_TRY.
  * Used for the handleError() in ContextVk.

* Updated the name and message of the function to log allocations.
  * checkForCurrentMemoryAllocations()

* Added logging memory heap stats, including budget and usage.
  * logMemoryHeapStats()
  * In the renderer, added the feature flag indicating whether the
    platform supports the memory budget extension.
    * Uses VK_EXT_memory_budget.
  * Added the enum class MemoryLogSeverity, which is used to select
    the severity level of the memory log.

* Added logging pending memory allocation information.
  * logPendingMemoryAllocation()
  * If the last unsuccessful memory allocation was unsuccessful, its
    information will be added to the log.

Bug: b/262029018
Change-Id: I97343c1553936aed23d763f3e0c00d495f9ee810
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4089531
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Charlie Lao <[email protected]>
Commit-Queue: Amirali Abdolrashidi <[email protected]>
Reviewed-by: Kaiyi Li <[email protected]>
2022-12-19 19:59:41 +00:00
Shahbaz Youssefi ea36cf1c9a Vulkan: Feature for VK_EXT_rasterization_order_attachment_access
This change just adds the feature.  A follow up change will actually
start using the extension.

Bug: angleproject:7899
Bug: b/192477489
Change-Id: I19c078ebe57a7819b3aa3e95d4436cefa34ba85b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4113912
Reviewed-by: Amirali Abdolrashidi <[email protected]>
Auto-Submit: Shahbaz Youssefi <[email protected]>
Commit-Queue: Amirali Abdolrashidi <[email protected]>
2022-12-19 19:09:44 +00:00
Gregg Tavares be9e8e7b03 Add EGL_ANGLE_wait_until_work_scheduled extension
We're changing eglReleaseTexImage so it calls
flushCommandBuffer(mtl::NoWait) instead of
flushCommandBuffer(mtl::WaitUntilScheduled)
and then adding an extension to allow us to
WaitUntilScheduled.

This is because Chrome calls eglReleaseTexImage for
every canvas and having it WaitUntilScheduled per call
is very slow. So instead we'll call eglWaitUntilWorkScheduledANGLE
once which will effectively wait just once.

Bug: angleproject:7890
Change-Id: I87bc9f9a1a7f4a0f99d93736cc3083799e76afeb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4109311
Reviewed-by: Kenneth Russell <[email protected]>
Commit-Queue: Gregg Tavares <[email protected]>
2022-12-17 02:33:59 +00:00
Jamie Madill ef6f212741 Capture/Replay: Fix trace interpreter autogen inputs.
We were using the Khronos-specific XML file list, when we were
really using both the Khronos and ANGLE XML files. Also updates
auto-gen with the new data.

Bug: angleproject:7775
Change-Id: Ifbc74bceec24a767ef45d94dd2e8a5cf850396ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4111198
Commit-Queue: Jamie Madill <[email protected]>
Auto-Submit: Jamie Madill <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Cody Northrop <[email protected]>
2022-12-15 16:18:16 +00:00
Roman Lavrov 2ce2146b13 Fix --render-test-output-dir to work in TestSuite.
https://crrev.com/c/3956937 introduced the issue where this flag is
consumed by ANGLEPerfTestArgs.cpp logic which runs before the TestSuite
constructor and removes the flag so we end up with an empty
mTestArtifactDirectory in TestSuite.

Bug: angleproject:7755
Change-Id: Ic32d3a2ddceca7842a0aebe5a1e40cbedaedf2eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4097325
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Roman Lavrov <[email protected]>
2022-12-15 15:50:56 +00:00
Shahbaz Youssefi 77c95de4b3 Vulkan: Threaded monolithic pipeline creation
With this change, once a pipeline is created out of libraries, a task is
scheduled (if necessary) to asynchronously create a corresponding
monolithic pipeline.  Once the task is complete, the linked pipeline
handle is replaced by the monolithic one, gaining back any performance
that might have been lost due to the use of libraries.

Bug: angleproject:7369
Change-Id: I525fb1e09f8bedc61b9dbef19f9cce7026ff9c53
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031151
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Yuxin Hu <[email protected]>
2022-12-14 15:43:47 +00:00
Shahbaz Youssefi db9ffea3e8 Vulkan: Remove the unused shadowBuffer feature
Bug: angleproject:4339
Change-Id: I4f4524ba597af25bd6da3792bd7a85ae1b52962e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4089448
Reviewed-by: Yuxin Hu <[email protected]>
Commit-Queue: Yuxin Hu <[email protected]>
Auto-Submit: Shahbaz Youssefi <[email protected]>
2022-12-09 18:08:58 +00:00
Jamie Madill 54176f07ac Better support for "vulkan-null" backend in trace tests.
This allows running the "null" Mock ICD with the Vulkan
secondaries version, and allow you to specify "vulkan-null"
as an ANGLE back-end generally.

Bug: angleproject:7852
Change-Id: Id8c59a167345a6079bd71916ae6ef9c41a6039a7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4089449
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
Auto-Submit: Jamie Madill <[email protected]>
2022-12-09 14:58:46 +00:00
Jamie Madill 2031e2153f Fixes for Vulkan secondaries build.
Includes the defined name of the alternate library in every
build, so that platforms without Vulkan still have access to
the library name define.

Also fixes checks for the ANGLE driver in the tests to work
with the new secondaries enum. This will let developers run
trace tests with the vulkan secondaries library.

Bug: angleproject:6811
Change-Id: If3846d68e532238f0b1c1c506638867a23fb4357
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4076513
Commit-Queue: Yuly Novikov <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2022-12-02 23:07:40 +00:00
Jamie Madill aaee3c23c1 Build and test ANGLE with Vulkan secondary CBs.
This will allow us to run tests with both permutations of
ANGLE (custom secondaries & Vulkan secondaries) in the same
build directory. It will also allow us to run these configs
as tests on our infra. This CL adds a few simple test to CI.

Bug: angleproject:6811
Change-Id: I053f8cc5bafc2a7ab7d0665da9301f0ba7f8417f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4067806
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2022-12-02 15:46:53 +00:00
Chris Dalton a4db947717 Implement pixel local storage with metal::read_write textures
Metal's programmable blending feature isn't available on non-Apple
Silicon, so on these devices we have to polyfill pixel local storage
using read_write textures, which can also be coherent if
raster_order_groups are supported.

This change leverages the existing PLS transformation to images, and
implements just enough shader image functionality in Metal to support
the pixel local storage usecase. Missing shader image features are
marked with UNIMPLEMENTED().

Bug: angleproject:7279
Bug: angleproject:7792
Bug: angleproject:7794
Bug: angleproject:7797
Bug: angleproject:7803
Change-Id: Ia96a714693d352d57351a1bae4f45437dde000e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3993363
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Quyen Le <[email protected]>
Commit-Queue: Chris Dalton <[email protected]>
Reviewed-by: Kyle Piddington <[email protected]>
2022-12-01 07:28:04 +00:00
Yuxin Hu 1434697fad Add a vk feature flag to only enable precision match fixer on IMG
According to
https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/5273,
RelaxedPrecision does not need to match in the interface matching
rules. However, removing the precision match is causing triangle
clipping issues on IMG hardware. This change adds a feature
flag to only run the code path that applies precision match in
SpirV if the hardware is IMG.

This is a follow-up change to https://crrev.com/c/4049421.
Instead of adding back the code path that handles varying
precision mismatch for every hardware, only enabling the code
path if the vendor is IMG.

Test:
On Pixel6:
$ adb shell setprop debug.angle.feature_overrides_enabled
varyingsRequireMatchingPrecisionInSpirv
$ out/AndroidDebug/angle_end2end_tests
--gtest_filter="GLSLTest_ES3.MismatchPrecision*" --verbose

Bug: angleproject:7488
Change-Id: Ia0155f14d523195df2f47b852ed6642918270e2a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4054100
Commit-Queue: Yuxin Hu <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
2022-11-29 19:14:21 +00:00
Roman Lavrov c86f0988e0 Cleanup: Use XAllocSizeHints, move to helper.
Dynamic allocation (XAllocSizeHints) is recommended due to struct
potentially changing in future. Also move the repated code block
to a helper function.

Bug: angleproject:7840
Change-Id: I1e91c7adc0e36e31a385263f5d1a556520ece45c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4048661
Auto-Submit: Roman Lavrov <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2022-11-22 20:24:47 +00:00
Shahbaz Youssefi 68b47e58aa Vulkan: Initial support for VK_EXT_graphics_pipeline_library
When available, this change uses VK_EXT_graphics_pipeline_library to
create pipelines.  Currently, it is only used when
graphicsPipelineLibraryFastLinking is available.  This restricts the use
of this extension to devices where monolithic pipelines are not any more
performant than linked libraries.

A future change adds support for other implementations by providing
async pipeline creation.

Bug: angleproject:7369
Change-Id: I1e3b7ac4aa56e75c7d6f4d0d5ea91cb0b862e581
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031489
Reviewed-by: Charlie Lao <[email protected]>
Reviewed-by: Amirali Abdolrashidi <[email protected]>
Reviewed-by: Steven Noonan <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2022-11-22 19:04:34 +00:00
Lubosz Sarnecki 317870f9c0 Reland "util/X11Window: Set PMinSize and PMaxSize hints."
This is a reland of commit a78eca2cab

Revert https://crrev.com/c/3661210 refers to cropping on SwS bots which might be due to another X11 related issue I recently fixed (https://crrev.com/c/3979168)

Lack of min width/height is triggering a swapchain recreation with smaller extents due to window being resized by the WM:
https://anglebug.com/7840#c2

Also, capturing screenshots past the first frame (--screenshot-frame=2) results in partial screenshots.

Original change's description:
> util/X11Window: Set PMinSize and PMaxSize hints.
>
> Before this patch replay windows were down-sized to match the default
> screen size in case their extent was greater than the screen size.
>
> Setting a PMinSize on XSizeHints resolves the issue on modern window
> managers. Tested with GNOME Shell 41.3 with both native X11 and Wayland
> (over XWayland) backends.
> Setting PMaxSize was also requried to pass the
> BlitFramebufferANGLETest tests.
>
> This fixes retracing with correct extents and resolves a VVL performance
> warning.
>
> Bug: angleproject:6808
> Bug: angleproject:7083
> Change-Id: I00ee149ec02efe08c5801e4231913049d31e262b
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3507514
> Reviewed-by: Cody Northrop <[email protected]>
> Reviewed-by: Jamie Madill <[email protected]>
> Commit-Queue: Lubosz Sarnecki <[email protected]>

Bug: angleproject:6808
Bug: angleproject:7083
Bug: angleproject:7840
Change-Id: Ide540ecf55c2c0f39635f2b6b0688d7c2ddffc0b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4048025
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Roman Lavrov <[email protected]>
2022-11-22 18:00:54 +00:00
Cody Northrop 202fcb8d85 TraceTest: Route EGLSync entry points through WGL
Test: diablo_immortal trace
Bug: angleproject:7402
Bug: angleproject:7839
Change-Id: I8897337bac38cb1923e58a9503de01454766158d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4044865
Commit-Queue: Cody Northrop <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2022-11-22 17:55:43 +00:00
Cody Northrop 3857752d84 Tests: Fix parameter parsing with partial matches
New parameter parsing code needs a small tweak to handle
partial flag matches.

For instance, a new flag being added would trigger as if an
old one had been provided:

new: --fixed-test-time-with-warmup
old: --fixed-test-time

And if equals notations were being used:

--fixed-test-time-with-warmup=value

the code before this CL will treat the entire thing as
--fixed-test-time and attempt to consume the next argument
as value

Bug: angleproject:7755
Change-Id: I57eae2847053d664338d40b0191d5223ddd95852
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4038494
Reviewed-by: Roman Lavrov <[email protected]>
Commit-Queue: Cody Northrop <[email protected]>
2022-11-18 22:30:32 +00:00
Shahbaz Youssefi 70cf232224 Vulkan: Move async pipeline cache sync feature to backend
Bug: b/246683126
Change-Id: I194e488e04580cee7055c0674091f1228984edf9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031486
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Solti Ho <[email protected]>
Reviewed-by: Amirali Abdolrashidi <[email protected]>
Auto-Submit: Shahbaz Youssefi <[email protected]>
2022-11-18 06:01:34 +00:00
Amirali Abdolrashidi f62405c5ac Add utilities to get the Android backtrace
* Added getBacktraceInfo(), which returns the backtrace information
  from the ANGLE code, including the addresses and the symbols if
  possible

  * Returns the data in an instance of the new class BacktraceInfo.

  * In order to access this function, backtrace_utils.h has been
    included in vk_utils.h

* New GN flag to make use of this feature:

  * angle_enable_unwind_backtrace_support

    * Current only available on Android (debug mode)

  * If the flag is disabled, getBacktraceInfo() returns an empty
    object.

* Added functions in util/ (per platform) to print the BacktraceInfo
  data.

  * Example of usage:
      angle::printBacktraceInfo(angle::getBacktraceInfo());

* Minor edit: Moved cstdint from android_util.cpp to its header.

Bug: b/258475923
Change-Id: I6115462a1a2845d40c7cafc14ce52df09ecdcf34
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3995843
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Charlie Lao <[email protected]>
Commit-Queue: Amirali Abdolrashidi <[email protected]>
2022-11-11 18:18:55 +00:00
Shahbaz Youssefi 9c019cb367 Vulkan: Features for graphics pipeline library
Bug: angleproject:7369
Change-Id: I561cc095dcf2d4c71d24de8a6ca08d45567ad937
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4014519
Auto-Submit: Shahbaz Youssefi <[email protected]>
Commit-Queue: Charlie Lao <[email protected]>
Reviewed-by: Charlie Lao <[email protected]>
Reviewed-by: Amirali Abdolrashidi <[email protected]>
2022-11-08 21:47:17 +00:00
Shahbaz Youssefi 78e28cb8f7 Vulkan: Remove glslang fallback
ANGLE's SPIR-V generator is battle tested by now.

Bug: angleproject:6210
Change-Id: I2ed88642e3ede435e3f906fbd701133be6873fb7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4002868
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2022-11-08 14:42:58 +00:00
Shahbaz Youssefi 5b2181969a Metal: Remove compilation through SPIR-V
Direct metal generation is stable.

Bug: angleproject:6081
Change-Id: If9e76f61ad38f2fc9963f0181dfd03c99ffa3e2b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4003675
Auto-Submit: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
2022-11-07 21:53:21 +00:00
Alan Zhao e87a62fb79 Explicitly #include <errno> in WaylandWindow.cpp
This file refers to the symbols 'errno' and 'EAGAIN' via a transitive
include that will be removed in an upcoming libc++ roll.

Bug: chromium:1382076
Change-Id: Ife4e65ecffe9b2e526a2b7dce7f48fe836ca742a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4010158
Auto-Submit: Alan Zhao <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Hans Wennborg <[email protected]>
Reviewed-by: Amirali Abdolrashidi <[email protected]>
2022-11-07 18:44:18 +00:00
Chris Dalton 9bda9a79b4 Add Store Ops to pixel local storage
Browsers will need the ability to pre-empt pixel local storage, which
means every plane will need a backing store to dump to. Store Ops allow
the app to still avoid memory transactions at the end of PLS even if
their plane has a backing texture.

Bug: angleproject:7279
Change-Id: I3a3efa21773f87c03cd346a996e3c638028c68ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3974652
Commit-Queue: Chris Dalton <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
2022-11-04 23:13:35 +00:00
Chris Dalton 3605b399e0 Move PLS clear values back into context state
The API that required packing raw data into a buffer was un-ergonomic
for developers and difficult to implement for WebGL vendors.

Bug: angleproject:7279
Change-Id: If7c98908c285462c5775e8e2d8811883be139f64
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3972376
Commit-Queue: Chris Dalton <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2022-11-04 00:55:08 +00:00
Chris Dalton 5e95a4d9b7 Add an EXT_shader_pixel_local_storage impl of PLS
Translates ANGLE_shader_pixel_local_storage shaders directly to
EXT_shader_pixel_local_storage.

Polyfills load/store operations using internal fullscreen draws.

Since the ANGLE extension needs the ability to preserve all active PLS
planes to textures, we can only support this extension when the backend
context also has access to ES 3.1 shader images.

Bug: angleproject:7279
Bug: angleproject:7771
Change-Id: Id348bde412efcc081ff29ee05ec59ad652f77569
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3966075
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2022-11-03 14:41:47 +00:00
Shahbaz Youssefi 1b88c41f28 Vulkan: Remove the disableFifoPresentMode feature
Workaround was added for old Intel bots, no longer applicable.

Bug: angleproject:3153
Change-Id: Ib248927fbb1be33d8bd89a0c8185761f7f1ed6fa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3993361
Reviewed-by: Yuly Novikov <[email protected]>
2022-11-02 15:12:56 +00:00
Cody Northrop bae82cfae3 TraceTest: Route eglGetError through WGL
eglGetError is not implemented, but shouldn't crash on Windows.

Bug: angleproject:7799
Change-Id: I61158ab21b86539020b5d492486333a56908ab69
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3995984
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Cody Northrop <[email protected]>
2022-11-01 21:04:23 +00:00
Sean Risser f3e047b5d7 Add new retrace command get_min_reqs
`retrace_restricted_traces.py get_min_reqs` finds the minimum
required GLES version and extensions and record them to a trace's
json file. TracePerfTest has also been modified to use the new
"RequiredExtensions" json field to determine if it should run a
test or not. This allows several lines to be removed from
TracePerfTest's constructor.

get_min_reqs uses a divide-and-conquer strategy to find the extensions.
This approach should be faster for traces where the number of required
extensions is less than 20.

This adds a new command to retrace_restricted_traces.py called
get_min_reqs. This runs an existing trace multiple times to find what
the minimum required GLES version is, then records that version to the
trace's json file.

Bug: angleproject:7639
Change-Id: I42530e438054efec1ad79ababebe06d221d5c695
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3884175
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Sean Risser <[email protected]>
2022-11-01 19:13:43 +00:00
Gert Wollny 27561f0419 Capture/Replay: Emit always gContextMap2 when capturing traces
Bug: angleproject:7800
Change-Id: I12fc39d709527865a9b248a00c95d281c4e4d743
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3993317
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Gert Wollny <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2022-11-01 08:50:00 +00:00
Yiwei Zhang fd3bfb778d EGLWindow: workaround eglQueryString behavior before Android 10
EGL_NO_DISPLAY + EGL_EXTENSIONS returns NULL before angle support
introduced in Android 10. See aosp/760681 for the reference.

Bug: b/255844932
Test: build and run angle trace on Android Pie
Change-Id: I23a8236cbd220ce34ebbcc602d6ced351fc76619
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3988422
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Cody Northrop <[email protected]>
2022-10-28 00:39:50 +00:00
Jamie Madill a986811024 Add support for testing with Mesa + Zink.
To run a trace test with zink, use --use-gl=zink.

Bug: angleproject:7689
Change-Id: I70073756f903db1c224fe6175d55be4cad637aca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3899382
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2022-10-27 22:47:47 +00:00
Roman Lavrov 6bef063034 Exit on nullptr returned from decompress callback.
Decompression failures appear to happen (very) occasionally,
resulting in a weird stack trace later down the road.

Bug: None
Change-Id: I12780f462c7d1a141d0841e1e07acb2d282077e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3970768
Auto-Submit: Roman Lavrov <[email protected]>
Commit-Queue: Amirali Abdolrashidi <[email protected]>
Reviewed-by: Amirali Abdolrashidi <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
2022-10-26 15:37:17 +00:00
Roman Lavrov a77a80a173 Wait for DestroyNotify and ConfigureNotify events.
There appears to be a race condition where
XDestroyWindow+XCreateWindow ignores the new size
(the same window normally gets reused but this only happens
sometimes on some X11 versions).

Wait until we get the destroy notification which should avoid races
between termination and initialization.

However, it turns out just doing that breaks things because tests get to
termination before even giving the window a chance to set up fully
(e.g. ConfigureNotify) which only happens after making the window
visible.. so additionally block in setVisible until we get
ConfigureNotify.

aaand turns out RobustBufferAccessBehaviorTest requires
setVisible(true) - tests fail when running on my local Linux and pass
now that I added setWindowVisible!

Bug: angleproject:7620
Change-Id: I93f2f05cb9d1c62776636bec976d94ead4cf0fd1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3979168
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Roman Lavrov <[email protected]>
2022-10-26 13:01:48 +00:00
Greg Schlomoff 81a244de0a Adding a class to perform ASTC texture decompression on the CPU
This significantly improves performance by caching and re-using the ASTC
decoder context, and using multi-threaded decompression.

This code was originally written for gfxstream.

Bug: b/250688943
Change-Id: I1727447907f2e25cf9b854ffcc9ccfc04db2fb91
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3929008
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Charlie Lao <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2022-10-25 18:33:46 +00:00
Geoff Lang 966f3baed4 Replace sprintf by snprintf in trace_interpreter.cpp
sprintf has been deprecated and generates warnings.

Bug: angleproject:7752
Change-Id: Id1483585397edba44e03f7e5e925d398882af2f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3975351
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
2022-10-24 19:17:58 +00:00
Jamie Madill dc62b3eef6 Capture/Replay: Add trace interpreter.
Also adds a self-test using the retrace script.

Bug: angleproject:7752
Change-Id: I1985b47250bef99726d2ca2d90bef859208e357e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3965128
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuxin Hu <[email protected]>
2022-10-21 23:12:02 +00:00
Jamie Madill bba4758882 Update ANGLE API loaders to avoid C++ syntax.
This replaces "using" with "typedef" in the various loaders.
This will allow C traces to use the loaders, which in turn will
allow us to implement a C interpreter.

Bug: angleproject:7731
Change-Id: I37838bcafc290502fca0038d1b50554b6a301e65
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3966533
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuxin Hu <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
2022-10-21 12:50:10 +00:00
Jamie Madill 70ca7bd823 Capture/Replay: Make fixture work with C and C++.
This prepares the trace fixture for simplified C source replays.

Bug: angleproject:7731
Change-Id: I1ac55ec95838ece2deb81cca2a5bec2a20d90bd7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3966532
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Yuxin Hu <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2022-10-21 11:25:51 +00:00
Jamie Madill 6193274a52 Capture/Replay: Redesign in-memory call capture replay.
This will allow the replay to use the call captures returned
by the interpreter's parser.

Bug: angleproject:7752
Change-Id: If1b281d9ce7ccfbdc23bea615e1e2258c8a029f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963367
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuxin Hu <[email protected]>
2022-10-21 00:17:51 +00:00
Jamie Madill d25911dece Capture/Replay: Move trace fixture into util/
This will allow us to cleanly import the fixture headers
outside of libANGLE. We'll need to call into the trace fixture
in the trace interpreter, which will be in util/.

Bug: angleproject:7752
Change-Id: I3438989db8482924272c69e78d7ac5702e510648
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963363
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Yuxin Hu <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2022-10-20 17:44:08 +00:00
Jamie Madill e495e7fdd0 Redo perf and trace test parameters.
- Moves common argument parsing code into test_util.
- Changes the perf test arg parsing to use the common functions.
- Adds new --use-angle and --use-gl parameters to the trace tests.
- Also adds new --offscreen and --vsync parameters to the traces.
- Removes the now unneeded --enable-all-trace-tests argument.
- Both --arg=value and --arg value work in test suites now.

Now, instead of using --enable-all-trace-tests you can specify the
backend with --use-angle=swiftshader, --offscreen, or combinations
of those parameters. The test names are the same as they were
before, but only the configured tests will run in a session. We
could opt to simplify the test names in later CLs if we want to
simplify the test running. Ideally we'd keep the perf reporting
the same because then we'd keep the time series the same on the
test infra.

This also allows us to split up the trace tests into separate
targets on the bots, which will better allow us to control the
workloads and sampling of the tests. For example:

- angle_perftests becomes
  - angle_perftests (microbenchmarks)
  - angle_trace_perf_vulkan_tests (traces with vulkan back-end)
  - angle_trace_perf_native_tests (traces with system GL)

Bug: angleproject:7755
Change-Id: I537168f3a6de96425dfda05ed98220eff9b19b76
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956937
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
2022-10-19 16:50:01 +00:00
Sungyong Choi dc741ad622 Add cstring header for memcpy and strcmp
This patch adds cstring header for memcpy and strcmp

Signed-off-by: Sungyong Choi <[email protected]>
Change-Id: I8130010a07d43490417302d0aa5557c3224d56ed
Bug: angleproject:7765
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963829
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2022-10-19 04:13:21 +00:00
Alexey Knyazev fec93f40d3 GL: Support clip and cull distance extensions
Use EXT_clip_cull_distance on OpenGL ES to expose
APPLE_clip_distance; use ARB_cull_distance on OpenGL
to expose EXT_clip_cull_distance.

Added disableClipCullDistance OpenGL workaround.

Bug: angleproject:4452
Change-Id: I458cad29c10b9d9193c5233e24bac53361ba104e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956075
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Alexey Knyazev <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2022-10-19 01:08:04 +00:00
Gregg Tavares 968041b547 Metal: Optimized BufferSubData per device
Adds a staging buffer path which means there are 4 paths
for bufferSubData.

1. direct copy

   * get a pointer to the buffer
   * copy the new data to the buffer
   * if the buffer is managed, tell metal which part was updated

2. use a shadow copy

   * copy the data to a shadow copy
   * copy the entire shadow to a new buffer
   * start using the new buffer

3. use a new buffer

   * get a new buffer (or unused)
   * put the new data in the new buffer
   * blit any unchanged data from the old buffer to the new buffer
   * start using the new buffer

4. use a staging buffer

   * get a staging buffer
   * put the new data in the staging buffer
   * blit from the staging buffer to the existing buffer.

Further, there are 3 types of memory storage modes.
Managed, Staged, Private.

Based on the GPU type different storage modes and different
paths in different sitatutions are more performant.

So, add feature flags to select paths by GPU.

Bug: angleproject:7544
Change-Id: I741dd1874201043416374194bd2001ded8dbd9b4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3842641
Reviewed-by: Kyle Piddington <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Quyen Le <[email protected]>
Commit-Queue: Gregg Tavares <[email protected]>
2022-10-18 00:09:11 +00:00