RAW hazards were being tested for if the layouts were identical, but
that's impossible.
Bug: angleproject:4911
Change-Id: I73f568b1df2cbffe943217e19b115561e48a56c9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2370862
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Add FastIntegerSet container to enable fast contains operation
for a set of integer keys. The class uses a BitSet vector to
achieve performance.
Add FastIntegerMap container to improve buffer serial
tracking performance. FastIntegerMap uses FastIntegerSet container
to track buffer serial keys. It also provides an ensureCapacity
method to reserve space, for the expected buffer count, upfront.
CommandBufferHelper::mUsedBuffers and ContextVk::descriptorSetCache
are now FastIntegerMap
CommandBufferHelper::mRenderPassUsedImages is now a FastIntegerSet
Based on a CL by Jamie
Bug: angleproject:4950
Test: angle_unittests.exe --gtest_filter=FastInteger*
Change-Id: Ib58be20143f588baab99acadac796f2435f72d54
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2369466
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Checking sampler completeness after every sampler related
state change is inefficient. Defer sampler completeness
check to draw time.
Based on a CL by hckim.kim@samsung.com.
Bug: angleproject:4765
Tests: angle_perftests.exe --gtest_filter=TexturesBenchmark.*
Change-Id: I7e971371e40b3044ca3d5ca39bfe7fc600620c3e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2268577
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
The GN test() template now generates bin/run_ wrappers for
targets; this CL ensures that they'll properly declare when
the wrappers need to use Xvfb on Linux.
Bug: chromium:816629
Change-Id: I4f227eab3306f737f77bbe3341039d710184db96
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2370337
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
GL_OES_texture_3D requires support for 3D textures at both API and GLSL
levels.
D3D11 back-end doesn't handle GLSL's added functions (texture3D*)
properly. See TextureFunctionHLSL::useTextureFunction()
(TextureFunctionHLSL.cpp:1475)
Bug: angleproject:4926
Change-Id: Icd669b070c68ec04f5de790d5a531912f5b42d98
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336132
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
ImageHelper::copyImageDataToBuffer() is called from glCopyTexture*. It
allocate staging buffer and write the copy command into command buffer
right away. This uses context staging buffer instead of ImageHelper's
staging buffer. This has the benefit of able to share staging buffer
with other objects (including buffers etc).
Bug: b/164511310
Change-Id: I3f680b1cd95df172a442aac573a8cc8d48972b1b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2364717
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This CL does the following:
* Skip calls from KHR_debug and EXT_debug_marker
* Update an assert in setDeletedBuffer
* Warn when capturing an invalid call
Test: Capture first 2000 frames of PUBG:Mobile
Bug: b/165824228
Bug: angleproject:4048
Change-Id: Ib7fa616a1b5c8ed7c83daaaf0779b41acd31a7f0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2366828
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
We now we detect feedback loops by tracking the Framebuffers that the
Texture is bound to. We still have the old tracking method that counts
sampler and image bindings in the code as well.
This CL removes the old front-end tracking for feedback loops. It's no
longer used by any back-ends. This removal should reduce CPU overhead
around Texture and Program binding changes. Reverts the image binding
tracking to the simpler scheme that tracks if a Texture has ever been
bound as an Image. This should practically have little or no perf
effect and we can reinstate some simpler tracking in the future if
required.
Bug: angleproject:4500
Bug: angleproject:4959
Change-Id: Idc625d6e4c519919f97a4dc72dd9c35d262706fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2363210
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Initially, FramebufferVk::invalidateImpl() was very conservative and
always ended a render pass (if the framebuffer is part of the current
render pass). This adversely affects PUBG Mobile, which invalidates
the depth buffer every frame, causing the render pass to be split.
Test: PUBG MOBILE on Android
Test: angle_white_box_tests --gtest_filter=VulkanPerformanceCounterTest.InvalidatingAndUsingDepthDoesNotBreakRenderPass/*
Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_fbo_invalidate_* --use-angle=vulkan
Bug: b/163854287
Change-Id: I343dee1db3ebaf039ff92557f9ef25b24bcdcc93
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2352627
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
Front-end detection still in place and will be removed in a follow-up.
Removes the Vulkan feature and the special clear handling.
Bug: angleproject:4959
Change-Id: I5d44c3f7dbdb49d8aa0375f54b7148df09732ba2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2363208
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Rename only to keep it consistency.
Bug: b/164511310
Change-Id: I7b00c48010b76bff0b292e6e75b9aff154cdecc0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2364727
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
We can combine an initial RenderPass with a read-only RP if the first
RP never writes to depth. We can check the depth-write tracking in
CommandBufferHelper and substitute in a new Framebuffer/RP Desc in this
case as well as issue new layout barriers. We need to disable barrier
merging in this special case.
This reduces the RenderPass count in the Manhattan trace from 15->13.
The performance on the Pixel 4 benchmark goes to ~82% of native for
the on-screen version and ~88% for off-screen. There's also a ~5% bump
in speed for the desktop trace.
Bug: angleproject:4959
Change-Id: I70241824f75eaa1e11b50370f826abc36e91686e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2358772
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
This uses context's staging buffer for immutable texture
TextureVk::setSubImageImpl call and flushes update right away.
Bug: b/164511310
Change-Id: I04fee0a9afe0e84617a461fb6cd7137e853adf8b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2357971
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Instead of always switching the Framebuffer to mask out depth/stencil
loops we now switch the RenderPass to a "read-only" depth/stencil mode.
Reduces the RenderPass count in Manhattan from 18->15. There are still
a couple extra RenderPasses inserted that we can get rid. We can merge
a few RenderPasses by retroactively changing a started RenderPass to
"read-only" when there are no prior recorded depth writes or clears.
Also adds a test to count the number of RenderPasses ANGLE generates in
DS feedback loop situaions.
Bug: angleproject:4959
Change-Id: I1855a45959655fc27ccd47a3469c1c672fc8fd9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2357973
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
If a user is performing a blit to resolve a multisample color buffer
into a single attachment, ANGLE can use subpass resolve attachments to
resolve directly into the destination buffer as part of the render pass.
This allows the data to remain in tiler memory and reduce the extra
bandwidth required to write the multisampled data back to perform the
copy.
This work also requires restoring/reopening a render pass if it has been
finished already, assuming the finished render pass was started and for
the framebuffer that is the source for the blit command. Other objects
that were created when the render pass was started need to be updated as
well, such as the source FramebufferVk's resolve attachment, the
CommandBufferHelper's vk::Framebuffer and vk::RenderPassDesc, etc.
While this is better than performing vkCmdResolveImage(), there is still
another major part of optimizing MSAA using resolve attachments not
implemented here: discarding the multisampled image rather than writing
it to GMEM, which requires the user to invalidate the read FBO after the
blit.
This CL was verified with AGI to make sure there are no explicit blits
to resolve the multiple sampled image.
Bug: b/159903491
Test: FramebufferTest_ES31.*Blit*
Test: VulkanPerformanceCounterTest_ES31.MultisampleResolveWithBlit
Change-Id: I320a26088d8f614a295e7feec275d71310391806
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2298663
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Re-land fixes the crash when drawing with no bound Program executable.
Currently we track feedback loops by counting the times a Texture is
bound as a sampler or image in a particular context. This is a bit
tricky because Texture bindings change frequently. Relative to the
number of times we need to check for a feedback loop this causes excess
overhead.
Usually Framebuffers have a low number of Textures bound (in many cases
just 1). And Textures aren't usually bound to many different FBOs. So
instead of counting the number of times a Texture is bound as a sampler
or image we will track the Framebuffers that the Texture is bound to.
This CL adds a small vector class to gl::Texture which tracks all the
Framebufer Serials of its bound Framebuffers. We can use this set to
quickly check if there's any potential feedback loop between the a FBO
and this Texture.
We also update the feedback loop check to use this new method. We will
be able to remove the old counting method when we switch the Vulkan
feedback loop handling to use the new tracking in this CL.
Bug: angleproject:4500
Bug: angleproject:4959
Change-Id: If2bd25b08298a99f5e64b4055137f9154b0f0860
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2365595
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The cfi bot is throwing 3 different errors with ANGLE when using
the Vulkan backend:
- ChoosePhysicalDevice causes a "function with wrong dynamic type"
error when using vkGetPhysicalDeviceProperties
- In volk.c, using vkGetInstanceProcAddr and vkGetDeviceProcAddr
also causes a "function with wrong dynamic type" error
- In vk_mem_alloc.h, included from vk_mem_alloc_wrapper.cpp,
GetAllocationCallbacks() causes a "unrelated cast" error
This cl silences all 3 cfi errors.
Bug: chromium:1116053
Change-Id: I864ec8d9e2acaec493f472e01b3987dcc641c58f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2363209
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
roll_chromium_deps.py didn't handle properly rolling recursedeps for
these 2 repos, only rolling the top level repo but not internal.
Temporarily disable rolling these 2 repos in roll_chromium_deps.py and
roll them properly to the latest revision used by Chrome.
Change log:
e3c3f879ee..c20c5a3085f2fb48c3b3..4fe018038fec647b85b6..30a6ac108e
No change to
645250b669
Bug: angleproject:4973
Change-Id: Ie164c5b1adb8684b875f1be4924b295033e2fb4a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2365023
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This reverts commit 699bcde0b7.
Reason for revert: Breaking GLES2WebGLDecoderPassthroughTest.DrawArraysInstancedANGLEEnablement. Here is a sample build : https://ci.chromium.org/p/chromium/builders/ci/Win10%20FYI%20x64%20Release%20%28NVIDIA%29/4240
Original change's description:
> Feedback Loop Redesign 2/3: Track bound FBOs in Texture.
>
> Currently we track feedback loops by counting the times a Texture is
> bound as a sampler or image in a particular context. This is a bit
> tricky because Texture bindings change frequently. Relative to the
> number of times we need to check for a feedback loop this causes excess
> overhead.
>
> Usually Framebuffers have a low number of Textures bound (in many cases
> just 1). And Textures aren't usually bound to many different FBOs. So
> instead of counting the number of times a Texture is bound as a sampler
> or image we will track the Framebuffers that the Texture is bound to.
>
> This CL adds a small vector class to gl::Texture which tracks all the
> Framebufer Serials of its bound Framebuffers. We can use this set to
> quickly check if there's any potential feedback loop between the a FBO
> and this Texture.
>
> We also update the feedback loop check to use this new method. We will
> be able to remove the old counting method when we switch the Vulkan
> feedback loop handling to use the new tracking in this CL.
>
> Bug: angleproject:4500
> Bug: angleproject:4959
> Change-Id: I84a2f0ed8480d1da63d5879e0e56a8be4af4e735
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2358850
> Reviewed-by: Tobin Ehlis <tobine@google.com>
> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
TBR=tobine@google.com,courtneygo@google.com,jonahr@google.com,jmadill@chromium.org
Change-Id: Ica795036895652add37ac8ed319031f9d5a321ac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:4500
Bug: angleproject:4959
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2365077
Reviewed-by: Khushal <khushalsagar@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Add --autoroll option which expects an existing git commit by the
autoroller, which updates chromium_revision.
roll_chromium_deps.py then updates other ANGLE dependencies to the
revision of their Chromium counterparts and amends autoroller's commit.
Bug: skia:10572
Change-Id: Iddb9296bd1470f4a2113563c5ed3a1c27e16f128
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2363212
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Don't assume support for VK_KHR_bind_memory2,
enable the extension, if supported, during device creation.
Also initialize all required extension functions for the
memory allocator.
Bug: angleproject:4966
Change-Id: I878939fb3324723675a2b7dec18ab453b2a9fc77
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2359529
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Can be useful for debugging logging.
Bug: angleproject:4959
Change-Id: I4bdb72b4c07979fecc2af0ca2a2b2e7cdab36b9f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2360902
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
This generalizes the read tracking into read/write. Knowing the write
access can let us determine if we can switch a RenderPass to a read-
only mode. And switching to read-only will let us combine some
RenderPasses in Manhattan.
Bug: angleproject:4959
Change-Id: Ic97547e84fef4a2670437677000d4525006ef69f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2358771
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>