|
46107d3e
|
2020-11-18T22:03:22
|
|
Vulkan: Delay defining D/S content to endRenderPass
Take the following situation:
1. Start RP with D/S undefined: loadOp = DONT_CARE, storeOp = STORE
* At this point, onDepthStencilWrite calls image->onWrite, setting
depth/stencil contents defined.
2. At endRP, observe depth/stencil is not used: storeOp = DONT_CARE
3. Start another RP with D/S: loadOp = LOAD, storeOp = STORE
Because the call to image->onWrite was done at startRP, the contents of
the depth/stencil image is marked as defined, and the next render pass
is loading these data. This change moves image->onWrite to
endRenderPass, and only calls it if storeOp = STORE, taking advantage of
all the opportunistic optimizations that try to set storeOp to another
value.
Bug: angleproject:4836
Change-Id: I9858e5caa6b1f67f841a5c6356e66927356ef469
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2548319
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b6ec24ab
|
2020-11-14T00:24:52
|
|
Vulkan: Support format reinterpretation in imageBuffers
This is done by creating multiple buffer views over the buffer based on
the format specified by the attached shaders.
Bug: angleproject:3573
Change-Id: I0372a988938050cc092d8a0959a59d1c893fc6f4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2536909
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
61a117fa
|
2020-11-16T12:48:11
|
|
Vulkan: Fix aliasing format for non-layered image bindings
This was correctly handled for layered bindings by the change
anglebug.com/3885#c20. This change uses the same mechanism for
non-layered bindings.
Bug: angleproject:5347
Change-Id: Ida55b3589d0bdbe5d824c1614c9bf9f867a7f652
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2541182
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f197ebac
|
2020-11-16T15:16:56
|
|
Vulkan: Add EXT_external_buffer support
Addition of buffer support for external memory
Also adds new end2end tests for these usecases
* SubData update
* map/unmap buffer
* dispatch compute with external buffer
Bug: angleproject:5073
Test: ExternalBufferTestES31.*Vulkan
Change-Id: Ib3cccaca77b76830effe49d3731782552e7424ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2525105
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
86d7e4d8
|
2020-11-10T15:55:34
|
|
Vulkan: Support texture buffers
Texture buffers are placed in the same descriptor set with the rest of
the textures. However, the different code paths that handle textures
have special cases for texture buffers as they create a different
descriptor type (texel buffer instead of combined image sampler). Image
view serials are used to track the buffer view serials as well so the
texture descriptor cache can handle texture buffers as well.
This CL is missing storage texel buffer support.
Bug: angleproject:3573
Change-Id: Iff80ca22ff9b9957a0c9a3c7aaada1fa54b24ec8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2532653
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
60641abc
|
2020-11-16T16:12:31
|
|
Vulkan: Make ImageViewHelper a Resource
Bug: angleproject:3573
Change-Id: I12e70418b3b971e802bc911409e170cbf8c61915
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2542223
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
cdf280c0
|
2020-11-13T10:14:58
|
|
Vulkan: Fix serial handling for queries
Previous serial mechanism wasn't reliable. QueryHelper is now a
vk::Resource and uses the vk::Resource lifecycle.
Also added some utility methods to QueryVk to deal with stashed queries.
Any question we want to ask about mQueryHelper we want to ask about the
stashed queries as well.
Bug: b/169055809
Bug: b/169788986
Bug: b/170312581
Change-Id: Ia34a7a433e61a2543cfb09491ebab55b054a26c9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2537718
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
9e7f08fc
|
2020-11-06T16:55:51
|
|
Vulkan: Fix incorrect reordering of barriers
Take the following situation, a simple copy from image to buffer:
ANGLE_TRY(contextVk->onBufferTransferWrite(buffer));
ANGLE_TRY(contextVk->onImageTransferRead(aspectFlags, image));
CommandBuffer &commandBuffer = contextVk->getOutsideRenderPassCommandBuffer();
commandBuffer.copyImageToBuffer(imageHandle, layout, bufferHandle, 1, regions);
Both `onBufferTransferWrite` and `onImageTransferRead` may flush either
the outsideRP or insideRP command buffers. If buffer is not previously
used, but image is used:
- onBufferTransferWrite: buffer usage is recorded in outsideRP1
- onImageTransferREad: outsiderRP1 is flushed, outsideRP2 is started
- copyImageToBuffer: recorded on outsideRP2, but buffer usage not
recorded there
- A following command that uses the buffer and requires barrier doesn't
close outsideRP2 as it believes it was not used there
Bug: angleproject:5319
Change-Id: Ib8994083fbc21969a538cda3784adee57b089415
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2523388
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
f19a4a20
|
2020-11-08T10:37:33
|
|
Vulkan: Move CommandBuffer management to RendererVk.
This consolidates all relevant logic in a single place.
We no longer need to interact with ContextVk in the worker thread.
This switches the fixed pointer array size to a dynamically sized
vector. Some of the EGL and ANGLE tests would use a large number of
Contexts and we were consistently running out of available command
buffers which would cause a deadlock situation. We can trust other
parts of the code to throttle the application if it starts to get
too far ahead of the device and dispense with the hard coded limit
in the command buffer allocator itself. The resulting code is also
quite a bit simpler and doesn't need a condition variable.
Also fixes missing initialization in SecondaryCommandBuffer.
Bug: b/172704839
Change-Id: Icc3a3daf5d6b272db556c0e4c93fb793583966a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2525143
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
b22f8e8e
|
2020-10-29T15:50:39
|
|
Vulkan: Add specialization constants for surface rotation
This plumbing through the specialization constant for surface rotation
from ContextVk to pipeline program creation. It has not been used yet,
so expecting no real functional change. This CL also converts
lineRasterEmulation to use the same specialization constant path as
surface rotation.
Bug: b/171750979
Change-Id: Ic08c4f8bb576424d1752015e874d0977a58d78bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2508837
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c8a7c033
|
2020-11-07T09:12:47
|
|
Vulkan: Move primary command buffer to CommandQueue.
This brings CommandQueue one step closer to the worker thread.
Bug: b/172704839
Change-Id: I35225c5f302e34e3feb38a35c22b6d8e6f4ad10c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2524543
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
eaab2e34
|
2020-11-09T11:24:09
|
|
Vulkan: add explicit template specialization for barrierImpl
ImageHelper::barrierImpl with secondary command buffer is used in
other translation units. Linking fails if compiler has optimized
out symbol for secondary command buffer.
Bug: angleproject:5324
Change-Id: I588d0d949a9b2eee04d8103effc485ab23d679c6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2526082
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
18fcb4ad
|
2020-11-06T07:22:17
|
|
Vulkan: Enable a subset of ImageTest colorspace tests
This patch does the following -
1. Expose EGL_KHR_image_gl_colorspace only if the underlying
ICD supports VK_KHR_image_format_list extension
2. Create VkImageViews from EGLimage's format
3. Fix bugs in ImageTest colorspace tests
Bug: angleproject:3756
Bug: angleproject:5281
Test: angle_end2end_tests.exe
--gtest_filter=ImageTest*Colorspace*Vulkan
Change-Id: I618ae009e83d0a6b27a0a50165f736784717e404
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2523670
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
55934550
|
2020-11-05T07:13:39
|
|
Vulkan: Don't refresh image views unnecessarily
If the underlying ICD supports VK_KHR_image_format_list
extension we will have created both the linear and sRGB
image views, reuse them instead of refreshing them.
Bug: angleproject:3609
Bug: angleproject:4561
Bug: angleproject:5281
Change-Id: Ie34f08b3554a07f94911bebf925e38d702bc3c36
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2518387
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
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>
|
|
8afe3f17
|
2020-11-03T10:55:31
|
|
Vulkan: Fix use of uninitialized data in staged clears
When depth/stencil data are staged, only the depthStencil field of
VkClearValue is initialized. However, when comparing staged clears,
memcmp is used which also compares the extra bytes in the aliasing color
field.
Bug: chromium:1144491
Change-Id: Ic384ba792e9fd199d8e9c3e534ccdc6ea65ee9b8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2517244
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
6bc362c4
|
2020-10-18T19:09:47
|
|
Allow single threaded CommandProcessor
In replacing the legacy CommandQueue code with the threading
capable CommandProcessor it would be good to be able to run the
CommandProcessor in a single-thread environment. This CL changes the
meaning of the feature flags for the commandProcessor and
asynchronousCommandProcessing so that enabling commandProcess only
changes the code paths to use the command processor but work it still
done as part of the submitting thread (e.g. ContextVk).
Enabling asynchronousCommandProcessing will cause a separate worker
thread to be spawned which will asynchronously process the commands.
This allows us to switch to the CommandProcessor without threading and
then enable threading once performance issues are resolved.
Bug: b/161912801
Bug: b/170329600
Change-Id: I534862b109a7e7708108190b7c3e894071d4c2ed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2483580
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
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>
|
|
2aaeb81d
|
2020-10-06T17:20:29
|
|
Vulkan: loadOp=DONT_CARE + unused D/S => invalidate D/S
If depth/stencil is not loaded, and it's not written to during the
render pass, then treat it as if it was invalidated so storeOp can be
set to DONT_CARE and its corresponding resolve attachment (if any)
removed.
This is especially useful for MSRTT as a resolve attachment is added at
the start of render pass, and this optimization will give it a chance to
undo that if depth/stencil was not actually used in the render pass.
This situation can arise for example if a render pass is created for the
sole purpose of clearing color.
This change includes a bug fix for missing depth/stencil on*Access in
the UtilsVk blit/resolve path.
Bug: angleproject:4836
Change-Id: Ifc8eea3e6ffb3eb4bba19f03d1358f151ec69c44
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2453468
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d9a88d63
|
2020-09-28T17:58:31
|
|
Vulkan: Support OES_texture_cube_map_array extension
Add support for GL_OES_texture_cube_map_array to the Vulkan backend
if the underlying ICD supports creation of of cube array ImageViews
Bug: angleproject:3584
Test: dEQP-GLES31.functional.fbo.color.texcubearray.*
Change-Id: I636cbf347d718abfc1600119b312578370b8e02e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437989
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
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>
|
|
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>
|
|
848ab12d
|
2020-10-08T11:12:05
|
|
Vulkan: DepthStencil layout should use both early and late stages
Vulkan spec 6.1.2 says "Including a particular pipeline stage in the
first synchronization scope of a command implicitly includes logically
earlier pipeline stages in the synchronization scope. Similarly, the
second synchronization scope includes logically later pipeline stages.
However, note that access scopes are not affected in this way - only the
precise stages specified are considered part of each access scope." For
depth stencil layout, both early and late fragment test stages could
access it, thus we should include both in the src and dst stage mask.
Bug: b/169498230
Change-Id: Ifd2f6f7e9947c95248ae400353ae6570912be560
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2461631
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@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>
|
|
22ed1e59
|
2020-10-05T17:59:27
|
|
Vulkan: Remove depth stencil access out of RenderPassDesc
Vulkan spec says that image layout is not counted toward render pass
compatibility:
"Two render passes are compatible if their corresponding color, input,
resolve, and depth/stencil attachment references are compatible and if
they are otherwise identical except for: Initial and final image layout
in attachment descriptions Image layout in attachment references"
This CL removes the depth stencil access mode information out of
RenderPassDesc structure. It is essentially partially reverted the
change from crrev.com/c/2354280
Bug: b/170134600
Change-Id: Iada4d89c3249489b47db3046952e7cb10f252891
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451597
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>
|
|
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>
|
|
50070481
|
2020-10-02T01:03:41
|
|
Vulkan: Render pass creation cleanup
Bug: angleproject:4836
Change-Id: If7b0beef4b32149bebb0f63558ac34d0c3cd79c7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444098
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@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>
|
|
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>
|
|
cd83b608
|
2020-09-18T14:54:54
|
|
Use ImageHelper staging buffers for copyImageDataToBuffer
Revert change from using context staging buffers for
copyImageDataToBuffer. There are scenarios where the
staging buffer will become invalid before flushing
the staged update. Added a test for this case.
Bug: angleproject:5092
Test: angle_end2end_tests --gtest_filter=*ETC1CompressedImageDraws*
Change-Id: I41c457fda919938600c20336f65836952d73748a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2425250
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
6c394220
|
2020-09-09T18:55:48
|
|
Vulkan: Fix bug in compressed texel block computation
When performing a staged update to compressed images,
ensure that the bufferRowLength and bufferImageHeight
is a multiple of the compressed texel block
Bug: angleproject:5017
Test: angle_end2end_test --gtest_filter=*ETC1CompressedImageNPOT*
Change-Id: I54327ec610d1050465d112c7eff385d19dc0c390
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2393754
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
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>
|
|
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>
|
|
cee57483
|
2020-09-09T18:18:07
|
|
GCC: init kImageMemoryBarrierData with initializer constructor
GCC fails to automatically map the initializer assignment for
initializing the angle::PackedEnumMap. So this change adds the
type hint ImageMemoryBarrierData to the second part of the pairs
passed to construct the PackedEnumMap.
GCC error:
./../third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:387:1: error: could not convert ‘{{rx::vk::ImageLayout::Undefined, {"Undefined", ...}}}’ from ‘<brace-enclosed initializer list>’
to ‘const angle::PackedEnumMap<rx::vk::ImageLayout, rx::vk::{anonymous}::ImageMemoryBarrierData>’
387 | };
| ^
| |
| <brace-enclosed initializer list>
Bug: chromium:819294
Change-Id: I314c43c0795e54cabd891205ee935c6354d11658
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2401778
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
c0dda021
|
2020-08-26T11:20:06
|
|
Vulkan: release the ImageHelper's staging buffer after flush
For mutable textures, right now glTexImage call and some of other cases,
we are still using the ImageHelper's staging buffer. This will release
the staging buffer after flush to reduce memory footprint.
Bug: b/164511310
Change-Id: Ie1e52865a1c3a8f235c88331c4bb83c50d3f04da
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378179
Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@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>
|
|
68c8ed7a
|
2020-08-25T22:16:17
|
|
Vulkan: More perf warnings
Perf warnings added in the CPU path for unpack buffers, as well as CPU
readback of images.
Bug: angleproject:3461
Bug: angleproject:4900
Change-Id: I0f716a1ea6110ba8e779903a7d5913d5f6df0ce9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376905
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1ea22c31
|
2020-08-25T20:55:54
|
|
Vulkan: Fix TRex performance regression
TRex invalidates depth but doesn't disable depth before the render
pass ends. The render pass isn't ended, but a storeOp of STORE was
used instead of DONT_CARE, which causes a performance regression.
Bug: b/163854287
Change-Id: Iebd9999ef66c11ff334db3eef2943f58eb2d5053
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2377105
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@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>
|
|
295d2ccd
|
2020-08-24T14:46:31
|
|
Vulkan: Generate perf warnings on suboptimal paths
Using KHR_debug features, this change creates a
performance-warning-generation macro and employs it in a handful of
locations to provide useful feedback to application developers.
The warnings added in this change are not exhaustive.
Bug: angleproject:3461
Bug: angleproject:4900
Change-Id: Id62435d170d90c5be9c1c5cab2d6779ccb58345e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2372628
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
78304b47
|
2020-08-23T00:39:28
|
|
Vulkan: Remove BarrierType
This was only used for one ASSERT, which is changed to use a correlated
variable.
Bug: angleproject:4959
Change-Id: I0eccd2c06c52fcfbff4c533e661735bf1213125d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2371222
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@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>
|
|
ea1bda26
|
2020-08-17T14:21:26
|
|
Vulkan: Name image layouts.
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>
|
|
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>
|
|
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>
|
|
693d0e0b
|
2020-08-07T21:28:08
|
|
Vulkan: Minor cleanup to vk_helpers.
Moves some checks into helper functions. Refactor only.
Bug: angleproject:4959
Change-Id: I08053a96f99baff75eb3954ecbb77e83483eba0f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2343406
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
eb85c021
|
2020-08-05T15:07:15
|
|
Vulkan: Refactor Context CommandBuffer query.
getOutsideRenderPassCommandBuffer returns the command buffer directly
since it's now stateless and cannot throw an error. All the RenderPass
begin/end and flushing are done by the dependency functions (buffer/
image read/write).
Bug: angleproject:4911
Change-Id: I5e7806be9d0e1b5e358524bd485298d660fac942
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2339544
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@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>
|
|
275a495d
|
2020-08-10T16:11:59
|
|
Vulkan: Remove TODO.
Bug: angleproject:3200
Change-Id: Iaa5fb596a29b5488e45dec5636266e24ab4d97b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2347118
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
5921a040
|
2020-08-06T17:39:56
|
|
Vulkan: Refactor image dependency commands.
Uses commands similar to the Buffer APIs. Also updates docs.
Bug: angleproject:4911
Change-Id: I1f2ec9bdd1d725d4ec3d6601e63bcb0c045e2121
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2342287
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
23daea2f
|
2020-08-06T10:40:00
|
|
Vulkan: Rename CommandBuffer get method.
This method will no longer end the RenderPass in a following CL.
Renaming it in a split CL makes the review diff simple.
Bug: angleproject:4911
Change-Id: Id48257884dccb7c86f7de2cc9ca95e651fb68df7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2340788
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
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>
|
|
50442fac
|
2020-08-05T14:15:12
|
|
Vulkan: Fix ImageHelper's move constructor
Bug: angleproject:4913
Change-Id: Ic78a26be4c2f3fa96ef77deffc239dbb7310065e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2339543
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|