|
b6bd039c
|
2020-10-06T13:34:53
|
|
Vulkan: Fine-grained depth stencil layout transition barrier
Gfxbench Manhattan uses depth attachment as texture in the same render
pass, which creates a feedback loop. The layout we are using for this
has kAllShadersPipelineStageFlags even though it only used by fragment
shader. This creates an unnecessary vertex/fragment dependency that
hurts performance on some mobile GPUs. This CL split
DepthStencilReadOnly to DSAttachmentReadAndFragmentShaderRead,
DSAttachmentReadAndAllShadersRead, and DepthStencilAttachmentReadOnly,
so that if it is used by fragment shader, we only barrier against
fragment stage. If not used by any shader, we don't block any shader
stages. To make names consistent, this CL also renames
DepthStencilAttachmentAndFragmentShaderRead to
DSAttachmentWriteAndFragmentShaderRead, renames
DepthStencilAttachmentAndAllShadersRead to
DSAttachmentWriteAndAllShadersRead.
Bug: b/169891513
Change-Id: Iede497e8af028861f9166a32d122f26dc7aa864a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2453599
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
d151af7b
|
2021-05-20T10:52:46
|
|
Vulkan: Improve generateMipmapsWithBlit barrier usage
ImageHelper::generateMipmapsWithBlit() implements glGenerateMipmap using
vkCmdBlitImage. For each level it changes layout to
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL and issue a blit. In order to keep
all mipmap levels' layout consistent, it issues a vkCmdPipelineBarrier
call for the the very last mipmap level to change it to
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL as well. This creates an
unnecessary barrier for the next operation, that now it sees a barrier
against transfer stage. This CL changes all levels to
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL so that the whole image will
have consistent layout. After glGenerateMipmap call, the next reasonable
usage is use it in fragment shader, so the barrier is not wasted.
Bug: angleproject:5986
Change-Id: I3690ae8417d97bc504fcf036d016f289e6370526
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2909757
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
81db1a46
|
2021-05-20T13:45:26
|
|
Vulkan: TextureVk inherits a few attributes from ImageHelper
Cache VkImageCreateFlags in ImageHelper. This allows texture target
siblings to inherit a few VkImage create attributes thus avoiding
image respecification in certain code paths.
Bug: angleproject:2514
Bug: angleproject:5281
Test: PbufferTest.ClearAndBindTexImageSrgbSkipDecode*Vulkan
Change-Id: Ic7397fabdce185264e06488355ca47f809338519
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2910473
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
cf3af29a
|
2021-05-14T16:49:36
|
|
Vulkan: Optimize respecifying an image
When recreating a texture image to change a usage flag or the base/max
levels, this change directly places the levels of the previous image as
updates to the new image. This is instead of copying the image to a
temp one and staging that.
Bug: angleproject:4835
Change-Id: Ibc210b9ff0e8d11cba10b1cd9ab262c8f706cea5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2898417
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
8bd3d7d5
|
2021-05-17T13:45:33
|
|
Vulkan: Fix a bug releasing DynamicBuffer-owned buffer
There was one instance of BufferVk releasing a buffer it had allocated
from a DynamicBuffer. This shouldn't have happened as the DynamicBuffer
owns the buffers.
Bug: angleproject:5720
Change-Id: I435512f4bb099130126bf3efb48a238fcd9f3ddb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2896168
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
9c262ad0
|
2021-05-14T12:26:48
|
|
Vulkan: Cleanup texture image respecify
Prior to this change, respecifying a texture image due to usage, base or
max level changes incurred a copy of every level and layer to a
temporary buffer which was then staged as an update to the new image.
This code was somewhat messy (for example with respect to depth/stencil
images), error prone (e.g. previously had bugs with compressed textures)
and disallowed further optimizations such as in anglebug.com/4835.
This change does the following:
- ImageHelper::SubresourceUpdate now takes ref-counted images, instead
of image pointers. This allows the same image to be staged for
multiple updates.
- Respecifying an image is still done through a copy, but to an
identical (temp) image instead of buffer, and each level of the image
is staged as an update.
* Further optimization is to stage the old image itself directly as
updates to the new image
Bug: angleproject:4835
Change-Id: I4a3ef2d616c9ab459ff65f918b0fb6d9a2161b73
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897537
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
e354ff1a
|
2021-03-05T04:07:21
|
|
Vulkan: Allow DynamicBuffer suballocation in BufferVk
When allocations are made from DynamicBuffer, they suballocate from a
possibly larger BufferHelper. In BufferVk, the offset of the
suballocation was discarded, which limited the use of DynamicBuffer to a
pool of small buffers.
This change applies any such offset that may arise from suballocations
everywhere, and makes BufferVk use a larger buffer size when the
GL_DYNAMIC_* buffer usage hints are provided.
Bug: angleproject:5719
Change-Id: I3df3317f7acff1b1b06a5e3e2bb707616a7d0512
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2738650
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
46a139ad
|
2021-05-06T11:20:51
|
|
Vulkan: set DS layout before using it in the endRenderPass
In CommandBufferHelper::endRenderPass(), we are checking depth stencil's
initialLayout to change storeOp to None if the layout is read only. But
the layout was set after that check, which essentially voids the
optimization. This CL moves the finalizeDepthStencilImageLayout() call
before the layout is used.
This CL also moves the depth stencil loadOp/storeOp to a new function
finalizeDepthStencilLoadStoreOp(). When depthImage gets deleted before
renderpass ends, we could also apply the same load/store optimization
just like we did at endRenderPass() time.
Bug: b/187425444
Change-Id: I89814274352f09cbf1f7b58a91bbaf131b983fb1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2877933
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
84d22197
|
2021-04-26T17:11:27
|
|
Vulkan: Add device local fallback in findCompatibleMemoryIndex(...)
When finding a compatible memory index for an external buffer,
we need to have a fallback path that requires just the
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT property.
Bug: angleproject:5909
Change-Id: Id3faffb3e357be2e5e6f5fce9e64f0f2889d199a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2862561
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
ccc0fbaa
|
2021-03-24T17:56:38
|
|
Vulkan: Related fixes for buffer descriptor set cache.
Includes some stats counter gathering and a few related refactors and
cleanups. Also includes a new overlay widget.
Bug: angleproject:5736
Change-Id: Ida8d2cd815c5b598c6a442dd9bbfdf51e9c05180
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2785431
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
84b31c03
|
2021-04-25T08:30:14
|
|
Vulkan: Fix bug in VkImageFormatListCreateInfoKHR
On some vendors VVL throws the following error, snippet only -
[ VUID-VkImageViewCreateInfo-pNext-01585 ] Validation Error
...
image was created with a VkImageFormatListCreateInfo in pNext of vkImageCreateInfo,
but none of the formats match the VkImageViewCreateInfo::format
...
The Vulkan spec states: If a VkImageFormatListCreateInfo structure was included in
the pNext chain of the VkImageCreateInfo structure used when creating image and
VkImageFormatListCreateInfo::viewFormatCount is not zero then format must be one of
the formats in VkImageFormatListCreateInfo::pViewFormats.
It looks like VkImageFormatListCreateInfoKHR::pViewFormats needs
to contain all formats including the format of the VkImage itself.
Bug: angleproject:5281
Change-Id: I93c6900d99791ef4f9f116cb114f068e0a318bf4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2849566
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
fb288312
|
2021-04-12T12:38:03
|
|
Vulkan: Consolidate mReadOnlyDepthStencilMode to mRenderPassUsageFlags
Since now ImageHelper object has a mRenderPassUsageFlags tracking how it
is been used by current RenderPassCommands, we can consolidate
mReadOnlyDepthStencilMode into a bit in the mRenderPassUsageFlags. The
read only mode is just a special attachment mode, so this makes code
more consistent and able to get rid of the extra dword for
mReadOnlyDepthStencilMode.
Bug: b/181797383
Change-Id: Ie9b7be1c18c392e5b2712bdae6ab6506de8d6d34
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2821942
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>
|
|
5eac3169
|
2021-04-09T15:54:11
|
|
Vulkan: Support sample/render to depth texture with different LOD
Previously we supported read only depth attachment that attachment and
sample are using the same texture. It was always assuming it will be
read only if the same texture is attached to FBO and same time bound to
texture unit. But we never supported if it actually writing to depth
texture, but at the different level with sampling. This is supported
OpenGL operation as long as the levels render to is outside [base_level,
max_level]. Later on, we added support of the above operation, but
limited to color buffers. This CL extends the same support of render and
sample to the same depth texture with non-overlapping levels. Android
game black desert mobile is running into this usage case.
Bug: b/181797383
Change-Id: I7ee1d52f27603f933102ad1b098684309449c406
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2819487
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
92d3912d
|
2021-04-01T10:49:14
|
|
Vulkan: Remove maxLevel and immutable from ImageHelper::initExternal
Now that we have removed mBaseLevel and mMaxLevel from ImageHelper class
in previous two CLs. The initExternal function can be modified to not
pass in base/max level information. This CL also removes immutable from
argument and let caller directly pass in firstLevel to it.
Bug: b/181800403
Change-Id: I595c1faffabc7582af35a9578b2ecdf00c39207f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2800414
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
afd32d8e
|
2021-03-30T15:50:57
|
|
Vulkan: Remove mMaxLevel from ImageHelper class
This CL removes mMaxLevel from ImageHelper class. Instead, it now uses
front end's max level information when possible.
Bug: b/181800403
Change-Id: Ie0f6bd11e3ca0d4ddfc98f21261396c4d71b7140
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2796153
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
08b7c55c
|
2021-03-30T13:51:04
|
|
Vulkan: Remove mBaseLevel from ImageHelper class
This removes mBaseLevel from ImageHelper class. With the
mFirstAllocatedLevel tracking exactly which GL level has been allocated,
this cached mBaseLevel is no longer needed.
Bug: b/181800403
Change-Id: I99d66c93b0c8f1bd20a5811b51f512a27927201e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2795275
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b5a71140
|
2020-08-20T17:24:21
|
|
Vulkan: Make storage actually immutable for immutable textures
The immutable textures are intended to be "immutable". Right now we are
still re-allocating VkImage object based on base_level and max_level.
This causes a problem for rendering to a level that is beyond
[base_level, max_level], which is totally within OpenGL spec. This CL
makes an immutable texture always allocate from 0 to max levels that are
specified by a glTexStorage call. Changing base_level will not trigger
re-allocation of VkImage object.
Bug: b/181800403
Change-Id: I4b4ddea17b7f6f7bfd8f36bfe8bb3a35b5c180b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2368038
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
fd3b8faf
|
2021-03-30T11:55:49
|
|
Vulkan: Split fragment shader from ColorAttachmentAndAllShadersRead
Even though it is not common usage case that the same texture is used as
attachment and texture, but aztec ruins is using it. And earlier version
of gfxbench's T-Rex also running into this. So performance is still
important. This CL splits the texture from fragment shader usage case
out so we can have lighter barrier.
Bug: angleproject:5780
Change-Id: Ifdcbfe24488fdac62826c5af6ecfbb05f87c0499
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2795269
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
81432c24
|
2021-03-19T14:03:02
|
|
Vulkan: Rename onImageHelperRelease to finalizeImageLayout
Make the API name reflect what it does. With recent changes, this get
called from places that are not releasing ImageHelper object, but is try
to reference the current layout. This new name makes more sense than
onImageHelperRelease (at that time when this API was introduced, it was
only called when ImageHelper is being released).
Bug: b/175584609
Change-Id: Ie5f5fcdbd97436724d7eb016374d8b4178e7ba1d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2776261
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
867411a4
|
2021-03-08T19:08:14
|
|
Vulkan: Track images used for both attachment and sampler
This CL adds a new layout ImageLayout::ColorAttachmentAndShaderRead. We
detect that the same ImageHelper object is used for both sampler and
attachment and will pick this new layout instead of ColorAttachment.
Bug: b/175584609
Change-Id: I2089f59d4dc1ad4de7edab0e067797adcfa9b020
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2749479
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
da437f26
|
2021-03-08T19:08:14
|
|
Vulkan: Defer color image layout changes at endRenderPass time
Right now color render target's image's layout change are done at
beginRenderPass time. The problem is that the layout also depends on
whether texture is also being used as a sampler or not. That information
is not known when renderpass starts. We did some special treatment for
depth stencil attachment so that its layout determination is deferred
until endRenderPass time. This CL expands that same mechanism to color
attachment as well. Right now the color attachment will still pick the
same ImageLayout::ColorAttachment layout since the logic to detect it is
also used for texture sampling is not there yet.
Bug: b/175584609
Change-Id: Id7486174d475f894461578b31d0d40fdd90e808a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2744121
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
378b3261
|
2021-03-08T18:50:53
|
|
Vulkan: Move CommandBufferHelper::reset() closer to constructor
This is a mechanical change. Similar to constructor, the reset()
function is doing initialization of data members. Move them next to each
other helps adding a new data members which requires modifications to
both functions.
Bug: b/175584609
Change-Id: I11386677bc5c9838104025d6a4ecf6f2b58fa92c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2745842
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
81dcf078
|
2021-03-08T11:21:31
|
|
Reland "Vulkan: Support EXT_sRGB_write_control"
This is a reland of 6073af536cf627742696823edc82c9b0a481a8bc
with 2 changes -
1. Don't enable the extension even in nonConformant mode
2. Don't enable VK_KHR_image_format_list for swiftshader
Original change's description:
> Vulkan: Support EXT_sRGB_write_control
>
> Implement support for EXT_sRGB_write_control. This extension
> requires VK_KHR_image_format_list to be supported.
>
> The spec requires this functionality to work with glBlitFramebuffer
> as well but support for that will be added in a follow up change.
> As such, this extension is only exposed in non-conformant mode.
>
> Bug: angleproject:5075
> Tests: SRGBFramebufferTest.*Vulkan*
> Change-Id: I59b38f6cd810a3d0d67ec29f4f19c25f65f70862
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2617243
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:5075
Change-Id: I8e149d196a39c3c4769bfa8690792f3c53831299
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2762647
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
b27740f3
|
2021-03-09T16:15:15
|
|
Revert "Vulkan: Support EXT_sRGB_write_control"
This reverts commit 6073af536cf627742696823edc82c9b0a481a8bc.
Reason for revert: crbug.com/1186140
Original change's description:
> Vulkan: Support EXT_sRGB_write_control
>
> Implement support for EXT_sRGB_write_control. This extension
> requires VK_KHR_image_format_list to be supported.
>
> The spec requires this functionality to work with glBlitFramebuffer
> as well but support for that will be added in a follow up change.
> As such, this extension is only exposed in non-conformant mode.
>
> Bug: angleproject:5075
> Tests: SRGBFramebufferTest.*Vulkan*
> Change-Id: I59b38f6cd810a3d0d67ec29f4f19c25f65f70862
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2617243
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:5075,chromium:1186140
Change-Id: Ib0d4d60fe7434fb950f99db2c210aab9af7d2d0e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2743663
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
|
|
6073af53
|
2021-03-08T11:21:31
|
|
Vulkan: Support EXT_sRGB_write_control
Implement support for EXT_sRGB_write_control. This extension
requires VK_KHR_image_format_list to be supported.
The spec requires this functionality to work with glBlitFramebuffer
as well but support for that will be added in a follow up change.
As such, this extension is only exposed in non-conformant mode.
Bug: angleproject:5075
Tests: SRGBFramebufferTest.*Vulkan*
Change-Id: I59b38f6cd810a3d0d67ec29f4f19c25f65f70862
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2617243
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
e366e2c3
|
2021-02-27T01:00:02
|
|
Vulkan: Keep dynamic buffer's free list trimmed
ContextVk's staging buffer never gets a chance to free its free buffer
list. During application load time, a large amount of memory may be
allocated from this buffer to stage texture updates and they would
remain throughout the life of the application.
This change ensures that the free buffer list doesn't grow unbounded. In
the Manhattan trace, this saves >1GB of memory on Linux.
There are now three policies for vk::DynamicBuffer:
- Always reuse buffers: This is useful for dynamic buffers that make
frequent small allocations, such as default uniforms, driver uniforms,
default vertex attributes and UBO updates.
- Never reuse buffers: This is for situations where the buffer is
unlikely to be used after some initial usage, such as texture data
upload or vertex format emulation (as the conversion result is cached,
so it's never redone).
- Limited reuse of buffers: For the staging buffer in the context which
is shared by all immutable texture data uploads, it's useful to keep a
limited number of buffers (1 in this change) to support future texture
streaming while allowing a large number of buffers allocated in a
burst to be discarded.
Bug: angleproject:5690
Change-Id: Ic39ce61e6beb3165dbce4b668e1d3984a2b35986
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2725499
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
58c35d42
|
2021-03-02T09:00:55
|
|
Vulkan: Unmap buffer when adding to mBufferFreeList
The commit b5af8bde13 moved the unmap call on a buffer to
when it is placed in mBufferFreeList. There was one place
that was missed, rectifying that oversight here.
Bug: angleproject:5689
Change-Id: Iaed2916de374d55ab59276e2679c23ed7ef9c4e8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2733476
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d8557cc8
|
2021-03-03T10:17:46
|
|
Fix for readPixels() to PBO fast path.
Include the "pixels" (data) pointer as offset.
Bug: angleproject:5702
Change-Id: Idc9f3ee4c0dbb1cc9308393bbf877d6137598486
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2732789
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
|
|
07025aa3
|
2021-03-02T00:28:32
|
|
Overlay: Widget for vk::DynamicBuffer allocations
Bug: angleproject:5690
Change-Id: Idfa591903627bbebffe306b387e95cbec1195338
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2725767
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b5af8bde
|
2021-02-24T09:47:43
|
|
Vulkan: No need to unmap buffer when adding to mInFlightBuffers
When we move a BufferHelper to the mInFlightBuffers list
don't try to unmap it there, instead do that when it gets added
to mBufferFreeList
This removes 0.75% CPU overhead from a Manhattan30 offscreen run
Bug: angleproject:5689
Change-Id: I01a52cdf4803fb8364140b01bedbd3d0e6cc61fd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2723492
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
3013f27c
|
2021-02-23T22:37:42
|
|
Vulkan: Fix missing visibility barrier for glReadPixels
glReadPixels uses a temporary buffer for readback and was missing an
onBufferTransferWrite() call.
Bug: angleproject:5669
Change-Id: I3c6daba176e332711fa1ab51e279526717486dd0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2717005
Reviewed-by: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
4a24786e
|
2021-02-23T23:32:48
|
|
Vulkan: Fix PBO read pixels with unaligned output pitch
Vulkan takes the output pitch in texels instead of bytes in
VkBufferImageCopy::bufferRowLength. This means that it's impossible to
use vkCmdCopyImageToBuffer when the pitch is not a multiple of texel
size. This change makes sure the fallback path is taken.
Bug: angleproject:5667
Change-Id: I3f2ef312bb8288de8ca3c6730d85a3c14858812e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2717006
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
e96d1744
|
2021-02-12T14:14:02
|
|
Vulkan: Optimize glMemoryBarrier
Previous to this change, glMemoryBarrier was processed as it is issued.
This made it impossible to know whether a draw call would follow or a
dispatch call, and what resources it would use. The render pass was
conservatively broken due to this limitation. To address this
limitation, handling of glMemoryBarrier is deferred until the next
draw or dispatch call.
Note that glMemoryBarrier acts as two barriers:
- An execution+memory barrier: shader writes are made visible to
subsequent accesses
- Another execution barrier: shader accesses are finished before
subsequent writes
An important observation is that for most resources, ANGLE actually
necessarily has to issue memory barriers automatically to conform with
Vulkan. In terms of memory barrier thus, ANGLE already does the right
thing except for when there's no binding change. This means WaW hazards
(i.e. storage buffer and image writes) with no binding change require a
memory barrier as a result of glMemoryBarrier. In all other cases, it's
enough for glMemoryBarrier to break the render pass if necessary and
ensure that corresponding bindings are marked dirty (for the execution
or memory barriers to happen automatically later).
Bug: angleproject:5070
Change-Id: Ide359c43362f8a78805ecf797a91de7aa79221f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2693473
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
4afd0f27
|
2021-02-17T13:35:57
|
|
Vulkan: Add VK_KHR_image_format_list support to initExternal
The code for initializing a VkImage with VK_KHR_image_format_list
extension support is now internal to initExternal. Also provides a flag
to inform callers when VK_KHR_image_format_list support is enabled.
Bug: angleproject:5520
Change-Id: Ie2ade93d1403ab3f9cbcf7d80684bbca201d5d8d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2702159
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
e8c0aa81
|
2021-01-26T23:40:36
|
|
Vulkan: Clean up transform feedback extension pause/resume
1. The xfb counter buffer barrier issued was wrong, following a typo in
the spec. This barrier is now correctly issued using the usual
barrier APIs.
2. A mechanism was added to automatically pause/resume transform
feedback when a program pipeline needs to be rebound. This is
incorrect as it misses the xfb counter buffer barrier. The render
pass is broken instead if transform feedback is active/unpaused and
the program pipeline is changed.
3. The transform feedback counter buffers are now disposed of when
transform feedback is ended. This avoids an unnecessary barrier that
this change would have otherwise incurred (and hence render pass
break) in Manhattan which repurposes the same transform feedback
object.
Bug: angleproject:5528
Change-Id: I1ffe8b4b8975645ba43afd70e9cdbb0765529da5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2651647
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
60b03e62
|
2021-02-16T14:31:19
|
|
Create getRotatedExtents() and related methods
Created:
- WindowsSurfaceVk::getRotatedWidth()
- WindowsSurfaceVk::getRotatedHeight()
- RenderTarget::getRotatedExtents()
- ImageHelper::getRotatedExtents()
- ImageHelper::getRotatedLevelExtents2D()
Note: The FramebufferVk class doesn't use any of these methods
Bug: b/175793022
Change-Id: I64395688bfdb172d32853763743fc5f266a6b792
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2686102
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
2b69462e
|
2021-02-12T15:55:00
|
|
Vulkan: Consolidate image format list initialization code
HardwareBufferImageSiblingVkAndroid, RenderbufferVk, SurfaceVk
and TextureVk all had similar code to initialize VkImage with
VK_KHR_image_format_list extension support. Consolidate all of
them into a helper.
Bug: angleproject:5520
Change-Id: Ib7ac582a35a26c0da15879e688bcaf0c2a92ea87
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2692641
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
79ae52dd
|
2021-02-11T14:18:41
|
|
Vulkan: Fix missing visibility barrier for host-visible buffer writes
See https://chromium-review.googlesource.com/c/angle/angle/+/1661252 for
context. This was accidentally broken during the command graph rework.
This will eventually be validated by syncval. See
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/2329.
Bug: angleproject:5070
Change-Id: Ic16fa900e554d46e54b42fc3fbe0f96d5327fa0f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2689379
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
031dd5c5
|
2021-02-11T14:56:43
|
|
Vulkan: Add fast path for pack buffer copies
When vkCmdCopyImageToBuffer is possible, it is used to implement
glReadPixels with PBO instead of a CPU readback.
A few tests are added to verify synchronization between pack/unpack and
compute shader writes.
Bug: angleproject:5070
Change-Id: Ia5da0feb31348f6b52d164b973ff95e2a0510582
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2691466
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
ce540d8c
|
2021-02-01T17:38:10
|
|
Create MSAA-swapchain windows' VkImages differently
The actual VkImage needs to have rotated extents, but the ImageHelper
needs to have non-rotated extents in order for the rest of ANGLE's
pre-rotation to work.
Bug: b/175793022
Change-Id: I6fa25ab8c636886787ac50b194e566111308f30b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2666514
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
c6a8bc4a
|
2021-01-30T14:58:22
|
|
Fix a crash in DynamicBuffer::~DynamicBuffer()
The crash is because mBufferFreeList is not moved from the rhs
value for DynamicBuffer's move constructor.
Bug: chromium:1170339
Change-Id: I7d41b775ab56af8fa9412369d5a4008f59da3053
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2661615
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
eae262e7
|
2021-01-27T13:56:49
|
|
Vulkan: Fix image layout barriers for tessellation shaders
Also fixes a bug where invalid stages may be specified for example if
AllGraphicsReadOnly or DepthStencilReadOnly layouts are used and
geometry or tessellation shaders are not supported by the
implementation.
Bug: angleproject:5557
Change-Id: Ia25a6aec8138c67701c63da65783263d8a7bda27
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2653911
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
122a1cc5
|
2021-01-26T20:06:24
|
|
Fix several vulkan backend problem on Android.
* Load AHardwarebuffer API dynamically, so vulkan backend can be
built with old NDK, but can work with newer android releases.
* Do not link with libvulkan on android.
* Expose EGL_ANDROID_get_native_client_buffer extension with vulkan
backend.
Bug: chromium:1170339
Change-Id: Idf7f6867a86ae40ba6d57a86e419c610ba404ba8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2653506
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
|
|
e357cc6f
|
2021-01-14T14:47:02
|
|
Revert "Vulkan: Prefer host cached memory for Buffers"
This reverts commit 326f128b941d54c0277178f87e784da8ce2190eb.
Reason for revert: Fails of Mali platform. See bug:
Bug: angleproject:5544
Original change's description:
> Vulkan: Prefer host cached memory for Buffers
>
> This improves perf because vertex data upload uses host visible memory,
> and uncached memory can be slow.
>
> Test:
>
> Android on Windows with 1080Ti:
> glmark2 [build] vbo=false 265 -> 3900 fps
>
> Bug: angleproject:5515
> Change-Id: Ib75582bbdb4ca4a22d3a121c7b477a23a8a809ef
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2615742
> Commit-Queue: Lingfeng Yang <lfy@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
TBR=geofflang@chromium.org,lfy@google.com,doughorn@google.com,timvp@google.com,jmadill@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:5515
Change-Id: I59695b1981b43471dbd309d4e859bae7a4821969
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2627604
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
8db7915e
|
2021-01-12T10:56:47
|
|
Vulkan: Increment buffer view serials only when used
This avoids the texel buffer view serials (shared with image view
serials) recklessly getting large.
Bug: angleproject:5185
Change-Id: I0debe73771094b395f6526475aa3c22a91f9e05e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2623811
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2e9706d8
|
2021-01-08T17:29:42
|
|
Vulkan: Use angle::FormatID instead of VkFormat.
This change switches the internal enums we pass around from VkFormat
to FormatID. The end goal of the refactor is to allow the Vulkan
back-end to store packed tables indexed by FormatID. Because VkFormat
has large gaps in its enum space we'd otherwise need to use unordered
data structures like unordered_map.
The change removes the redundant VkFormat storage from vk::Format and
uses a new table query to return the VkFormat that 1:1 matches an
angle::FormatID. We also include a reverse mapping for use with native
Vulkan get functions for Android.
Also moves sRGB conversion functions into renderer_utils. A couple
sRGB formats that don't exist in GL are no longer handled by the sRGB
conversion functions. These formats should be extremely rare.
Bug: angleproject:5438
Change-Id: Id8b49773ca0c556f9f5a6a10fcf0d9762b93bbea
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2618204
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
326f128b
|
2021-01-07T14:25:44
|
|
Vulkan: Prefer host cached memory for Buffers
This improves perf because vertex data upload uses host visible memory,
and uncached memory can be slow.
Test:
Android on Windows with 1080Ti:
glmark2 [build] vbo=false 265 -> 3900 fps
Bug: angleproject:5515
Change-Id: Ib75582bbdb4ca4a22d3a121c7b477a23a8a809ef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2615742
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
f99ccb08
|
2021-01-06T23:29:21
|
|
Vulkan: Add a perf warning when dropping superseded updates
If an update to an image subresource is entirely superseded by a
following update, the former update is dropped. This change adds a perf
warning for this.
Bug: angleproject:3461
Change-Id: Iaf4984ba52f3dfc86d5cc87f8be82123badebd04
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2613203
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a7158eb5
|
2021-01-06T21:33:24
|
|
Vulkan: Fix image leak in staged updates in ImageHelper
When removing superseding updates, the superseded update was not
released, causing a memory leak. This change also makes
SubresourceUpdate non-copyable and correctly implements the move
assignment operator such that swap between different update types are
correct. As a result, the destructor can now ASSERT that the image is
not leaked.
Bug: chromium:1146516
Bug: chromium:1163354
Change-Id: I7531c91d8559c23b2e09159118fe645d12fc601f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2613201
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
e91097bf
|
2020-12-29T14:05:56
|
|
Vulkan: Clean up "actual"/"intended" naming.
Clarifies that the GL internal format is an "intended" format
and the Vulkan formats are "actual" formats. This makes all the format
fields use the same consistent naming pattern.
Bug: angleproject:5438
Change-Id: I935a49895109e9e06eae5ef98d5614dfd1128ff8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2605728
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
98b56e60
|
2020-12-12T16:28:21
|
|
Vulkan: Accumulate internal cache stats in renderer
The CacheStats of all internal caches are accumulated
by the renderer.
In order to see the hit ratios of all caches, the
following GN args must be enabled:
is_debug = true
angle_enable_perf_counter_output = true
Bug: angleproject:5447
Test: Manual verification with angle_end2end_tests
Change-Id: Iaca3249192e9e4e130d8291b7759c459d79b06ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2588430
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
56330564
|
2020-12-10T00:46:04
|
|
Vulkan: Support layered framebuffers
This feature is introduced by geometry shaders, where all the layers of
a texture can be attached to a framebuffer. The geometry shader would
use gl_Layer to decide which layer the primitive should be rendered to.
Bug: angleproject:3571
Change-Id: Ib2ae8e227b226295f9e2f62f6b230839070bc95c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2582711
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
067a12f0
|
2020-11-19T16:47:25
|
|
Reland "Vulkan: Use specialization constant for halfRenderAreaWidth"
This is a reland of ff38106d62fca2e36ec2db1cd580b546fd53ae43
Original change's description:
> Vulkan: Use specialization constant for halfRenderAreaWidth
>
> halfRenderArea is used by fragment shader to adjust gl_FragCoord for
> rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
> shader via specialization constant, thus allow compiler to consolidate
> the calculation into one MAD instruction.
>
> Bug: b/173800146
> Change-Id: Id66301278e3389e2582369b695825e632bccecee
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Bug: b/173800146
Change-Id: Ifc36086f4c5d6a44fb5456aa6e31bc8a783bba71
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2579648
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f691b3b5
|
2020-12-02T13:11:54
|
|
Vulkan: Support PrimitivesGenerated query
This query uses the Vulkan transform feedback extension. In GL,
GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN and GL_PRIMITIVES_GENERATED
queries can be independently begun/ended. However, Vulkan requires that
queries from pools of the same type can only be active one at a time.
This forbids the two GL queries from being handled by two VK queries
when they are simultaneously begun.
This change makes these queries share their QueryHelper objects. The
Vulkan transform feedback queries unconditionally retrieve both results
anyway, so this is just a matter of making sure the two GL queries are
merged as one when they are simultaneously used.
The change fixes a number of issues as collateral:
- TransformFeedbackPrimitivesWritten queries when !emulated were not
released
- Stashed queries were never released
- If no render pass is open when a query ends, then getResult(no_wait)
ended up waiting
Bug: angleproject:5404
Change-Id: I8ce13ea76ffd31b3152ded7c713c6466d0315504
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2573580
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
aafcb504
|
2020-12-08T09:32:10
|
|
Vulkan: Add ensureSubmission to queueSubmitOneOff
Some callers of queueSubmitOneOff require that the command being queued
to have been sent to the GPU. The new ensureSubmission parameter
indicates that behavior and when running with threaded worker will wait
for the worker queue to empty before returning.
Bug: b/170312581
Change-Id: Ib620fb37f4b9b4431451ccbd10807c0dff1842af
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2579041
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
bcdd4e58
|
2020-11-03T13:33:44
|
|
Vulkan: Fix validation errors with YUV
Had several validation errors with YUV ImageTests using Vulkan back-end.
This corrects those issues and tests now pass.
Initializing YUV AHardwareBuffers requires Android API 29. The CI bots
are not yet to Android 29 so this must be tested locally by compiling
with the appropriate api level in args.gn:
android32_ndk_api_level = 29
android64_ndk_api_level = 29
Test:
ImageTestES3.SourceYUVAHBTargetExternalRGBSampleInitData
Note: Some tests can run at api 26:
ImageTestES3.ClearYUVAHB
ImageTestES3.YUVValidation
Bug: angleproject:4852
Bug: b/172649538
Bug: b/175021871
Change-Id: I383d24faa9911f77a71bd9b764232ad519b54e9a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2530454
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
1ad5791d
|
2020-12-03T22:05:51
|
|
Revert "Vulkan: Use specialization constant for halfRenderAreaWidth"
This reverts commit ff38106d62fca2e36ec2db1cd580b546fd53ae43.
Reason for revert: Suspect that this CL may be causing win-angle-rel-32 bot failures
Original change's description:
> Vulkan: Use specialization constant for halfRenderAreaWidth
>
> halfRenderArea is used by fragment shader to adjust gl_FragCoord for
> rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
> shader via specialization constant, thus allow compiler to consolidate
> the calculation into one MAD instruction.
>
> Bug: b/173800146
> Change-Id: Id66301278e3389e2582369b695825e632bccecee
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: b/173800146
Change-Id: I7bc9966ebbe949f3999d7927afa629dd2e3a4187
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2572801
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
2c8bc1b7
|
2020-11-26T16:06:24
|
|
Vulkan: Clean up render pass query code
In preparation for support of primitives generated queries.
Bug: angleproject:5404
Change-Id: Ic123aaff33f8903994ff8fcc9158954ac023ec13
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2562126
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
720b85e6
|
2020-12-01T20:45:29
|
|
Reland "Vulkan: Use specialization constant for halfRenderAreaWidth"
This reverts commit b1917fe1a314709cd9f7f53b2923d6be0e8bbf6c.
Reason for revert: Not the root cause. See bug.
Original change's description:
> Revert "Vulkan: Use specialization constant for halfRenderAreaWidth"
>
> This reverts commit ff38106d62fca2e36ec2db1cd580b546fd53ae43.
>
> Reason for revert: Speculative revert to clear up AMD. See bug.
>
> Bug: chromium:1154356
>
> Original change's description:
> > Vulkan: Use specialization constant for halfRenderAreaWidth
> >
> > halfRenderArea is used by fragment shader to adjust gl_FragCoord for
> > rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
> > shader via specialization constant, thus allow compiler to consolidate
> > the calculation into one MAD instruction.
> >
> > Bug: b/173800146
> > Change-Id: Id66301278e3389e2582369b695825e632bccecee
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
> > Commit-Queue: Charlie Lao <cclao@google.com>
> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Tim Van Patten <timvp@google.com>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
>
> TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
>
> Change-Id: Idab612bcad4f179857c41ffc4bf8fa2355fae946
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: b/173800146
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568244
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
# Not skipping CQ checks because this is a reland.
Bug: chromium:1154356
Bug: b/173800146
Change-Id: I5b86bbee8600c6597620f31d8d7b08ca8b3d2d57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568246
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b1917fe1
|
2020-12-01T20:42:36
|
|
Revert "Vulkan: Use specialization constant for halfRenderAreaWidth"
This reverts commit ff38106d62fca2e36ec2db1cd580b546fd53ae43.
Reason for revert: Speculative revert to clear up AMD. See bug.
Bug: chromium:1154356
Original change's description:
> Vulkan: Use specialization constant for halfRenderAreaWidth
>
> halfRenderArea is used by fragment shader to adjust gl_FragCoord for
> rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
> shader via specialization constant, thus allow compiler to consolidate
> the calculation into one MAD instruction.
>
> Bug: b/173800146
> Change-Id: Id66301278e3389e2582369b695825e632bccecee
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Change-Id: Idab612bcad4f179857c41ffc4bf8fa2355fae946
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/173800146
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568244
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
e56fd224
|
2020-12-01T09:44:38
|
|
Vulkan: Fix BufferHelper leaks in DynamicBuffer.
We were leaking BufferHelper pointers in a couple cases. Fix these
systematically by using a unique_ptr template.
This leak was detected running ANGLE with LSAN enabled.
Bug: angleproject:5377
Change-Id: I30ab235105cf74fae2cfc62a22dde534e2d07e81
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2567641
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
ff38106d
|
2020-11-19T16:47:25
|
|
Vulkan: Use specialization constant for halfRenderAreaWidth
halfRenderArea is used by fragment shader to adjust gl_FragCoord for
rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
shader via specialization constant, thus allow compiler to consolidate
the calculation into one MAD instruction.
Bug: b/173800146
Change-Id: Id66301278e3389e2582369b695825e632bccecee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
bccaaffd
|
2020-11-27T16:33:09
|
|
Vulkan: Use XFB queries with the XFB extension.
This will enable accurate XFB primitive counts when using tessellation
and geometry shaders. Adds new vk::QueryResult and gl::QueryTypeMap
helper classes.
Based on contributions by Mohan Maiya (m.maiya@samsung.com).
Bug: angleproject:3572
Change-Id: Ie3f496deda887c13bb4ad7ab430e31d615849bfd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2564002
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
|
|
a5da17cd
|
2020-11-26T17:09:37
|
|
Vulkan: Remove vk:: inside namespace vk
Bug: angleproject:5404
Change-Id: I51df1ad69a65b17621a3cbe4e5d55621cc9ae6ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2562683
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
5850c748
|
2020-11-20T22:14:27
|
|
Vulkan: Emulated RGB copies in compute
The copy between emulated RGB formats can take a number of paths:
- Sample from src (reinterpreted as UINT), output to dst
- Sample from src, output to temp buffer, copy to dst
- Copy src to temp buffer, output to dst
- Copy src to temp buffer, convert to another temp buffer, copy to dst
While directly sampling from src and outputting to dst is more
efficient, these are not always possible. The former may not have
SAMPLED_IMAGE usage bit for the reinterpreted UINT format, and the
latter may not have STORAGE_IMAGE usage at all.
This change takes the universal approach of using two temp buffers. The
ConvertVertex shader is used to transform between RGB and RGBA when
copying from the first temp buffer to the second.
Bug: angleproject:5278
Change-Id: I63d916cfdb4c389f5b817d89cd7348fdea703ce5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2556467
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Schade <b.schade@samsung.com>
|
|
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>
|