* 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 <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Kaiyi Li <kaiyili@google.com>
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 <abdolrashidi@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
There are places that we call setQueueSerial after usesBuffer() check.
This was useful when we had the ResourceList where it is more expensive
to set serial. But now setQueueSerial is cheap (actually is cheaper than
usesBuffer check), so there is no need to do this check any more. This
CL removes the check to further reduce the CPU overhead. Because of
this, mUsedBufferCount will not be accurate, so this CL also removes the
tracking of mUsedBufferCount (was only for informational purpose
anyway).
This CL also removes commandBufferQueueSerial.valid() check in
Resource::usedByCommandBuffer() and turns it into assertion. Some places
in contextVk will ensure we only call it on started renderpass so that
other places that calls usedByCommandBuffer will not need to eat the if
check.
Bug: b/262047600
Change-Id: I6b8004b6aa5b567fa94c0eb56801054f818838b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4112145
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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 <kbr@chromium.org>
Commit-Queue: Gregg Tavares <gman@chromium.org>
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 <jmadill@chromium.org>
Auto-Submit: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
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 <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Define more new tokens that are more clearly named, as opposed to
recycling tokens that were meant for a different purpose.
Bug: angleproject:7279
Change-Id: I840e5ea168235c49eec2693b2231c2d329027b0e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4082057
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Because the UBSAN flag is turned on in the ASAN builder, we
don't need a separate UBSAN builder.
Bug: angleproject:7871
Change-Id: I4f6c8d56bdd209efea381677b2972616b6a6df14
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4086741
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
These flags are compatible. This should save on testing resources.
Bug: angleproject:7871
Change-Id: I860e3724f54bdbf06e7530bd6bfe72ec0f53cc54
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4086283
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
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 <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This test configuration is flaky due to non-deterministic
rendering. It's also running a very old configuration. We can
revisit turning this on when our test machines are updated.
Bug: angleproject:7708
Change-Id: I486607f673e49123b3b77e02b335049eb5ab34ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4070224
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Auto-Submit: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
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 <kbr@chromium.org>
Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
Reviewed-by: Kyle Piddington <kpiddington@apple.com>
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 <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Aligned the parameter name with the upstream specs
Moved ValidateProvokingVertexANGLE to validationESEXT.cpp
Bug: angleproject:2829
Change-Id: I820a90c20ef0a1873640c933b1de52526cac7e70
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4043701
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
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 <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Steven Noonan <steven@valvesoftware.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Renamed provoking vertex enums to use _ANGLE suffix.
The newly defined enums alias those from the
desktop OpenGL extensions.
Updated tests to use the new enum names.
Bug: angleproject:2829
Change-Id: I72b686773536d3d54a653114cee5292007510a55
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4013700
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Partial revert of
I458cad29c10b9d9193c5233e24bac53361ba104e
APPLE_clip_distance cannot be implemented on top of
EXT_clip_cull_distance because the former is defined both
for ES 2.0 and ES 3.0 while the latter is defined only for ES 3.0.
Although some ES 3.0+ drivers allow gl_ClipDistance built-in in
ESSL 1.00 shaders, this behavior is not specified so ANGLE should
not allow it.
Added independent ESSL 3.00 gl_ClipDistance and gl_MaxClipDistances
definitions.
Adjusted translator unit tests.
Bug: angleproject:4452
Change-Id: Ib582ce0ac7ccb65f0200ef1d17eaab0c83b228cf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963745
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
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 <chris@rive.app>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
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 <chris@rive.app>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
The serial in the ShaderAndSerial is unused. This CL removed
ShaderAndSerial and replaced with ShaderModule directly.
Bug: b/257116399
Change-Id: I50d42af7818a12888309a80423531d75135e0bfd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3998747
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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 <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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 <ynovikov@chromium.org>
`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 <geofflang@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Sean Risser <srisser@google.com>
In order to guarantee no data is lost while using the
EXT_shader_pixel_local_storage extension, we need to restrict
applications to a small subset of commands while pixel local storage is
active. This CL implements the allow list for GL entrypoints using
wildcard matching inside the code generator, and adds custom validation
for the more specific restrictions that go into effect when PLS is
active.
Bug: angleproject:7279
Change-Id: I5dd48bd93c10e8775f32be32a4fcf17855eb2f0e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3932552
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
Uses a conditional gclient variable "angle_mesa". You must set
this to True in your .gclient to download and configure Mesa.
After that you must also set angle_build_mesa=true in your GN
args. We call through to meson in order to setup and build.
Mesa sources and targets are written into an auto-generated GNI
file. We must update this file on the same cadence as Mesa rolls.
Because the version of libdrm we use in our sysroot is older than
Mesa requires, this CL also includes a custom libdrm build. Also
in order to run bison and flex on the old sysroot that Chrome
infra runs with, this CL includes a new version of flex and bison
that run without newer versions of GLIBC.
Bug: angleproject:7689
Change-Id: I1aeeda1e6f3cf1d5f878aeab5209afa7e1fb5324
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3933062
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
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 <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Taking too long on Windows, this should bring it close to
other test suites.
Bug: angleproject:7782
Change-Id: Ie1e76fffda790c3b5c2e73a22dee92763fa56abb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3970765
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Trevor Black <vantablack@google.com>
Originally we had a lot of conditionally enabled test configs
in angle_perftests, that we enabled behind a flag because the
total runtime would be too large if we left everything enabled.
This CL switches to using a single test set, one for each
trace, and using a the same command-line API we use in dEQP
and the ANGLE samples to pick a single configuration. This
makes it easier to pick exactly what configurations you want
from the command line.
Because we only run one configuration each time, we don't need
to specialize the test name to include the configuration info.
We can also simplify TracePerfTest -> TraceTest since these
tests are run for both perf and correctness.
Old name: TracePerfTest.Run/vulkan_trex_200
New name: TraceTest.trex_200
Example for tests that don't use default arguments:
Old args: --enable-all-trace-tests
Old name: TracePerfTest.Run/native_offscreen_trex_200
New args: --use-gl=native --offscreen
New name: TraceTest.trex_200
Bug: angleproject:7755
Change-Id: Id93cf5725eff2e2c6b3b14804bc2902f38306e7e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3966535
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
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 <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
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 <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
We'll use this in the trace interpreter to parse enum values.
Bug: angleproject:7752
Change-Id: I232a00baac2f74c9618029929bbb3e5822654046
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963366
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This will make it accessible to other generators.
Bug: angleproject:7752
Change-Id: I91bc9a4d6c919266ea329f66d271bf881d99d17a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963364
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This will let them be accessible to the test harnesses. The
trace tests interpreter will need direct access to the classes
that we move in this CL.
This CL also moves the GLenum utils into the common folder,
where they were already used by some other tests.
Bug: angleproject:7752
Change-Id: I97ad607938ef29bc316f6d40098478e002ea8128
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963362
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
This will make these classes play nicely with resource maps. As these
objects are used in a lot of places, and simplified C can't handle
unordered_map, it's necessary to index the maps by simple packed IDs
in capture/replay code. This indirection will also have increased
safety as we validate EGL resource ID handle values before accessing
the memory directly.
Also hides some of the other EGL capture methods behind helper methods
to simplify the C code and hide assignments and other complex maps.
Bug: angleproject:7758
Change-Id: Ibc7bb56430d3068bd38877c9dfb011979d4ea234
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3957164
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
- 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 <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
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 <kpiddington@apple.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
Commit-Queue: Gregg Tavares <gman@chromium.org>
This makes angle_perftests strictly for microbenchmarks.
The trace tests are a better separated target because they
are for both gold correctness tests and performance.
You can now use the GN arg "build_angle_trace_tests" to control
building the trace tests. "build_angle_trace_perf_tests" is
still supported for compatibility.
Updates the infra scripts to use this new trace tests target.
Also updates the build so by default we'll build the trace
tests if you check them out, without needing a custom arg.
Also updates docs.
Bug: angleproject:7755
Change-Id: I2b1ae67799234cc1aefe7cda5f3af945c3f867fd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3953340
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Replaces the custom code in the EGL stubs. Skips a few "Get"
entry points because this CL doesn't implement pointer capture
like we do for all the GL entry points.
Includes a new state in the AttributeMap that indicates which
type of attribute values we used when initializing the map.
Bug: angleproject:4035
Change-Id: I272eac5e4068602ce710ef66c9a1dce5387943a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949911
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
This switches the EGL capture types to ANGLE-casted pointers since
that's what we receive in the capture layer. Note that even if the
capture layer were used as a pure layer, not an EGL implementation,
we'd still have these types for state tracking.
This also prefixes each EGL class in the entry points with the egl
namespace for consistency and for simplifying the ParamType code.
Required changing to non-const gl::Context * in a few places. Also
changes the gSurfaceMap to be indexed by the raw pointer value,
which cleans up the code somewhat.
Bug: angleproject:4035
Change-Id: Id800c1ba25e5819ac7ea1df8aab806bc393fe192
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949910
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Add forceWaitForSubmissionToCompleteForQueryResult feature flag and
enable it for ARM.
Also force host wait if async submission is enabled.
Bug: b/253522366
Change-Id: Ie2d7373930f1a2b3fc761d2f8d2df8fa84983c54
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3954044
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
The MSRTT emulation code had one corner case issue that could lead to
performance and memory inefficiencies. That is when stencil needs to be
unresolved and VK_EXT_shader_stencil_export is not supported.
This change adds a path to emulate VK_EXT_shader_stencil_export and
removes this inefficiency.
This should help Chromium on older Android devices that lack both this
and the recent VK_EXT_multisampled_render_to_single_sampled extensions.
Chromium frequently breaks the render pass (crbug.com/1336981), which
easily leads to this situation.
Bug: angleproject:4836
Change-Id: Ifceec43f7f3807b7e32f4b379edcd4351ae76414
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3935892
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>