Makes it consistent with the other back-end types.
Bug: angleproject:5076
Change-Id: I7a54dd4a0a54e6dc05e257b7b2ac1ec21ceea700
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2420748
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
When adding a Resource to the ResourceUseList of ContextVk
we constructed a new SharedResourceUse object for tracking
and update of the Resource's Serial. We would then delete
it after releasing the resource. This incurs repeated
memory operation costs.
Instead we now allocate a pool of SharedResourceUse objects
and acquire and release from this pool as needed.
VTune profile of the Manhattan 30 offscreen benchmark
shows the CPU occupancy of bufferRead decrease from an
average of 0.9% -> 0.6% and imageRead decreases from
an average of 0.4% -> 0.3%. The bottleneck for both
these methods is the retain() method that leverages
the new SharedResourceUse pool.
Bug: angleproject:4950
Change-Id: Ib4f67c6f101d4b2de118014546e6cc14ad108703
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396597
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
The prior design didn't pass the correct flag to the subprocess.
Instead add a new --reuse-displays flag that forces display reuse
on in ANGLE tests. Pass the new flag to the child processes when
running with --bot-mode.
Bug: angleproject:3162
Change-Id: I5f62125d83d339b5e8b2506b4ca4656976f7398e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2419638
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Previously the runner was returning "1" on success and "0" on failure.
Swap this so that it correctly returns "0" on success and "1" on fail.
This only affected "--bot-mode" which isn't yet enabled.
Bug: angleproject:3162
Change-Id: I1ee942223272d24eff137279d5a0638d3a65694e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2419639
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Similarly to common test init, these specific tests init the Vulkan
resources with validation layers when they might not be available.
Fix this by checking for the appropriate define.
Bug: b/168744561
Change-Id: I93dd3bac839297ced07cb2c4cbbcf64db2e65a1f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2419041
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This patch series optimizes programs that use the pattern:
for (;;) {
glVertexAttribPointer(...)
glDraw(...)
}
Change 4: Inline ValidateProgramDrawStates.
A hotspot in most draw calls that change state.
In total the patch series reduces test iteration time by 25%. This
change reduces the listed "null" benchmark time from 295 -> 286 ns.
Test: DrawCallPerfBenchmark.Run/vulkan_null_attrib_change
Bug: angleproject:5045
Bug: b/168493024
Change-Id: I80959c9d06030709d7f4eba696e43614c33d5a8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2409176
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Update the .gn to remove forcing use_custom_libcxx = false. Instead, let
//build/config/c++/c++.gni determine the value, which should better
match Chromium.
In particular, this helps with Abseil integration by supporting Windows
component builds by better matching the contents of the .def files.
Bug: angleproject:4873
Test: CQ
Change-Id: If8c064f16459292bfb95113a4d78e14e8923f86f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2414739
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
This patch series optimizes programs that use the pattern:
for (;;) {
glVertexAttribPointer(...)
glDraw(...)
}
Change 3: Use FastUnorderedSet for RP XFB buffers.
Most of the time this list is empty. This speeds up the count check for
empty and non-empty sets considerably.
In total the patch series reduces test iteration time by 25%.
Test: DrawCallPerfBenchmark.Run/vulkan_attrib_change
Bug: angleproject:5045
Bug: b/168493024
Change-Id: Ia43eb11bdd62aa3bf425069b591f9318f519fd4c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2409175
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
We were using the incorrect test list to set up initial test
expectations. Fix this by using the already generated test set
in the test suite.
Test: angle_unittests with --bot-mode, sharding, and filter
Bug: angleproject:3162
Change-Id: Id108943494130410caab404faad25115792e794d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2419596
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This patch series optimizes programs that use the pattern:
for (;;) {
glVertexAttribPointer(...)
glDraw(...)
}
Change 2: Micro-optimize XFB resume CPU overhead.
We don't need to set resume on every new command buffer. We only need
to set the dirty bit when we have an unexpected pause.
In total the patch series reduces test iteration time by 25%.
Test: DrawCallPerfBenchmark.Run/vulkan_attrib_change
Bug: angleproject:5045
Bug: b/168493024
Change-Id: I8f6c68ff0513be4f405276e395d80bc1a185a061
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2409174
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
This patch series optimizes programs that use the pattern:
for (;;) {
glVertexAttribPointer(...)
glDraw(...)
}
Change 1: Don't null out pipeline on state change.
This allows us to use the transition table for reduced CPU overhead.
Note that we don't use a transition table for compute pipelines.
In total the patch series reduces test iteration time by 25%. This is
the most significant patch, reducing test time by 20%.
Test: DrawCallPerfBenchmark.Run/vulkan_attrib_change
Bug: angleproject:5045
Bug: b/168493024
Change-Id: I3823bb7d83bc2c66357fc5eb8f5dc3e4e54f6a17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2407340
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
These are additional tests that were written when trying to refactor
mContentDefined and move it from RenderTargetVk to ImageHelper for
depth/stencil attachments. We still want to land the tests.
Bug: b/167275320
Change-Id: I12f6bf8cece6499e4474a8f114b177626c1aa4d5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2419117
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
It's possible for multiple threads to touch mFenceRecycler so need to
protect it with a mutex to prevent race conditions.
Bug: b/168744476
Change-Id: I9898d2e9ebf0974581a1074cbda5be41a09cd790
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415401
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
This is necessary to run angle_end2end_tests with sanitizers. We
don't currently support building the VVL in sanitized configs.
Bug: b/168744561
Change-Id: If16a25ac5786f5f5aeb8ae50d9f7fa22c6c87995
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415513
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This function is more useful if it takes just the min filter mode
instead of the entire sampler struct to read a single member.
Bug: b/167404532
Change-Id: Ie8c01c4095a615f06fe046fb175cdfb92fa54cbf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2419111
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
The trace tests aren't strictly for performance. Since we'll be using
them for correctenss testing as well it makes sense to move them out
of the perf_tests/ folder.
Also renames RestrictedTraceTests.md to README.md so it'll load
automatically in gitiles.
Bug: angleproject:4090
Bug: b/168049670
Change-Id: I8be9f1d831489a9abf534d049a93441687850142
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2416913
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Was looking at the Chromium path instead of the ANGLE path.
Bug: skia:10572
Change-Id: I7f5dba011a5d446b8f1ef814f89421edfd0f7b95
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2418420
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
When vkCreateSwapchainKHR is called with a valid oldSwapchain, the
Android framework destroys the images in oldSwapchain. This is not
correct, as it should be deferred to the actual vkDestroySwapchainKHR
call performed later by ANGLE. This is because rendering to the
oldSwapchain could still be in progress.
While this issue affects all of Android, currently only ARM shows any
symptoms. A workaround is added for ARM to vkDeviceWaitIdle before
recreating the swapchain if oldSwapchain is valid.
Bug: angleproject:5061
Change-Id: I308e4798c6418d7891d880218b0ebcfd7a795643
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2416238
Reviewed-by: Sunny Sun <sunny.sun@arm.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Leveraging the fact that there are only a handful of depth/stencil
formats, the last element of RenderPassDesc::mAttachmentFormats can
contain other information in addition to the depth/stencil format ID.
The FormatID enum is rearranged such that depth/stencil formats are
placed first, as a result occupying values in [1, 7]. These values take
up 3 bits in an element of RenderPassDesc::mAttachmentFormats (which
could be the last element if all color draw buffers are attached).
As a result, the upper 5 bits of the last element of
RenderPassDesc::mAttachmentFormats is unused. It is intended for these
bits to be used in the implementation of multisampled-render-to-texture
depth/stencil renderbuffers.
Bug: angleproject:4836
Change-Id: I0786e0712539cdbbf5494ec83aeee1dd93f936dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2413165
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Expose the "debug" mutex so insertPerfWarning can use it.
This was detected using TSAN and MultithreadingTest.
Bug: b/168744561
Change-Id: Idde95a7b217f21f007893192a4a1f0a69b4ed3a9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415184
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Use a mutex to guard against the object init. The accesses to the
cache internals are internally synchronized. There is a Vulkan ext
that allows for external cache synchronization that we could
investigate at some point.
Detected by looking at MultithreadingTest with TSAN enabled.
Bug: b/168744561
Change-Id: I1d4744e1aa970bcd57cac49f7ecaf8c238ea61c2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415183
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
We introduce a new Display Global Mutex in egl::Display that
can guard access to gActiveCompilers in Compiler.cpp.
Was detected by running MultithreadingTest against TSAN.
Bug: b/168744561
Change-Id: I97866b60a173f60899cd0406fe0f71000035c0cf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415181
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Currently, ANGLE calls vkAcquireNextImageKHR() immediately after
calling vkQueuePresentKHR(), which can cause the process to stall
(even with multi-threading). Delay it until it is absoluately needed.
Test: angle_end2end_tests --gtest_filter=*EGLPreRotationSurfaceTest*/*
Test: angle_white_box_tests --gtest_filter=VulkanPerformanceCounterTest.*Invalidate*/*
Test: angle_deqp_egl_tests --gtest_filter=dEQP.EGL/functional_query_context_get_current_display_rgba8888_window* --use-angle=vulkan
Test: angle_perftests --gtest_filter=GenerateMipmapBenchmark.Run/vulkan_webgl
Bug: angleproject:5064
Bug: b/162082698
Change-Id: I466df9237136dd59a9556faa8cf2dbad94e076fe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2399509
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
Color renderbuffers are similar to multisampled-render-to-texture
textures, but much simpler. The same mechanism is used to implement
them.
Bug: angleproject:4836
Change-Id: I298529c9fd1b03e78b1e37cdbe595e66166ee130
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2412847
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
This also isolates headers for D3D9 / D3D11 from each other.
Bug: angleproject:3943
Change-Id: I04edbe7db68461ae4fc78ac7f9c22451debcb768
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2405807
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This EGL extension will add support for creating EGLClientBuffer
backed by an Android window buffer (struct ANativeWindowBuffer)
which can be later used to create an EGLImage.
Bug: angleproject:5018
Tests: angle_end2end_tests --gtest_filter=ImageTest.SourceNativeClientBufferTarget*
Change-Id: If78ed7b80ad09629b8c5f5b5a0eb07a548e82e6e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404320
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
The parameter linkedShaderStages is passed to
GlslangGetShaderSpirvCode(), but is unused. This CL uses the parameter,
rather than gl::AllShaderTypes().
This CL also removes the unused parameter variableInfoMap from the call
chain.
Bug: angleproject:3570
Change-Id: Ic60084e87cb2aa2a245e3e963598851331379e89
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2412364
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>