Skia is seeing this for every test, and it's polluting
the logs. Realistically, a developer only needs this
once per process.
Bug: angleproject:7155
Change-Id: Ied4df3af4024ec542c6a9fd8c33d36f4e82b69cd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3611062
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This reverts commit 29287e1fc7.
Reason for revert:
Possible root cause of Mac failures http://crbug.com/1320588
Original change's description:
> Make SPIRV optional for Metal backend
>
> This allows clients (ie Skia) to build ANGLE without needing
> all of the additional Vulkan dependencies. Developer builds
> will continue to include both the direct and SPIRV paths, for
> debugging purposes.
>
> Bug: angleproject:7155
> Change-Id: I1c38ee19e747df8b25fd2f8e8efa3b420a4d7766
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3605764
> Commit-Queue: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Auto-Submit: Brian Osman <brianosman@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: chromium:1320588
Change-Id: Id160118146dad1b8f1af40c60ddefd717516cd1d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3614527
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
This reverts commit 1835e5d895.
Reason for revert: Breaks Skia integration in linkImpl.
Original change's description:
> Fix commit ID gathering on Android builds.
>
> Android infra does not store the .git directory alongside the
> checked out code, instead using a gitdir directive to point
> elsewhere. This caused the commit_id script to fail, which
> could cause issues with disk-backed program caches on updates
> when the serialization format changes.
>
> This CL also makes it a build failure to fail to get the commit id,
> and removes the ANGLE_DISABLE_PROGRAM_BINARY_LOAD fallback (which
> was broken anyway due to not being used anywhere).
>
> Bug: b/206109660
> Test: Run script on Android infra, verify hash is gathered properly.
> Change-Id: Ie28dc9278b6fbd3dd4f09232c0a88d602fca6980
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3604710
> Commit-Queue: Doug Horn <doughorn@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Bug: b/206109660
Change-Id: I64ac0831a46b9e1ff2e2738624650d67d0609f3c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3615009
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Auto-Submit: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Doug Horn <doughorn@google.com>
RendererVk::cleanupGarbage() should call pruneOrphanedBufferBlocks()
after clean up mSuballocationGarbage, so that we will be able to find
the orphaned buffer block being empty if mSuballocationGarbage actually
made it empty.
Bug: chromium:1318110
Change-Id: I0cc6e45c192f406e7bbb15c7427d30e06208dd06
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3611648
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Don't expose mTotalBufferToImageCopySize via API if it is unnecessary,
for better encapsulation.
Bug: angleproject:6354
Change-Id: If69a5a78cc40d54feee6f3474aef6292d60b89c5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3609016
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
This allows clients (ie Skia) to build ANGLE without needing
all of the additional Vulkan dependencies. Developer builds
will continue to include both the direct and SPIRV paths, for
debugging purposes.
Bug: angleproject:7155
Change-Id: I1c38ee19e747df8b25fd2f8e8efa3b420a4d7766
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3605764
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
On qualcomm, sometimes the output is ceil()ed instead of round()ed.
With ditering emulation affecting values, some dEQP tests fail due to
the excessive change in value when dithering bumps the value slightly
over to the next quantum.
In this change, a workaround is added to round() the value before
outputting it.
Bug: angleproject:6953
Change-Id: Iae7df5ca20055b4db3185c6153f3c0bf4ba07f68
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3611064
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Android infra does not store the .git directory alongside the
checked out code, instead using a gitdir directive to point
elsewhere. This caused the commit_id script to fail, which
could cause issues with disk-backed program caches on updates
when the serialization format changes.
This CL also makes it a build failure to fail to get the commit id,
and removes the ANGLE_DISABLE_PROGRAM_BINARY_LOAD fallback (which
was broken anyway due to not being used anywhere).
Bug: b/206109660
Test: Run script on Android infra, verify hash is gathered properly.
Change-Id: Ie28dc9278b6fbd3dd4f09232c0a88d602fca6980
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3604710
Commit-Queue: Doug Horn <doughorn@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
The smoke test (words_with_friends_2) typically takes only a few seconds
to run. Run it first to check that everything is working as intended. As
we know it's a short test, we can set a small timeout (60s) and fail
early in case something goes wrong. This will speed up tests failures
when something is completely broken.
I also changed the main shard run to crash when timeout is detected
instead of just dumping debug info as if the tests didn't finish in 10
minutes they're also unlikely to finish in the 20 minutes after which
swarming times out the shard.
Bug: angleproject:7242
Change-Id: Ia99ca4b2e1676d09b9ff7d67ab116aba94f66512
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3611446
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Macro ANGLE_TEST_ENABLE_RENDERDOC_CAPTURE was defined
only for files under src/libANGLE, however, we need to
use this Macro in filed under src/tests/. Move the Macro
config from BUILD.gn to src/tests/BUILD.gn.
Also add a new gn arg angle_enable_renderdoc
to control enable/disable the Macro.
Bug: angleproject:6072
Change-Id: I3879015e9bdfe2530012ea39729a31c47129ce4c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3609024
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
For single buffer surfaces, eglSwapBuffers serves two purposes:
- Switch to/from single buffer mode
- Implicitly issue a glFlush
Simultaneously, for single buffer surfaces, glFlush serves three
purposes:
- Submit the commands
- Call queue present (if necessary)
- Throttle the CPU
In this mode, ContextVk::flush() already redirects to the surface,
calling WindowSurfaceVk::swapImpl() which calls back to
ContextVk::flushImpl() (to submit the commands), calls queue present and
throttles the CPU.
If the application calls eglSwapBuffers(), the exact same thing happens
(i.e. WindowSurfaceVk::swapImpl() is called to the same effect).
Calling swapImpl() leads to an addition of the corresponding submit
serial to the "swap history". The CPU throttling code always throttles
the CPU to the serial of two swaps ago.
Unnecessary calls to eglSwapBuffers() (when there is no command to be
flushed) in single buffer mode would thus lead to the CPU throttled to
the end of the last submission, effectively turning into a glFinish().
In this change, eglSwapBuffers() in single buffer mode, when not
switching to/from this mode, is redirected to glFlush() as it's
functionally equivalent. Simultaneously, ContextVk now tracks whether
it has any pending commands for submission at all, and skips glFlush()
altogether if there are none. Together, this results in the unnecessary
eglSwapBuffers() to become no-op.
Bug: b/229908040
Change-Id: I0e3b4a8b7eb4f6b0e0ed22260644825fc67dd330
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3603841
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
If you specify `--fixed-test-time 30` while running app perftest and
watch for GPU memory allocation, you see GPU memory keeps growing. This
is due to we generate timestamp query for every frame, but don't
calculate the GPU time at the end of run. We accumulate all these
queries over the entire test run. Even though this is technically not a
leak, it does grow monotonically while test is running. This CL calls
computeGPUTime every 16 frames (steps) and changed the mTimestampQueries
to a queue structure and clean up the completed query as GPU time is
computed.
Bug: angleproject:7243
Change-Id: I283ee24c4835fe0fb4d15f8d1975c85b64e16443
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3609011
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
The code that checks forceCopySubImage could run
into integer overflow error for these values:
sourceArea.x + sourceArea.width
sourceArea.y + sourceArea.height
With gn arg is_ubsan=true, these two equations
lead to crash.
Add the code to check integer overflow
Bug: chromium:1314268
Bug: angleproject:5246
Change-Id: I6dee98457a44797ffb806ef8bd05f052c9aaa733
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3597713
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Missing result_skip results in tests missing from json.output in perf
CI builders. Not sure if the missing result_fail actually happens.
Bug: angleproject:6854
Change-Id: I0d70a93be0d595c45e23558345481e749ba128bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3606921
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
On AMD GPUs it's faster to copy a texture to a buffer
for read back than to read via a texture.
For reading from a normal texture 24-27ms -> 6-9ms
For reading from a IOSurface texture 17-20ms -> 7-10ms
Bug: angleproject:7117
Change-Id: I7c7f276a3121e87f5c52a1a4287d13203a6b1b37
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3584423
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Commit-Queue: Gregg Tavares <gman@chromium.org>
This is follow up from previous CL. For discrete GPU
(preferDeviceLocalMemoryHostVisible is disabled), we will get
HostVisible memory if any map can be created on it. For non discrete
GPU, this CL also adds the check if the buffer will never gets updated,
we just use DeviceLocal memory without HostVisible bit.
Bug: angleproject:7047
Change-Id: I73bdc133badbf01c098db23563b30898d4d16a41
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3602943
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Let's see if this helps us understand stuckness as described in
https://anglebug.com/6854#c46
Normally each instrumentation call takes way less than 10 minutes as we
run tests individually or in small batches. When stuck, runner times out
after 20 minutes.
Bug: angleproject:6854
Change-Id: I20074db0fb3e783555a530b9ecef3765f1911fd9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3605763
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Currently no timestamp is logged:
[I2022-04-25T18:45:14.761163Z 548 0 cmd_stream.go:336] {cmd}
INFO:root:adb --version ...
Before switching to android_helper relative timestamps in seconds
were printed, set up by catapult. Timestamps proposed in this CL are
more consistent with outer logging but keep prefix short. Example:
[I2022-04-25T18:45:14.761163Z 548 0 cmd_stream.go:336] {cmd}
I18:45:14.999999Z adb --version ...
Bug: angleproject:6854
Change-Id: I8ef7c9ae44eb5dba564a41456ce9417e3fe0f06c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3606913
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
While this introduces a render pass for drawing the overlay, it isolates
it from the rest of code associated with the implicit flush on swap and
relevant optimizations. This makes the overlay counters more accurate
when it comes to said optimizations.
Bug: angleproject:7084
Change-Id: I3298612923fe07139891a4252cd2a88de1783ee7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3602839
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This is one of two directories in Chromium where the warning triggers,
sink suppression flag so we can remove the global suppression.
Bug: chromium:1314867
Change-Id: Iffbd3f3f0caaf050c9a758eb4f968ff5a4f30dff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3602951
Auto-Submit: Arthur Eubanks <aeubanks@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Use switch constructs instead of if-else to allow reuse of code and
simplify addition of other platforms as new cases.
Bug: angleproject:6902
Change-Id: Ia941d0d7bc03538bbc8d96ebece60224994a6c66
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3532260
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Commit-Queue: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This is a reland of commit 50d008a7ef
Besides fixing the BlendStateExt color mask initialization bug,
the following changes were made:
* All fields were made private with accessor functions.
* A new assertion was added that ensures 64-bit storage for factors
and equations. This allowed dropping one redundant mask.
* Two new helper functions were added.
* BlendStateExt::mMaxDrawBuffers was renamed to mDrawBufferCount.
* The BlendStateExt class is now aligned to 8 bytes with an assertion.
* Expanded test coverage.
Also fixed incorrect usage of BlendStateExt fields in:
* StateManagerGL::syncBlendFromNativeContext
* StateManagerGL::restoreBlendNativeContext
Original change's description:
> Fix BlendStateExt::mMaxColorMask initialization
>
> This variable should not have its unused bits set.
>
> To avoid confusion with other masks of the same class,
> the variable was renamed to mAllColorMask.
>
> Bug: angleproject:7200
> Change-Id: I72542d49ff8da3dbb8d61c5034ce37c1e8fcc6e1
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3581990
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Bug: angleproject:7200
Change-Id: I87a5fe0f9dfbbf5e525b9120f772aa9adb39ce5f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3593234
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Add support for replacing flags:
--isolated-script-test-output
--isolated-script-test-perf-output
--render-test-output-dir
Always set --isolated-script-test-output to check for test failures
using num_failures_by_type, interrupted, is_unexpected fields.
Bug: angleproject:6854
Change-Id: Ia701f4d4d5d1adc9a24c057bb5c58fd5457cbd65
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3602834
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
This reverts commit e18240d136.
Reason for revert: Applications not responding in AOSP:
https://buganizer.corp.google.com/issues/229807074
Original change's description:
> Mark contexts as shared when importing EGL images.
>
> Once a context references an EGL image, it can share resources with
> contexts in other share groups. Marking the context as shared ensures
> that locks are held by all contexts referencing EGL images for GL
> functions.
>
> Bug: angleproject:6957
> Change-Id: Ic3901c458f388306c59f6bb01560a7c66d0574c0
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3424659
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: mohan maiya <m.maiya@samsung.com>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Test: CtsWindowManagerDeviceTestCases
Bug: b/229807074
Change-Id: I5b7050bd68f67925f77242e483e2aa970ed0ca17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3602954
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Commit-Queue: Lingfeng Yang <lfy@google.com>
To clarify further that they are not to be edited by hand.
Bug: angleproject:6435
Change-Id: Iaf79706d2b688a43b3ebb65700cfbdd71a49a742
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3603842
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Fix an issue where the observer is not removed when the
element array buffer is detached from the vertex array.
This fixes use-after-free vulnerability.
Bug: angleproject:7237
Change-Id: I7cf30322740edffccdba89d40c0d02cd351dad78
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3603007
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>