|
d77e85a8
|
2020-11-03T22:23:18
|
|
Vulkan: Store image updates per level
This optimization allows iterating only over updates of a certain level
or range of levels, instead of having to iterate over every update and
filter out the ones matching the desired level(s).
Bug: angleproject:4891
Change-Id: Ied04f4b28f05d37b9add61c7f4d54cc328c0be86
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519095
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1e494cae
|
2020-10-07T19:26:01
|
|
Vulkan: Add support for EXT_copy_image
Add support for GL_EXT_copy_image which allows
image data transfer between image objects.
This is implemented by using the vkCmdCopyImage
API call.
Bug: angleproject:3593
Test: dEQP-GLES31.functional.copy_image.*
Change-Id: I30a34a8711b5d2e5834064d7453e03d6ec0df478
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2393955
Commit-Queue: Brandon Schade <b.schade@samsung.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a0e91016
|
2020-10-30T10:01:36
|
|
Vulkan: Don't break the render pass on scissor change
Prior to this change, the render area was decided when the render pass
was started, and remained fixed. If a small scissor was initially used,
this created a render pass with a small area. If then the scissor
region was expanded, the render pass was broken.
This change instead expands the render area on scissor change to avoid
breaking the render pass. If glInvalidateSubFramebuffer previously
successfully resulted in storeOp=DONT_CARE, this optimization may need
to undo that. As a result, the invalidate area is stored in the render
pass and if the render area grows beyond that, invalidate is undone.
Bug: angleproject:4988
Change-Id: I4e8039dec53a95a193a97cb40db3f71e397568d6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2508983
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
4989667a
|
2020-11-03T16:28:37
|
|
Vulkan: Make ImageHelper::flushStagedUpdates take gl::LevelIndex
More consistent with the rest of the public functions in this class.
Bug: angleproject:4891
Change-Id: I72c7c3d21f8287cc1711772671c6e7ad524fd096
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2518179
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
019e3f77
|
2020-11-02T17:20:19
|
|
Vulkan: Use dst access masks to determine if barrier is needed
Src access mask may be 0 with WAR barriers.
Bug: angleproject:5290
Change-Id: I798d4c36aa7d3d14db333a7e86794e13c8137f96
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2514841
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
3fcf17e6
|
2020-11-02T12:51:35
|
|
Vulkan: Bug fix in sRGBDecode logic
When a sampler's GL_TEXTURE_SRGB_DECODE_EXT state
was toggled between GL_DECODE_EXT and GL_SKIP_DECODE_EXT
VkImageViews of the TextureVk object were not being updated.
Add sRGB_decode state as part of ImageViewSubresourceSerial
so we retrieve the correct VkImageView from the texture cache.
Bug: angleproject:3609
Tests: angle_end2end_tests
--gtest_filter=SRGBTextureTestES3.SRGBDecodeSamplerParameterToggle*Vulkan
Change-Id: I897e461957d408b5a5b4f03fefc05f2e9684c7b7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2514900
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
97843bda
|
2020-10-30T17:03:36
|
|
Vulkan: Fix EGL Surface robust init.
The error here was related to using a single cache variable for the
robust init setting for all the surfaces in a DisplayVk. Fix this by
passing down the robust init setting from the SurfaceVk to image init.
Bug: angleproject:5274
Change-Id: I9bc9c20990268d1d5166411fb53f8f2593fd1971
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2510694
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
fcd35965
|
2020-09-29T14:15:51
|
|
Vulkan: Make DescriptorPoolHelper a Resource
Descriptor pools need to live as long as the descriptor sets that are
allocated from them. Using Serials while building a command to judge a
pool's lifetime is prone to errors, since a command's Serial value
isn't known until the command is submitted, leading to deleting pools
too early relative to when the descriptor set is actually used.
This CL updates DescriptorPoolHelper to inherit from Resource, so the
descriptor pools can be retain()'ed. This allows the Resource's counter
to indicate that a pool is in use until the command's Serial is known
and can be recorded to indicate when the command completes. This
prevents descriptor pools from being destroyed before the command
completes (while the descriptor sets are still in use), or even before
the command has been submitted. Destroying a descriptor pool resets all
of the descriptors that were allocated from it, which can trigger a
variety of VVL errors depending on when it's erroneously performed.
This CL also adds the necessary retain() calls for the descriptor pools.
In particular, the pools need to be retained each time a cached
descriptor set that was allocated from it is re-used. This is relatively
simple with the current design, since we always clear the descriptor set
caches whenever a new pool is allocated, so the descriptor pool binding
is always accurate.
Bug: angleproject:5030
Test: VulkanMultithreadingTest::MultiContextDrawSmallDescriptorPools()
Change-Id: Iac9e7efef338f169a6bf8ac3b2140e03dd326641
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2504457
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
9e3eec54
|
2020-10-25T15:44:09
|
|
Revert "Vulkan: Make DescriptorPoolHelper a Resource"
This reverts commit 5dcd29a6e532e4bd617af8767d488120b57f3b2c.
Reason for revert: Breaking the ANGLE -> Chromium roller:
https://chromium-review.googlesource.com/c/chromium/src/+/2496281
Original change's description:
> Vulkan: Make DescriptorPoolHelper a Resource
>
> Descriptor pools need to live as long as the descriptor sets that are
> allocated from them. Using Serials while building a command to judge a
> pool's lifetime is prone to errors, since a command's Serial value
> isn't known until the command is submitted, leading to deleting pools
> too early relative to when the descriptor set is actually used.
>
> This CL updates DescriptorPoolHelper to inherit from Resource, so the
> descriptor pools can be retain()'ed. This allows the Resource's counter
> to indicate that a pool is in use until the command's Serial is known
> and can be recorded to indicate when the command completes. This
> prevents descriptor pools from being destroyed before the command
> completes (while the descriptor sets are still in use), or even before
> the command has been submitted. Destroying a descriptor pool resets all
> of the descriptors that were allocated from it, which can trigger a
> variety of VVL errors depending on when it's erroneously performed.
>
> This CL also adds the necessary retain() calls for the descriptor pools.
> In particular, the pools need to be retained each time a cached
> descriptor set that was allocated from it is re-used. This is relatively
> simple with the current design, since we always clear the descriptor set
> caches whenever a new pool is allocated, so the descriptor pool binding
> is always accurate.
>
> Bug: angleproject:5030
> Test: MultithreadingTest::MultiContextDrawSmallDescriptorPools()
> Change-Id: I5fdeeb46159448dfd679d7169e423048348be5ab
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437609
> Commit-Queue: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
TBR=courtneygo@google.com,timvp@google.com,jmadill@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:5030
Change-Id: I0fd6d9a0e1b0989b22368ef98652281288699deb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2497222
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
33e30205
|
2020-10-17T19:03:45
|
|
Vulkan: sRGB cleanups.
A few fixes to how we check for the sRGB override in the
TextureVk class. In at least one instance there was a potential
edge case where in syncState we might not create the Texture
with the mutable bit the second time through the function.
Bug: angleproject:5176
Change-Id: I4f1ca6e469b10514c3a0de3120be9ade62568084
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2482292
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
5dcd29a6
|
2020-09-29T14:15:51
|
|
Vulkan: Make DescriptorPoolHelper a Resource
Descriptor pools need to live as long as the descriptor sets that are
allocated from them. Using Serials while building a command to judge a
pool's lifetime is prone to errors, since a command's Serial value
isn't known until the command is submitted, leading to deleting pools
too early relative to when the descriptor set is actually used.
This CL updates DescriptorPoolHelper to inherit from Resource, so the
descriptor pools can be retain()'ed. This allows the Resource's counter
to indicate that a pool is in use until the command's Serial is known
and can be recorded to indicate when the command completes. This
prevents descriptor pools from being destroyed before the command
completes (while the descriptor sets are still in use), or even before
the command has been submitted. Destroying a descriptor pool resets all
of the descriptors that were allocated from it, which can trigger a
variety of VVL errors depending on when it's erroneously performed.
This CL also adds the necessary retain() calls for the descriptor pools.
In particular, the pools need to be retained each time a cached
descriptor set that was allocated from it is re-used. This is relatively
simple with the current design, since we always clear the descriptor set
caches whenever a new pool is allocated, so the descriptor pool binding
is always accurate.
Bug: angleproject:5030
Test: MultithreadingTest::MultiContextDrawSmallDescriptorPools()
Change-Id: I5fdeeb46159448dfd679d7169e423048348be5ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437609
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
ed876984
|
2020-10-03T11:00:36
|
|
Vulkan: functionally complete worker thread
Working on enhancing worker thread to completely own primary command
buffers. This will include not only processing SCBs from main thread
into a primary, but also submitting those command buffers to the queue.
The CommandProcessor is a vk::Context so it can handle errors in the
worker thread. When the main thread submits tasks to the worker
thread it also syncs any outstanding errors from the worker.
Include asynchronousCommandProcessing feature that will control
whether the worker thread task does it's work in parallel or not. If
false, we wait for the thread to complete it's work before letting the
main thread continue. If true, the thread can execute in parallel with
the main thread.
Bug: b/154030730
Bug: b/161912801
Change-Id: I00f8f013d6cbb2af12a172c4f7927855db2f0ebf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2328992
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2072ce50
|
2020-10-18T16:44:09
|
|
Rename "NonLinear" to "SRGB".
In OpenGL parlance there are really only two color spaces:
Linear and SRGB. Vulkan is much more complicated with linear and
nonlinear SRGB, and multiple non-SRGB linear color spaces. Keep
things simple by working with OpenGL nomenclature.
Bug: angleproject:5176
Change-Id: Ia730a9a666a2b3325194b86dc588e7fd226c4183
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2483466
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
7bbe497a
|
2020-10-16T14:46:45
|
|
Vulkan: Implement EXT_texture_sRGB_decode
Implement EXT_texture_sRGB_decode. This builds on the existing
functionality from EXT_texture_sRGB_override, with 2 major edge
cases:
1. sRGB_decode allows the texture state to be overridden by
sampler state, which is implemented by forcing a a texture state
sync during updateActiveTextures if a texture is bound to the same
unit as a sampler with that state
2. texelFetch calls require us to reenable decoding, regardless
of decode state. We add a new compiler pass
(FlagSamplersWithTexelFetch) to mark samplers that are used with
texelFetch in order to support this.
This change also re-enables EXT_texture_sRGB_R8, which was disabled
due to a dEQP bug that this change will bypass.
Bug: angleproject:3609
Bug: angleproject:4503
Test: dEQP.GLES31/functional_srgb_texture_decode_skip_decode_*
Test: GLES31/functional_state_query_texture_*_srgb_decode_*
Test: GLES31/functional_state_query_sampler_*_srgb_decode_*
Test: GLES31/functional_debug_negative_coverage_*_srgb_decode_*
Test: GLES31/functional_android_extension_pack_extensions_ext_texture_srgb_decode
Test: angle_end2end_tests --gtest_filter=SRGBTextureTest.*Vulkan*
Change-Id: I4a67e487dc82e2f57c8c87d4bcd8ef442b6fe220
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2359481
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
f51e99fb
|
2020-10-13T11:38:28
|
|
Vulkan: Remove serial from RenderPassHelper
We don't delete RenderPass's so no need to keep a serial.
This simplifies things for coming threading code.
Bug: b/169788986
Change-Id: I2577b17bc1f6af163725389589d7cd62d09eea13
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2468538
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
df6b7298
|
2020-10-12T13:39:09
|
|
Vulkan: Use StoreOp_None_QCOM for read only depth stencil buffer
For read only depth stencil buffers, there is no need to store depth or
stencil value. But we can not use DontCare for storeOp because vulkan
core spec says DontCare indicates data is undefined after this.
VK_QCOM_render_pass_store_ops extension introduces a new store op that
will leave data defined but skip the store. This CL utilize this if the
extension is available.
Bug: angleproject:5055
Change-Id: I104f3d01eb342a2d0cc900f342430e901bde1bff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462604
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
68bd685a
|
2020-10-10T22:58:41
|
|
Reland: "4 Vulkan content defined CLs."
Reland "Vulkan: Avoid content restore by detecting no-op stencil"
This relands commit 243d0f899e443cd931c78aba7489382dff79edbb.
Reland "Vulkan: Restore at the end of RP if write-after-invalidate"
This relands commit e5d52ac3b9a00656acdd912ee8cd62dd14784075.
Reland "Vulkan: Invalidate/restore depth/stencil separately."
This relands commit 61fa0878964a796f6d3b3c13bc3a3849403ecdbd.
Reland "Vulkan: Move content-defined tracking to ImageHelper"
This relands commit 2392e6b34c0ddfbfd7b4c3cb67323ba463e11a57.
Reason for revert: Caused crashes in Fuchsia x64 and on ARM.
Reland fixes content defined for external images.
Original CL message:
Content-defined tracking was done in render targets prior to this
change. This had multiple drawbacks:
- When a framebuffer attachment is changed (including the first time
it's set), it's unknown whether the contents of the attachment is
defined.
- Invalidate takes effect at the end of render pass, at which point the
render target objects may be gone. Attachment ImageHelpers are
however correctly tracked.
This change moves content-defined tracking to the ImageHelper itself,
and tracks it per subresource. ImageHelper::onWrite() now receives the
subresource that is being written, and marks it as having defined
content.
A future optimization can make use of this change to
ImageHelper::onWrite to track "dirty" subresources. This can lead to
the removal of unnecessary barriers when same-kind writes are done on
different subresources of the image. See http://anglebug.com/3347#c15
Bug: b/167275320
Bug: angleproject:4836
Bug: angleproject:5159
Change-Id: If5c1ae7152657fd7c94db7d55bea4fb9ddf835ba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2464825
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d6b1c17b
|
2020-10-10T14:29:15
|
|
Revert 4 Vulkan content defined CLs.
Revert "Vulkan: Avoid content restore by detecting no-op stencil"
This reverts commit 243d0f899e443cd931c78aba7489382dff79edbb.
Revert "Vulkan: Restore at the end of RP if write-after-invalidate"
This reverts commit e5d52ac3b9a00656acdd912ee8cd62dd14784075.
Revert "Vulkan: Invalidate/restore depth/stencil separately."
This reverts commit 61fa0878964a796f6d3b3c13bc3a3849403ecdbd.
Revert "Vulkan: Move content-defined tracking to ImageHelper"
This reverts commit 2392e6b34c0ddfbfd7b4c3cb67323ba463e11a57.
Causes crashes in Fuchsia x64 and on ARM.
Original CL message:
Content-defined tracking was done in render targets prior to this
change. This had multiple drawbacks:
- When a framebuffer attachment is changed (including the first time
it's set), it's unknown whether the contents of the attachment is
defined.
- Invalidate takes effect at the end of render pass, at which point the
render target objects may be gone. Attachment ImageHelpers are
however correctly tracked.
This change moves content-defined tracking to the ImageHelper itself,
and tracks it per subresource. ImageHelper::onWrite() now receives the
subresource that is being written, and marks it as having defined
content.
A future optimization can make use of this change to
ImageHelper::onWrite to track "dirty" subresources. This can lead to
the removal of unnecessary barriers when same-kind writes are done on
different subresources of the image. See http://anglebug.com/3347#c15
Bug: b/167275320
Bug: angleproject:4836
Bug: angleproject:5159
Change-Id: I93d9dfe973caa7ce70aefa46b5b7d04a8637efb3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2464822
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
243d0f89
|
2020-10-08T21:54:45
|
|
Vulkan: Avoid content restore by detecting no-op stencil
Previously, as long as stencil was enabled, it was considered that it is
also being modified. This caused stencil invalidate to be undone in a
number of situations, such as:
- glEnable(GL_STENCIL_TEST); // with func/ops default
- glDrawArrays();
- glInvalidateFramebuffer([GL_STENCIL_ATTACHMENT]);
- glClear(GL_DEPTH_BUFFER_BIT);
- Close render pass
In the above scenario, invalidation of stencil was undone at the end of
render pass.
In this change, the following cases are considered read-only stencil:
- Func = GL_NEVER, stencilFail = GL_KEEP
- Func = GL_ALWAYS, stencilPassDepth* = GL_KEEP
- stencilFail = GL_KEEP, stencilPassDepth* = GL_KEEP
Note that while the above scenario is fixed for no-op stencil, a similar
issue persists if stencil was not no-op. The reason stencil invalidate
is undone in that case is due to the fact that it's assumed any command
after the invalidate call will be a draw call that outputs to stencil,
but that is not the case with the glClear call in this example.
Bug: angleproject:4836
Change-Id: Ie2ea2d52b7c8ee2394f5456773a7ef434e2b2b16
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2461465
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
e5d52ac3
|
2020-10-08T14:26:22
|
|
Vulkan: Restore at the end of RP if write-after-invalidate
If a depth/stencil attachment is invalidated, but subsequently drawn to
in the same render pass, undo the invalidate when the render pass is
closed. Adapted from
https://chromium-review.googlesource.com/c/angle/angle/+/2386478.
Bug: b/167275320
Bug: angleproject:4836
Change-Id: I17a35bfd692ddc403ceaa6ec44b5c4f16ff9eed6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2461464
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
5081f89b
|
2020-10-02T01:15:37
|
|
Vulkan: Support invalidate of MSRTT attachments
Invalidate was previously affecting only the storeOp of the color and
depth/stencil attachments. With multisampled-render-to-texture
attachments, the storeOp of the resolve attachments were not being
affected.
This change implements the latter, attempting to remove the attachment
altogether if possible. With MSRTT depth/stencil buffers, this makes
possible the ability to never write depth/stencil data to memory.
Bug: angleproject:4836
Change-Id: I53599e2f4ed6c390dfd03bf226274f6f53f438bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437506
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2392e6b3
|
2020-10-07T23:59:43
|
|
Vulkan: Move content-defined tracking to ImageHelper
Content-defined tracking was done in render targets prior to this
change. This had multiple drawbacks:
- When a framebuffer attachment is changed (including the first time
it's set), it's unknown whether the contents of the attachment is
defined.
- Invalidate takes effect at the end of render pass, at which point the
render target objects may be gone. Attachment ImageHelpers are
however correctly tracked.
This change moves content-defined tracking to the ImageHelper itself,
and tracks it per subresource. ImageHelper::onWrite() now receives the
subresource that is being written, and marks it as having defined
content.
A future optimization can make use of this change to
ImageHelper::onWrite to track "dirty" subresources. This can lead to
the removal of unnecessary barriers when same-kind writes are done on
different subresources of the image. See http://anglebug.com/3347#c15
Bug: b/167275320
Bug: angleproject:4836
Change-Id: Iabd1dace4eae9eb379453a9eb7ec6eafc9db1aef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462036
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
887b1346
|
2020-10-02T01:12:01
|
|
Vulkan: Add resolve/unresolve counters
With this change, render-pass-related counters are calculated at render
pass creation time and stored alongside the render pass handle (and
serial) in the render pass cache. On every use, the render pass'
counters are accumulated over the global counters.
Additionally, this change adds MSRTT resolve and unresolve counters to
render pass counters.
Bug: angleproject:4836
Change-Id: If15a789e5a7d66c7ea5a2315bc76fe045ce57491
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444099
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
77e3d0ae
|
2020-09-25T14:12:04
|
|
Vulkan: Defer the depthStencil buffer layout change to endRenderPass
Depth stencil layout may change while we build the render pass,
depending on the read/write access been made. Right now we are always
inserting a layout change barrier at the start of render pass. Later on
when the read/write property changes, we insert another layout change
barrier. Similarly, we maintain the attachmentOps and
RenderPassDesc::mPackedColorAttachmentRangeAndDSAccess as we changes
read/write access. This makes code quite commplicated. This CL moves
mReadOnlyDepthStencilMode from FramebufferVK to CommandBufferHelper
object and we only maintain that boolean while we updating the
read/write access. Then at the end of render pass or when depthStencil
image is deleted, we update attachmentOps and mRenderPassDesc and layout
transition all at once and only done once. This simplifies the read only
depth stencil mode implementation a lot.
Bug: b/168953278
Change-Id: Ie263b4526c82a9858e5d1f141ea58f499187a3ca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2432075
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
86ca5d2b
|
2020-10-01T11:56:05
|
|
Vulkan: Add plumbing to render pass when ImageHelper gets deleted
ImageHelper object is not refcounted and garbage collected and
endRenderPass call is deferred until next render pass starts. This
caused a situation that an ImageHelper object gets deleted while still
referenced in the open render pass. This CL make sure that we call into
all shared context's open renderpass when an image goes away so that
they can take appropriate action for this.
Bug: b/169618408
Change-Id: I5075e805980084db82ca3e699462272eee5d2d59
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2443571
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
c5494728
|
2020-10-02T00:55:28
|
|
Vulkan: Free up 2 bits in PackedAttachmentOpsDesc
These bits will be used to aid in invalidation of
multisampled-render-to-texture attachments.
Bug: angleproject:4836
Change-Id: Ib2b438386f8cd8c057bc0ef16144b9d2ddbc1594
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444097
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
34f66126
|
2020-09-10T15:59:22
|
|
Vulkan: Check that its okay to add commands
It can be hard to tell sometimes when the mRenderPassCommands or
mOutSideRenderPassCommands command buffers have changed and there have
been some issues with code that locally caches a pointer to a
commandBuffer that then becomes invalid.
This change adds checking so that if a command is being added to a
commandBuffer that's been closed (e.g. submitted for processing) then we
hit an assert.
Bug: b/168144059
Change-Id: If5d37c462e3bcb51f6ec2ca44c27a2fad4e57c19
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2405812
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
43163491
|
2020-09-22T11:45:06
|
|
Vulkan: Unresolve depth/stencil MSRTT attachments
Using the same shader that unresolves color, this change allows
depth/stencil to be unresolved as well.
In turn, this allows the depth and stencil loadOp/storeOp of the
implicit multisampled image associated with a
multisampled-render-to-texture renderbuffer to be set to DONT_CARE.
Stencil unresolve depends on VK_EXT_shader_stencil_export. In the
absence of this extension, the stencil aspect is not unresolved and must
continue to use loadOp=LOAD and storeOp=STORE. This is not ideal, but
the expected use-case of depth/stencil MSRTT renderbuffers is that they
get invalidated, so that load and store wouldn't happen in practice.
Bug: angleproject:4836
Change-Id: I9939d1e15e10fa8ed285acdd6fe6edb42c59054f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2427049
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2663e601
|
2020-09-24T18:28:31
|
|
Vulkan: Dynamically grow descriptor pool sizes
Initial testing using benchmarks shows that the majority of the
descriptor pools allocate fewer than 32 descriptor sets worth of
descriptors. This CL reduces the initial size of each pool from 128 to
32 to reduce memory consumption.
Additionally, when a pool is exhausted and a new one is created, the
size of the pool doubles each time, up to a max of 512 descriptor sets
worth of descriptors. This allows us to aggressively increase the size
of the pools that appear to be very hot and decrease the total number of
pools created.
Bug: angleproject:5067
Test: CQ
Change-Id: I190059cf04134902d6251d475dd908c1cbb82b58
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2430193
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
d2d9e682
|
2020-09-15T16:06:42
|
|
Vulkan: Use DepthStencilReadOnly when it is read only.
We are tracking depth and stencil read or write during the renderpass.
We can use that to switch to DepthStencilReadOnly layout if both depth
and stencil are not writing. This allows drivers to optimize out the
storeOp for the renderpass.
Bug: b/168953278
Change-Id: Id82e06b4bae1ae8c83d880bb5e58accfa61f8191
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2411336
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
68a5baeb
|
2020-09-23T22:13:03
|
|
Revert "Vulkan: Implement a SharedResourceUse pool"
This reverts commit de335c16855f11d1f0a6f0b37bee30c8a09a6c1d.
Reason for revert: Might actually regress CPU overhead perf.
Unsure but it's possible the reported perf improvement was due
to variance.
Original change's description:
> Vulkan: Implement a SharedResourceUse pool
>
> 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>
TBR=syoussefi@chromium.org,jmadill@chromium.org,m.maiya@samsung.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:4950
Change-Id: I40081551c3db67d6e55182fea40119946ed16ac3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2426479
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
ed899835
|
2020-09-11T21:21:55
|
|
Vulkan: Allocate descriptor pools with layouts
Descriptor set layouts and pools are very tightly coupled, since their
binding types and counts must match to ensure the number of available
descriptor sets within a pool remains accurate. To enforce this, the
descriptor pools will now keep a copy of the VkDescriptorSetLayout that
the pool was created for, which is verified when a descriptor set is
allocated from the pool. If the handles don't match, an ASSERT() will
fire.
Bug: angleproject:5033
Test: CQ
Change-Id: I4faf82c24f31052e57b656c968788bb0c131b619
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2407282
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
a7e03ed7
|
2020-09-21T14:56:00
|
|
Vulkan: Further refine invalidate for depth/stencil
Bug: angleproject:5079
Change-Id: Idc732b1e6729b2776d66c63c3ae2bd94e11bdbb5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2422684
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
7b7e52fa
|
2020-09-21T13:17:25
|
|
Vulkan: Fix copy-paste error in hasCopyImageView
A previous CL had a copy-and-paste error in hasCopyImageView(). It
was calling getFetchImageView().valid() instead of
getCopyImageView().valid().
Bug: b/161993151
Change-Id: I40335ad51585735e9d68781557693ede67096e7d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2422085
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
de335c16
|
2020-09-14T12:04:20
|
|
Vulkan: Implement a SharedResourceUse pool
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>
|
|
357caadb
|
2020-09-16T21:44:56
|
|
Vulkan: Optimize Attribute Change Perf (2/5)
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>
|
|
37457d08
|
2020-09-15T14:38:53
|
|
Vulkan: Support MSRTT color renderbuffers
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>
|
|
f12e4123
|
2020-08-25T12:01:12
|
|
Vulkan: Match descriptor pool sizes to descriptor set layouts
When a descriptor pool is created, a list of descriptor types and counts
are given to vkCreateDescriptorPool(). Later, when allocating a
descriptor set from the pool, we pass along a descriptor set layout to
vkAllocateDescriptorSets() which is used to determine how many of each
type of descriptor (i.e. binding) to allocate from the pool.
In order for our "free descriptor set" counts to be accurate for each
pool, the descriptor pools need to be created with descriptor counts
that match the descriptor set layout binding counts.
This change fixes a bug where the descriptor set layouts were created
with more bindings than the descriptor pool sizes, causing the "free
descriptor set" count to be inaccurate, leading to allocating too many
descriptor sets from a pool.
Bug: angleproject:3570
Test: VulkanDescriptorSetTest
Change-Id: I660bf02d29a1291391fb15f39e6479bf348d0f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2391114
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
22d30378
|
2020-09-15T23:19:48
|
|
Vulkan: Change VK suffix to Vk
For consistency with the rest of the backend. Level index variables
were using the VK suffix while color index variables used Vk.
Bug: angleproject:4881
Change-Id: I0c2799da34cdfe19cb04adbebba042ac8876af96
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2413155
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
06b4fb92
|
2020-09-11T21:24:46
|
|
Vulkan: Fool proof packed attachment index to vulkan and from OpenGL
ANGLE packs FBO attachments from OpenGL and uses packed attachments to
create VkFramebuffer and renderpass. When we use attachment index into
the attachment array, we must be very careful to use packed index for
vulkan objects. It is easy to make mistakes here and introduce hard to
debug bugs. This CL defines a PackedAttachmentIndex class that uses that
to index into vulkan attachments and pass around APIs so that compiler
would catch the error when wrong index is used. This also introduces
PackedClearValuesArray that stores clear value in packed attachment
index so that it is impossible to mix it with ClearValuesArray that
stores clear value in GL attachment index.
Bug: b/167301719
Change-Id: I68680522c60beeb5096e5211eaef89da28c7097e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2410366
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
7870cf3f
|
2020-09-10T17:30:13
|
|
Vulkan: Fix RAW hazard with storage images
Semantic revert of 78304b470 and 7bce5194d. 7bce5194d assumed that a
read transition between same layouts is a noop, but that's not true if
said layout is GENERAL.
This is only possible if an image is simultaneously bound as storage and
sampled image. This bug was discovered by the new syncval VVL warning.
Bug: b/156661359
Change-Id: I05f94160ca1b05b715701564e27fccee31a8aa45
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404742
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
ef315fdc
|
2020-09-10T14:56:35
|
|
Vulkan: Use current commandBuffer pointer
We were using a passed in commandBuffer in
ImageHelper::flushStagedUpdates which became invalid during the process
of handling the flush upon which subsequent uses could cause problems
when threading is enabled (and maybe when it's not as well, just harder
to see.)
Have ImageHelper::flushStagedUpdates use the current
OutsideRenderPassCommandBuffer and the code will use the proper one.
Bug: b/168144059
Change-Id: Ib9849efe9366cf61df5e68fd25d17df165dbd3a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2402354
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
4a41204d
|
2020-09-02T05:04:33
|
|
Vulkan: Improve invalidate for depth/stencil
Improve state tracking when the depth and/or stencil attachments are
invalidated. Since no draw-time tracking is done, we use the number
of command-buffer commands to determine when an attachment is drawn
to. That allows all cases to be handled for store ops. Still need to
handle mContentDefined at endRP time (we have the data, just not the
plumbing).
Test: angle_white_box_tests --gtest_filter=VulkanPerformanceCounterTest.*Invalidate*/*
Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_fbo_invalidate_* --use-angle=vulkan
Bug: b/167276207
Change-Id: Iae10857dbb4d43b934c51ad7e400b71ae0db4f55
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378670
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
a0d048a4
|
2020-08-27T12:03:02
|
|
Vulkan: Fool-proof usage of GL and VK level indices
Using boxed types, this change allows the compiler to catch errors when
a level index in one space (e.g. GL) is mistakenly used in another space
(e.g. VK).
This change uncovered a number of bugs due to such mistakes which are
fixed.
Mistakes are still possible when the index is explicitly extracted, for
example to be given to a Vulkan command, or when it's created, for
example when retrieved from gl::ImageIndex::getLevelIndex. Future work
can include using gl::LevelIndex in gl::ImageIndex directly to alleviate
the latter at least.
Bug: angleproject:4880
Change-Id: I6427c68c3bc096f771402f51c8554d8171758aa9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380232
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
b4efc051
|
2020-08-28T14:45:18
|
|
Enable -Wdeprecated-copy.
This is another warning turned on in Skia. It enforces an explicit
copy assignment operator in some implicitly-generated cases. It
caught one potential error in SubresourceUpdate.
Bug: skia:7647
Change-Id: Ia501f619cf7f3d2e8647cdbbda2936f51f9721ba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2381953
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
fbafb46c
|
2020-08-26T10:56:33
|
|
Vulkan: Use context staging buffer for CopyTexSubImage
This will avoid allocate staging buffer if there isn't one already.
Bug: b/164511310
Change-Id: Ieb5ef12fa58c52c0a62276cab6de135fdd62780c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2377121
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
5ac807b2
|
2020-08-26T10:18:00
|
|
Vulkan: Let stageSubresourceUpdateAndGetData use ctx staging buffer
stageSubresourceUpdateAndGetData call are made and then flush the
commands out, so they could just switch to use context's staging buffer
instead of use per object's staging buffer.
Bug: b/164511310
Change-Id: Iff7944a37073bb3641498e334847f599903858b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376895
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
9e544a84
|
2020-08-24T18:37:59
|
|
Vulkan: Fix alignment issue with context staging buffer
Context's staging buffer is shared for all kind of usages. We should
pass in alignment requirement for allocate call whenever it is different
from the default alignment. This adds allocateWithAlignment call to
DynamicBuffer call and switch ImgeHelper's usage of it to
allocateWithAlignment
Bug: b/164511310
Change-Id: Idcb6b6f95d6862ee6cb8fca9c164910b7e085a17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2373590
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
a08495d9
|
2020-08-27T13:47:19
|
|
Revert "Vulkan: restore mContentDefined at endRP()"
This reverts commit 53ee431e3d36692cbe50a96ebbf0ff898ec4d523.
Bug: chromium:1122621
Change-Id: Ifd63aa0694e00ed6ef74b385466b874604355e79
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380610
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
c5b9c49c
|
2020-08-25T18:01:29
|
|
Vulkan: Fix optimizeRenderPassForPresent regression.
gfxbench clears the depth buffer right before the swap. Even though the
last draw call that presents the frame didn't ever read or write to
depth, the tracking we added thought this depth write meant we had to
keep the LOAD_OP as CLEAR. Instead we can refine our check to treat
clears specially when enabling the depth-stencil read-only mode instead
of changing how the tracking works for clears. This way the tracking
can not affect other apps that don't use depth-stencil read-only loops.
Also adds a regression test that counts the clears after a swap.
Bug: angleproject:4959
Bug: angleproject:4979
Change-Id: I12ece6474019f7519a467f827110ad817f7d4df7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2370364
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
53ee431e
|
2020-08-21T12:40:03
|
|
Vulkan: restore mContentDefined at endRP()
CommandBufferHelper will keep a pointer to the depth-stencil
RenderTargetVk, and use this to set RenderTargetVk::mContentDefined to
true at the end of a render pass.
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: I891381825ee01e141dfa4f9099d07d9ffc943f77
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2368194
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
027f0c38
|
2020-08-24T15:55:55
|
|
Vulkan: Remove Host->device availability barrier.
vkQueueSubmit already performs this operation, so this barrier was
unnecessary.
The only place this is necessary is when the GPU is expected to receive
updates from the CPU post-submit. ContextVk::synchronizeCpuGpuTime is
the only such use-case in ANGLE.
Bug: angleproject:4897
Change-Id: I7297fbd65d3faabd949dddb6bcaa181053a83193
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2372631
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7bce5194
|
2020-08-22T23:52:51
|
|
Vulkan: Simplify image read barrier necessity check
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>
|
|
f9a062c9
|
2020-08-16T14:09:41
|
|
Vulkan: Add FastIntegerSet and FastIntegerMap class
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>
|
|
1d331c91
|
2020-08-19T10:30:14
|
|
Vulkan: Use context staging buffer for copyImageDataToBuffer
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>
|
|
296d3bfd
|
2020-08-21T10:38:32
|
|
Vulkan: do not end render pass when invalidating
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>
|
|
d3e800e9
|
2020-08-15T17:26:04
|
|
Vulkan: Restart RenderPasses in DS read-only mode.
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>
|
|
552f0f76
|
2020-08-14T16:37:03
|
|
Vulkan: Use context staging buffer for immutable texture update
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>
|
|
e689d316
|
2020-08-14T22:51:03
|
|
Vulkan: Don't end RenderPass on DS feedback loops.
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>
|
|
dff47d5f
|
2020-07-14T19:10:12
|
|
Vulkan: Optimize MSAA using subpass resolve attachments
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>
|
|
27a24f6d
|
2020-08-17T19:02:09
|
|
Vulkan: Check aggregate barrier feature instead of caching.
Bug: b/157508684
Change-Id: I6c98cb017d44c1279439d815e77f6ad1a32133e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2360903
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
d286daf1
|
2020-08-16T23:53:31
|
|
Vulkan: Track RP's read/write access for depth/stencil.
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>
|
|
5b4f6e31
|
2020-08-15T23:03:34
|
|
Vulkan: Add overlay widget for RP buffer count.
Can help evaluate when scenes stress out the resource tracking in the
RenderPass command buffer.
Bug: angleproject:4950
Bug: angleproject:4965
Change-Id: I7da2ad0101a840c5441f2112db4bb61f564afcef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2358521
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
594e0e14
|
2020-08-15T16:35:55
|
|
Vulkan: Add DS ReadOnly mode to Framebuffer/RP caches.
Allows ANGLE to create Framebuffers and RenderPasses with a read-
only depth/stencil layout. Also allows us to transition our Images
to this new DepthStencilReadOnly layout.
Internal code redesign. No functional change to our command stream.
Bug: angleproject:4959
Change-Id: I9b80063bdaec8f5d6c89037e0618c85e1c11b78d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2354280
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
ee0a9a34
|
2020-08-13T15:39:49
|
|
Vulkan: Clean up ImageLayout enum.
Remove the redundant manual numbering. Also rename
AllGraphicsShadersReadWrite to AllGraphicsShadersWrite for consistency.
Refactoring change only.
Bug: angleproject:4959
Change-Id: I2e7ca00993f192897bbf88f4bdc3f1610bcb345f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2354279
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
dceaabb1
|
2020-08-08T17:03:47
|
|
Vulkan: Clean up ImageHelper barrier functions.
We don't need to explicitly check if a barrier is required for write
barriers. Write barriers always require a barrier and read barriers
need the layout change check. We introduce a new enum encoding ReadOnly
vs Write layout types and call specialized write/read functions
instead. Also renames the helper APIs to be more consistent.
Refactoring change only.
Bug: angleproject:4959
Change-Id: I0ce39ceaca6be588327c381194a580dc6b11f036
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2344744
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
d201ed8b
|
2020-08-02T16:29:35
|
|
Vulkan: Track used Images in RenderPass.
Adding a simple ImageSerial tracking map in our RenderPass allows us
to know when we do or do not need to close the RenderPass on a new
Image access. This simple tracking scheme improves Manhattan
performance by up to 25% on Android. The improved perf comes from
reducing our RenderPass count (23->18 RenderPasses in our capture
scene).
Adds a FastUnorderedSet class to manage the used RP Image serials.
Updates the Query helpers to explicitly flush the RP before inserting
queries.
Bug: angleproject:4911
Change-Id: I0c34fc8e307514ebdf3e81e08d8e5aedb70ebe8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2334346
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
5e5b7537
|
2020-08-10T21:02:50
|
|
Vulkan: Optimize resource tracking in CommandBufferHelper.
Introduces a FastUnorderedMap class that uses FastVector. This type
uses static storage for up to a small fixed number of elements and
uses dynamic storage for anything larger.
Local testing shows this almost fully solves the regression from
using unordered_map. It's still slightly slower than using no
tracking (<5%).
Very degenerate cases which track dozens or more buffers will still
have significant overhead. For almost all applications that use only
a few buffers per RenderPass this will be very fast.
Test: angle_perftests, *vulkan_null_index_buffer_changed_ushort
Bug: angleproject:4950
Bug: angleproject:4429
Change-Id: I39edeaaa159124167f1ea23ad2e6eac5e9220d0b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2348108
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
135a5843
|
2020-08-02T23:03:44
|
|
Vulkan: Remove redundant vk prefixes in vk_helpers.
Cleanup/refactoring only.
Bug: angleproject:4911
Change-Id: I4fe06a86a6ecaafa16fd900b6f6229f09ab56a9f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2334092
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
e26c5e07
|
2020-08-02T16:04:17
|
|
Vulkan: Add Image serial.
This is owned by the ImageHelper. We'll use it in tracking used images
in RenderPasses.
Bug: angleproject:4911
Change-Id: Ic71cef2b16eefb86c73c9c5e1e38ee7cd6a60adb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2332895
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f9dd2c15
|
2020-08-02T18:03:16
|
|
Vulkan: Accumulate Buffer barriers.
Uses an unordered_map in the CommandBufferHelper to track buffer
reads and writes. Buffer barriers are tracked specially in the
CommandBufferHelper class as a barrier we execute immediately when
we execute the commands into the primary. So when we run into an
incompatible buffer access we must start a new command buffer.
The rules for an incompatible access are:
- when we are reading a buffer, any prior write in the same command
buffer is incompatible.
- when we are writing a buffer, any prior read or write in the same
command buffer is incopatible.
Also adds a regression test using a new performance counter.
Bug: angleproject:4429
Change-Id: I393a4ed87314f955eb998940b877ba76ea15a7b8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2334091
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
25b0de6b
|
2020-08-01T13:45:11
|
|
Vulkan: Squash Texture+ImageView Serial and improve caching.
Previously we regenerated TextureSerial on Texture state changes such
as base/max level changes. This caused ANGLE to update descriptor sets
even though it was using the same image view handles. This change
instead uses an ImageViewSubresourceSerial which includes both a
serial for the ImageView and a 32-bit packed subresource range. The CL
speeds up NBA2k because ANGLE no longer writes new descriptors
for Texture max level changes. Local testing showed up to a 40% speedup.
Also adds a regression test with a counter for the number of descriptor
set writes in a frame.
This change will also be useful in upcoming changes that track Image
serials in the RenderPass.
Bug: angleproject:4911
Change-Id: I66249634aa56288079acf2c0eb8aa3391103533c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2333396
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
b9b5fa55
|
2020-08-02T00:17:20
|
|
Vulkan: Redo Sampler Serials.
Instead of refreshing sampler serials every time the SamplerVk or
TextureVk has a state change we can give a VkSampler a unique serial.
The serial is unique to this VkSampler and repeated state changes
will fetch the same Serial from the SamplerCache. This allows for
more cache hits.
We store the the new Serial together with the VkSampler in a
SamplerHelper class and store references to a SamplerHelper in
SamplerVk and TextureVk instead of the VkSampler directly.
In a follow-up change we will improve image view caching by also
improving how we store serials for ImageViews.
Bug: angleproject:4911
Change-Id: I9168c2700e383bca796cca925b38cfd30132d982
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2333988
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
adc250c3
|
2020-07-31T21:11:05
|
|
Vulkan: Refactor ImageViewHelper serials.
Instead of storing a dictionary of serials to specific image views
we now store a single 32-bit serial combined with subresource info.
The serials combined with a subresource info (level/layer) gives a
unique identifier for each ImageView in the ImageViewHelper for the
descriptor set cache and the Framebuffer cache.
Also moves ImageView serial allocation to initialization and release.
This means we no longer need to use "getAssign" methods and instead
we use a few init methods to ensure the serials stay allocated.
Bug: angleproject:4911
Change-Id: Ia6af76ae16b3ff5d4a83974bde05cc704064b079
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2333395
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
4e1abc75
|
2020-07-24T10:38:40
|
|
Vulkan: Set depthStencil loadOp to DontCare when not used and stored
If depth stencil buffer is disabled during entire renderpass, and at the
end of renderpass we are not storing the data back to memory, then force
the loadOP to DontCare to avoid unnecessary depth stencil load or
clear.
Bug: b/162080462
Change-Id: I30905a6d45bec038de68e7f363ec699eb2be09ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2317726
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
6c5ad2e9
|
2020-08-01T15:43:43
|
|
Vulkan: Remove ImageHelper::mSerial.
This serial is no longer used by any code.
Bug: angleproject:4911
Change-Id: Id82ef697b81b5738333f3280c58fd613615b6e09
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2333397
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
38e7f7a6
|
2020-07-30T14:35:50
|
|
Vulkan: Make CommandBufferHelper::empty() logic less obtuse
CommandBufferHelper::empty() logic is simplified and commented to make
it easier to read. Basically empty() means there is no work in the
CommandBufferHelper object. For RenderpassCommands, that is equivalent
to !started().
Bug: b/162521656
Change-Id: Ic9683b392835a677501cb81e5e8a025e031ebf93
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2330379
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
1c1c6b4e
|
2020-07-29T13:17:16
|
|
Vulkan: Cache/re-use vkImageView's per max level
For applications that frequently switch a texture's max level, cache
and re-use "read view" vkImageViews per max-level.
Test: NBA 2K20
Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_texture_mipmap_*_max_level_* --use-angle=vulkan
Bug: b/161993151
Change-Id: I9a6a81d5234196040bc6c264ec627a073ba73293
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2321370
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8adc5469
|
2020-07-02T10:15:17
|
|
Vulkan: Generate mipmap in compute
An initial implementation based on AMD's FFX SPD (Single Pass
Downsampler).
Apart from requiring STORAGE_IMAGE support for the image format, the
following limitations are in place due to FFX SPD:
- Image must be 2D or 2D array (including cube maps)
- Image must be single-sampled
The following _can_ be supported, but not yet implemented:
- sRGB formats
- Integer formats
- depth/stencil formats
Bug: angleproject:4551
Change-Id: Ibc4d5cea701cca31e55e3d651540872bbd3b473f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2278713
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
234be194
|
2020-07-15T14:55:18
|
|
Vulkan: Move mEmptyBuffer from program to ContextVk
And merge that with TheNUllBuffer as well so that you only have one
dummy buffer per context.
Bug: b/161391337
Change-Id: I75fddb5c48393876e745ff237e11d9c5672ae10e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2300707
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
0df0b79c
|
2020-07-17T16:26:21
|
|
Vulkan: Optimize changing texture max level
For applications that frequently change the texture max level, to a
value that is a subset of the texture's maximum levels, just recreate
the VkImageView's.
Test: NBA 2K20 game play
Bug: b/160976091
Change-Id: I62a05a90cdb90147056ba8cec960c2114479ec37
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2300532
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
9a9ef0ae
|
2020-07-15T16:50:32
|
|
Vulkan: Fix RTs attached to textures with non-0 mip
Cleared confusion between GL level indices and VK level indices by
adding the corresponding suffix to variables and function arguments. A
handful of places that sent one index and expected the other are fixed.
A couple more places needed this adjustment that were missed in the
first CL. Also included a test to provoke those situations.
The conversion between the two is given by:
levelIndexGL = levelIndexVk + baseLevel;
Bug: angleproject:4695
Change-Id: I3b8e5699abee1b011e52b666e6e245f44cb8ad6f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2302549
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
67980f13
|
2020-07-08T08:51:02
|
|
Vulkan: add Buffer/Texture/ImageViewSerial class
In a few places we need a unique ID to represent that object and use
that to compute hash key. Right now we are using Serial for that purpose
but it creates confusion with QueueSerial which we are using Serial to
track GPU progress. This CL changes these usage of Serial to
TextureSerial, SamplerSerial, ImageViewSerial type so that compiler can
perform type checking. It also adds BufferSerial in preparation for next
CL.
Bug: b/159457348
Change-Id: I8e2da69c2029e4ddbcf163981ae46f85e19f751b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2287426
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
22e1f3e2
|
2020-06-26T14:26:50
|
|
Vulkan: Let all shader stages share one buffer for default uniform
Right now each shader stage has its own vk::DynamicBuffer for default
uniform storage. This is less efficient than just share one buffer. This
CL moves the storage from per shader stage into its ProgramVk object.
Bug: b/159457348
Change-Id: If47248ea23c4e48407d3b211583ae2b048d4d10f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2265281
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
dc9743fb
|
2020-07-14T11:33:29
|
|
Add buffer serialization capability
Serializes buffers' states stored on CPU.
Gets buffers contents on GPU by mapping buffers to CPU's address space,
then copy their data. Unmap buffers after finish. Since this feature is
for tests only, it is only implemented for the Vulkan backend.
Adds buffer serialization to serializeContext method so that capture
replay regresssion testing now compares the states of buffers too.
Bug: angleproject:4817
Change-Id: Ic9b529701014d5ba8420023a021cd5ea381bd9a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2295950
Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
fe36a647
|
2020-07-08T18:27:21
|
|
Vulkan: Add driverUniform's buffer to mResourceUseList
There is a bug with mDriverUniforms' dynamicBuffer that we never add it
to context's mResourceUseList to let it hold onto it until GPU
completes. This causes old buffer gets recycled prematurely and gets
overwritten, result in rendering corruption. This CL adds current buffer
to the mResourceUseList so that it will be waited properly before gets
recycled.
Bug: b/160777679
Change-Id: I7707442e0f5ba408f5f28337422274e0c23b6bfb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2288325
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
f61272fb
|
2020-06-17T11:38:37
|
|
Add support for VK_KHR_sampler_ycbcr_conversion
This adds ability for applications to import Android Hardware Buffers
(AHBs) as OpenGL images which in turn can be sampled from and/or
written.
This was specifically tested with the common use case of importing a
buffer created by an media decoder and using that as a texture source to
include that video content on the screen. Tested with:
- Angry Birds 2 video player (for ads) requires YUV conversion.
- Basic Media Decoder example:
https://github.com/android/media-samples/tree/master/BasicMediaDecoder
Bug: b/155487768
Change-Id: I9255450f81aa4daa2aace7205d4f6c3f225abcca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2175103
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
34eb401b
|
2020-06-19T15:36:18
|
|
Vulkan: Skip repeated VkCmdClear call with the same value
Some apps actually do this. One of them is gfxbench. This helps
performance by dropping the redundant clear calls.
Bug: b/159489614
Change-Id: Ib7958042f081b8fd58c5bc912fbb45bb223aec0f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2255643
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
58ff77a8
|
2020-06-27T09:30:00
|
|
Vulkan: Set new layout based on VkImageUsageFlags
When transferring vkImages between queues, the new layout
needs to be set based on the usage flags of the vkImage
instead of hardcoding it to AllGraphicsShadersReadWrite
Bug: angleproject:4791
Change-Id: I3b543a6280e6c2317cc11bf65dc4c337bc5f90b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2271563
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b0245f68
|
2020-06-23T22:38:12
|
|
Vulkan: Remove superseded updates when flushing to image
Especially with emulated formats and robust resource init, a clear is
staged that's often superseded by a data upload to the same subresource.
This change ensures that superseded updates are dropped to avoid
unnecessary GPU work.
Bug: angleproject:4691
Change-Id: I697ccd438b92fd2fff17a5800550694658c95c54
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2262574
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
c81da1c8
|
2020-06-19T22:05:38
|
|
Vulkan: Avoid double-copy when generating mipmap
If the image needs to be redefined with mips, level 0 was copied to a
buffer which was then copied to the new image. This change instead
stages the old image directly for copy to the new image.
Bug: angleproject:4551
Change-Id: I7625f140ddadde0a2b439c5e91c519ad49ae2fd7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2257264
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
62a2f513
|
2020-06-23T13:16:19
|
|
Vulkan: Remove DispatchHelper
This class is no longer used.
Bug: angleproject:4029
Change-Id: I2758b286ae10856a5dff3decbb1cf9c58b44e354
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2260936
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b772a955
|
2020-06-16T23:32:47
|
|
Vulkan: Make texture syncState aware of upcoming generateMipmap
By letting TextureVk::syncState know it's being called for
generateMipmap, it can make a better decision to initialize the image:
- Staged updates to mips that are going to be overwritten are dropped
- The image is created with full mipchain to avoid a redefine in the
following generateMipmap() call.
Bug: angleproject:4551
Change-Id: Ic70ee6c0a0b29c7bd62beaff612b2f2d5276defb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2249340
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
34ca1ac7
|
2020-06-16T12:05:12
|
|
Vulkan: Fix FramebufferVk cache
Migrate Serial from Image to ImageView.
Imageviews are what are utimately used in FramebufferVk, so move
the Serials into the ImageViewHelper class. Since that class also
knows the level/layer of the imageView, we can revert to using a
single Serial per ImageView instead of the AttachmentSerial that
included the layer and level.
ImageViewHelper caches Serials per layer/level combo.
Bug: angleproject:4651
Change-Id: I3741d7d03523eada84295cb712c1cc1e6e3c3867
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2248203
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
e7ae237e
|
2020-06-12T23:52:09
|
|
Vulkan: ANGLE_copy_texture_3d support
Bug: angleproject:4748
Test: CopyTexImage*Vulkan:Texture3DCopy*Vulkan:Texture2DArrayCopy*Vulkan
Test: dEQP.KHR_GLES3/copy_tex_image_conversions_required_cubemap*cubemap*
Change-Id: Ifdc3d455ca8c9e732d0adf4afa9e2809d780ae18
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2246320
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
68fcfea3
|
2020-05-29T12:34:08
|
|
Vulkan: support format aliasing in texture images
glBindImageTexture specifies the format which should be used to
interpret the texture data and this format is independent from the
texture's own internal format. This change allows the VkImage's format
to be mutable to handle glBindImageTexture calls with different
formats.
Bug: angleproject:3885
Test: dEQP-GLES31.functional.image_load_store.*.format_reinterpret.*
Change-Id: Ia1ad762b4ccae0f510c8b4918781234fcf51c5f1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2222610
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
bc8199fa
|
2020-06-15T10:00:01
|
|
Vulkan: Ensure tiling mode compatibility while deciding copy path
When decided whether to use transfer or the draw path to perform
an image to image copy make sure to account for compatibility in
tiling modes.
Bug: angleproject:4743
Change-Id: I757aab0ac8628f08092dc2dfc39f06d112db5089
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2246527
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
959037e0
|
2020-05-25T15:40:38
|
|
Vulkan: Preserve RPs on XFB changes when possible.
Instead of unconditonally ending the RenderPass we keep a set of
active XFB buffers in the ContextVk. This lets us re-use RPs when
we don't write to the same buffer repeatedly.
Reduces the RenderPass count in our Manhattan capture from 29->23.
Bug: angleproject:4622
Change-Id: I28c2d4d3db1490e5d07be3c48d21fd2cc6ff85d6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2196957
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
7005248b
|
2020-06-11T16:00:23
|
|
Vulkan: Fix glCopyTextureCHROMIUM if source is swizzled
A no-swizzle view is added for this use-case.
Bug: angleproject:4004
Change-Id: Id654af9a4f520357c91bf2b06501c9e1ea169f11
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241623
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0eae0d6c
|
2020-06-11T08:53:39
|
|
Vulkan: Set external image's tiling mode based on AHB usage flags
For external images which can be accessed by CPU,
the tiling mode should be linear. So, query the usage
of the Android Hardware Buffer and derive the tiling
mode based on AHB usage flags.
Bug: angleproject:4735
Change-Id: I1b91c6800d414d73091032e40d8e4f1e8f6c101b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241780
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|