|
83a670ab
|
2021-10-29T09:12:26
|
|
Vulkan: Implement BufferPool using VMA's virtual allocator
VMA's allocation calls used to be sub-allocating a pool of memory. What
we really want is sub-allocate a VkBuffer object. VMA recently added
support to expose the underlying range allocation algorithm via APIs,
which user can use it to sub-allocate any object. This CL uses that new
virtual allocation API to sub-allocate from a pool of VkBuffers.
In this CL we only switched BufferVk::mBuffer to sub-allocate from the
BufferPool object.
Bug: b/205337962
Change-Id: Ia6ef00c22e58687e375b31bc12ac515fd89f3488
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3266146
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
55840e90
|
2021-12-03T15:24:00
|
|
Vulkan: Fix deferred flush vs UtilsVk
Take the following scenario:
1. Draw
2. Flush (this is deferred)
3. Get image view (this is retain()ed)
4. Pass view to a draw-based UtilsVk function
5. Flush
6. Delete image view
At step 4, UtilsVk may start a new render pass and use the image view
from step 3. Since the flush at step 2 is deferred, it will be
performed at this step, and so the serial of the image view is set to
the previous submission.
When step 4 uses this view, it doesn't retain it. Step 5 submits the
new command buffer using this image view.
At step 6, if the previous submission has finished, it will destroy the
view immediately even though it's in use by the new submission.
One solution could have been to make sure render pass closure
originating from UtilsVk doesn't incur a flush. However, due to the
current design where the render pass is immediately recorded in
RendererVk's primary command buffer, it's possible that an unrelated
context would perform the flush anyway.
This change makes sure instead that the render pass is closed before any
views are allocated/retained to be used by UtilsVk.
Bug: chromium:1272266
Change-Id: I5bdefb34e03c368511c4c174cf7965fda158d2b8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3315976
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
17261f3b
|
2021-11-29T19:53:39
|
|
Remove not needed constexpr definitions, deprecated in C++17
Bug: angleproject:6737
Change-Id: I38ead1bd8e5eaace78750505b93a2576e19d0f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3307535
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
dbc0c646
|
2021-11-06T01:09:26
|
|
Vulkan: Output the reason for RP closure in command buffer
To make it easier when viewing the command buffer in a graphics
debugger, this change inserts a marker just before closing the render
pass that specifies why the render pass was closed.
Bug: angleproject:2472
Change-Id: I862e500cd58332d6e199c853315c560fe6a73dc2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3265609
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
4fd4eb50
|
2021-11-05T11:14:47
|
|
Vulkan: Minor cleanups.
Makes some VkFlags into VkAccessFlags to aid with code search. Also
corrects a few typos.
Bug: angleproject:6566
Change-Id: Ia4d14d38bb6d4e8c4c71fed6038c12edae112be9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3264224
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
4a2446c6
|
2021-10-19T11:55:17
|
|
Vulkan: Implement robust shader outputs.
In this CL we change ANGLE to pass the mask of missing shader
outputs down to pipeline creation. We then use the color mask
bits to block SwiftShader writing to unused outputs.
This fixes the undefined behaviour present in Genshin Impact.
Note that the other GLES implementations we tested don't seem
to modify outputs even if they're unused.
It was easier to mask out the color attachments in initialize
rather than set up the pipeline desc to mask out the attachments.
This was because we manipulate the color mask in a fairly complex
way before we initialize the pipeline desc.
Bug: angleproject:6566
Change-Id: Ie659fcd511cd286fa573fd25e3e6a0b9e123ebd6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3232435
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
191c236a
|
2021-10-14T17:01:45
|
|
Vulkan: Remove "current queue serial".
Queries, semaphores, and pipelines instead use the normal
vk::Resource design to track their lifetimes. Removes the current
serial APIs from all classes. Current serials are still tracked
internally in the command queue classes.
Bug: b/169788986
Change-Id: Idcd2c2a93bc8225c6f3f7c247eb8fcfb76be1030
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3223644
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
6cb599f9
|
2021-10-06T13:07:27
|
|
Vulkan: Change dest to dst for consistency
Cleanup only, no functional change. dst aligns better with src.
Bug: angleproject:6502
Change-Id: I69821b1aae50a7ce647c7cc876468b6de309eec8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3208514
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
95a5bbd4
|
2021-10-04T13:38:43
|
|
Rename FullScreenQuad.vert to FullScreenTri.vert
Bug: angleproject:6505
Change-Id: Iafe26ddce51862edcb405f7ca85997a7c3b26fa7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3203172
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
a097ee2e
|
2021-09-27T15:18:02
|
|
Vulkan: Fix clearing external images with emulated format
External images may already have data, and clearing them due to their
format being emulated is incorrect.
This change makes sure that only the emulated channels are cleared.
The RGBXDataPreservedAHB test is based on one contributed by
Jason Macnak <natsu@google.com>.
Bug: b/192315789
Change-Id: Ibc8953fdac356f2a62a5b46512a51e1916b4a1b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3193416
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
57d59e83
|
2021-09-07T17:41:11
|
|
Vulkan: Add ResourceWrite to track Read and Write Access
vk::Resource currently only tracks accesses in general, not which type
of access is being performed. This CL adds the new class ResourceWrite
to track whether the access is a Read or Read/Write access and when
the access completes.
This allows a follow-on CL to know when a buffer is being written to by
the GPU or if the GPU is only reading from a buffer. Tracking write
accesses to buffers is required when attempting to "Ghost" (duplicate)
GPU-read-only buffers to prevent breaking the render pass when the CPU
maps the buffer memory.
Bug: angleproject:5971
Test: ComputeShaderTest.ImageBufferMapWrite
Change-Id: I965e3e75730719ccce77334744ae4feae33c6101
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3146319
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
6977fa6f
|
2021-08-31T09:47:59
|
|
Vulkan: Store actualFormatID (not intendedFormat) in RenderPassDesc
Today we store intendedFormatID in the RenderPassDesc. At unpack time,
we convert intendedFormatID to vk::Format and then get the actual
VkFormat. This is a bit complex and unnecessarily confusing. And this
will be very error prone in the future when vk::Format has two actual
image formats. This CL packed actualFormatID into RenderPassDesc and
converts to VkFormat directly. Once packed in the RenderPassDesc, we
never needs to reference to intendedFormat or vk::Format since all these
does not matter. The only format matters is actualFormatID once you
packed into the RenderPassDesc. This simplifies the logic and prepare
for the future CLs.
Bug: b/196456356
Change-Id: Ia282115c824e3ec446d2be15b40b1e2974b99afa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3133761
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
e98539f0
|
2021-08-17T14:42:26
|
|
Vulkan: Add ImageHelper::getIntendedFormatID()
This adds helper API to return intendedFormat directly from ImageHelper
object instead of vk::Format, to make API symmetrical. It is also
necessary. It is also needed in some places where we no longer have
access to vk::Format any more due to refactoring.
Bug: b/196456356
Change-Id: Ie0502793623138ded28c3f01320c57ffea2d93df
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3101925
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
cf24931a
|
2021-08-17T10:48:23
|
|
Vulkan: Add ImageHelper::getActualFormat()
This is preparation for future CLs. In the future vk::Format may not
tell you what actual format is. This CL adds a new method of
ImageHelper::getActualFormatID() and ImageHelper::getActualFormat() so
that we can use these two APIs and avoid using vk::Format, thus reduce
reliance on vk::Format.
Bug: b/196456356
Change-Id: Ic50e664e033feb5e066f40269c33cffe96024172
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3100319
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
0394fc62
|
2021-08-25T15:18:44
|
|
Vulkan: Fix transform feedback pause on UtilsVk clear
Transform feedback was paused after vkCmdBindPipeline, but should be
done before as that command is not valid while transform feedback is
active.
Bug: angleproject:6317
Change-Id: Ifcea8de07e24c71a19a74e738cb700576f7f53cc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3118812
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
971ba359
|
2021-06-23T16:45:33
|
|
Add angle::BitMask for creating bit masks
angle::BitMask(n) implements the common pattern of angle::Bit(n)-1.
Bug: angleproject:6048
Change-Id: Icd56ef1504804add59d0804a7249b3035c96f9c2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2984099
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
851fbedb
|
2021-06-10T21:27:01
|
|
Vulkan: Switch viewport and scissor to dynamic state
Heavily based on http://crrev/c/1316888
Some apps are creating a large number of viewport combinations and
are running out of graphics memory. This CL drops their graphics
pipeline use from tens of thousands to tens.
Performance testing shows little impact to application traces.
Bug: b/190026813
Bug: angleproject:3143
Change-Id: Ib7415be1128f8fedae4a7ca72e067b2815201223
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2954925
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
683064b7
|
2021-06-02T02:59:55
|
|
Vulkan: Fix missing operand list in OpExecutionMode parser & builder
Bug: angleproject:4889
Change-Id: Ie864031caeddfcf5202044b0f9c197b3883ceaf7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2934782
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
7828506a
|
2021-04-06T23:42:16
|
|
Vulkan: Cleanup buffer format fallbacks
- Fallbacks for formats that have required vertex attribute support are
removed.
- Fallbacks are changed to ones with smaller sizes
- A bug is fixed where CopyNativeVertexData wasn't initializing the
alpha channel appropriately, which was not exercised due to fallback
to 32-bit float formats.
Bug: b/184163871
Change-Id: Icd9afa49d94c65545d1f3fcf521881726d64529d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2809441
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0273ea3f
|
2021-04-06T16:23:39
|
|
Vulkan: Use RGBA16_FLOAT for buffer format fallback
... instead of RGBA32_FLOAT. VK_FORMAT_R16G16B16A16_SFLOAT has
mandatory support for vertex buffers.
Bug: b/184163871
Change-Id: I7ef2933cd15e46bb984e6fd1b020d2ec15b9c60e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2807780
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
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>
|
|
02acc5ee
|
2021-03-18T16:08:59
|
|
Vulkan: More cleanups to perf counters.
This refactors the pipeline type in the ContextVk class to also use
a packed enum map. It also expands the object perf counters to store
both a specific and cumulative version for use in different cases.
Bug: angleproject:5736
Change-Id: I6ff78e38065eb577f2b95b1d9c4f9cc31d7f325f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2774184
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: 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>
|
|
b717952e
|
2021-03-18T10:39:34
|
|
Vulkan: Use packed enum map for descriptor set index.
This simplifies a lot of the data structure indexing in the program
executable class. Also renames the "DriverUniforms" and
"InternalShader" index into a single "Internal" index.
Bug: angleproject:5736
Change-Id: I2a51d8b14d5b16b438dbe636f77b11bbc045ba9a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2773321
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@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>
|
|
c7c38731
|
2021-03-04T15:04:07
|
|
Vulkan: Move SpirvBlob definition to common/
For use by the translator.
Bug: angleproject:4889
Change-Id: Ie95cafd3cfcdde50acc5d26d3c00e6574186a805
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2737276
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
8844599f
|
2020-09-11T22:41:36
|
|
Vulkan: Create unresolve shader directly in SPIR-V
Per issue 4889, dependency to glslang is being dropped. This change
generates the unresolve UtilsVk shader directly in SPIR-V.
This shader is trivial and contains repeating patterns per attachment.
As a result, generating its SPIR-V is exceptionally simple. The SPIR-V
in this change is first generated by glslang validator and is then
adapted for autogeneration.
See comments in the code for details.
Bug: angleproject:4889
Change-Id: I48dd77ae04e1035c05a8aef7bf2f161e105ae2a4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2407179
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.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>
|
|
49211c31
|
2021-03-02T11:22:28
|
|
Vulkan: Fix Overlay for prerotation
Bug: angleproject:5690
Change-Id: I906a259767c54e3ac9f3ac822b6d5ed5dcaa0bd5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2725768
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.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>
|
|
30622479
|
2021-02-16T12:33:40
|
|
Vulkan: Fix crash with deferred clears and MSRTT
The following scenario was mishandled:
- MSRTT draw with an unresolve operation (i.e. has two subpasses)
- Deferred clear
- Flush deferred clear with MSRTT framebuffer not needing unresolve
(i.e. has one subpass)
Bug: chromium:1178693
Change-Id: If3548e99897d698d61dfafbe9f86193723d06e5a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2697648
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
45a493ea
|
2021-02-05T13:48:48
|
|
Vulkan: Use a dirty bit to start the render pass
Some dirty bits need to run before the render pass starts. An upcoming
change for example needs to break the render pass when the program
pipeline is changed while transform feedback is active. Another
upcoming change may need to do the same based on a preceding
glMemoryBarrier.
This change adds a new dirty bit to start the render pass after some
dirty bits have already been processed.
Bug: angleproject:5528
Change-Id: I993c9efefed4c8fee268b218a8dd66a582d4e7cd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2678863
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
89f50584
|
2021-02-03T08:51:04
|
|
Vulkan: Add ExtendedDirtyBitType bitset
ExtendedDirtyBitType qualifies DIRTY_BIT_EXTENDED dirtybit.
Clip control code path can now set the appropriate ExtendedDirtyBitType
when there is a change in state. Also remove the ClipSpaceOrigin member
in the Vulkan backend that cached front-end state.
Bug: angleproject:5471
Tests: dEQP-GLES2.functional.clip_control.*
Change-Id: I8dbb509ef940e7905439d32483fd67a8fc171a6e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2673062
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
4a09df13
|
2021-02-02T17:52:56
|
|
Vulkan:Fix wrong outputCount of emulated RGB copies.
The output count of shaderParams equals componentCount
divided by Ed. To avoid losing the last data,replace
division with UnsignedCeilDivide function.
Bug: angleproject:5598
Change-Id: I079d72f4eefa3d6b0f5d80ada25829fea673410c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2666869
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
80a4223e
|
2021-01-28T17:51:31
|
|
Vulkan: Handle changes to viewport when clip origin is modified
The expected view port is different from current viewport translation
when the clip origin is the upper left. So now, it has four different
view port translations based on clip origin and y-flip of framebuffer.
- add query and state management for EXT_clip_control
- add dirty bit for clip control
- change viewport, scissor and cull face when clip origin changes
Bug: angleproject:5471
Tests: dEQP-GLES2.functional.clip_control.*
Change-Id: I78dc752c3287b09f25496034e0d0d2724138010c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2615863
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
a4b582e8
|
2021-01-11T15:31:13
|
|
Vulkan: Notify ContextVk when UtilsVk binds compute pipelines
This issue was fixed for graphics pipelines (in
UtilsVk::clearFramebuffer), but remained for compute pipelines. If
UtilsVk issues a dispatch call, it now notifies ContextVk to rebind the
pipeline and descriptor sets.
Bug: angleproject:5529
Change-Id: Ic52f91bdc70d02c065ec2d5e2a3614c11fd62a9f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2622236
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
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>
|
|
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>
|
|
251ba5cb
|
2020-12-03T15:55:47
|
|
Vulkan: Fix transform feedback with in-render-pass clears
An in-render-pass clear now pauses transform feedback so it wouldn't
contribute to it. Since it's not possible to resume the transform
feedback in the same render pass (as it needs a memory barrier for its
counter buffer), the render pass is broken after the clear.
Bug: angleproject:5426
Change-Id: I1eaf8c153d076bd912a4a08c65960c12f00341ef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2573579
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
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>
|
|
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>
|
|
4e913d34
|
2020-11-02T10:44:51
|
|
Vulkan: Work around Nvidia depth clamping bug
In GL ES, depth is always clamped to [0,1].
The same is true in Vulkan, but not for implementations affected by
Nvidia bug 3171019. This patch implements a workaround.
The workaround introduced test failures on Linux with Nvidia Quadro P400
and driver version 418.56, so it's only applied conditionally, and as a
result the test failure expectations are not removed completely.
Bug: angleproject:3970
Change-Id: I0d9f855d7f3df72fea4af9f9b134ae3177cf820d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2514377
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@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>
|
|
939fcd1a
|
2020-11-23T21:47:58
|
|
Vulkan: Pass in emulated alpha value to ConvertVertex
In prepration for EXT_copy_image taking advantage of ConvertVertex.
Also a small optimization to this ALU heavy shader.
Bug: angleproject:5278
Change-Id: I6520391fe1af608db66f8c362f1038786b2c65e7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2556466
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
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>
|
|
ee4e0866
|
2020-09-24T11:39:49
|
|
Vulkan: Add descriptor set allocation counters
Add descriptor set allocation counters for the following:
- ContextVk
- Driver uniform allocations for graphics and compute pipelines.
- ProgramExecutableVk
- ANGLE driver uniforms
- Uniforms
- Textures
- Other shader resources
- UtilsVk
- All of the UtilsVk::Function types increment the same counter
Each object's counters live within the object itself and the cumulative
total is output as part of that object's destruction. On Present, all of
the descriptor set counts are collected into a single total which is
used to update the overlay each frame.
In order to see the cumulative total output for each object, the
following GN args must be enabled:
is_debug = true
angle_enable_perf_counter_output = true
To see the descriptor set allocation overlay:
ANGLE_OVERLAY=VulkanDescriptorSetAllocations
Bug: angleproject:5067
Test: Manual verification with angle_perftests
Change-Id: Ie45fda56ade3e68bfba7bf6da9554eb05a02c6b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2429487
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@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>
|
|
96714af8
|
2020-10-22T17:28:20
|
|
Vulkan: Dirty pipeline and desc set after mid-RP clear with draw
If UtilsVk::clearFramebuffer issues a draw call on the currently open
render pass (as opposed to starting one itself), ContextVk would be
unaware of the fact that the graphics pipeline and descriptor sets have
been changed.
This change sets the necessary dirty bits for ContextVk to recover from
a UtilsVk::clearFramebuffer call.
Bug: chromium:1141040
Change-Id: I865220fb5b3b78bf4c6b6b2896e57d8a7490c270
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2493184
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
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>
|
|
f51e99fb
|
2020-10-13T11:38:28
|
|
Vulkan: Remove serial from RenderPassHelper
We don't delete RenderPass's so no need to keep a serial.
This simplifies things for coming threading code.
Bug: b/169788986
Change-Id: I2577b17bc1f6af163725389589d7cd62d09eea13
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2468538
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
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>
|
|
df8f71d1
|
2020-10-09T15:27:28
|
|
Vulkan: Don't break the render pass on scissored clears
clearImmediatelyWithRenderPassOp is removed and the draw path is used
for the scissor. That path was added to avoid creating a large number
of graphics pipelines due to the scissor state. This is now done by
using dynamic state for scissor in the draw path for clear.
Running the following dEQP tests without and with dynamic state for
scissor:
dEQP-GLES3.functional.fragment_ops.depth_stencil.stencil_ops.*
the number of graphics pipelines is reduced from 95392 to 16.
Bug: angleproject:4617
Bug: angleproject:4836
Change-Id: Ib373d8cd23ca2b67e6fd26aa2a1103f281f7e473
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2463985
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@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>
|
|
6c1c3bd9
|
2020-10-09T11:46:04
|
|
Vulkan: Clear depth by shader if depthClamp not supported
This will avoid breaking the render pass when clearing depth through
clearWithDraw if the depthClamp Vulkan feature is not present.
Bug: angleproject:4836
Change-Id: I845fd5074dd95f6896da89f9e119ebc5000a5688
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462719
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
f8070feb
|
2020-10-09T11:03:29
|
|
Vulkan: Use depthClamp to clear depth where available
This will avoid breaking render pass if clearing depth in clearWithDraw.
Bug: angleproject:4836
Change-Id: I50242d1115efc91059923143f6ae5fd25fb3d36f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462717
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2392e6b3
|
2020-10-07T23:59:43
|
|
Vulkan: Move content-defined tracking to ImageHelper
Content-defined tracking was done in render targets prior to this
change. This had multiple drawbacks:
- When a framebuffer attachment is changed (including the first time
it's set), it's unknown whether the contents of the attachment is
defined.
- Invalidate takes effect at the end of render pass, at which point the
render target objects may be gone. Attachment ImageHelpers are
however correctly tracked.
This change moves content-defined tracking to the ImageHelper itself,
and tracks it per subresource. ImageHelper::onWrite() now receives the
subresource that is being written, and marks it as having defined
content.
A future optimization can make use of this change to
ImageHelper::onWrite to track "dirty" subresources. This can lead to
the removal of unnecessary barriers when same-kind writes are done on
different subresources of the image. See http://anglebug.com/3347#c15
Bug: b/167275320
Bug: angleproject:4836
Change-Id: Iabd1dace4eae9eb379453a9eb7ec6eafc9db1aef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462036
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
d5fa6ea9
|
2020-04-29T04:13:54
|
|
Vulkan: Implement OES_draw_buffers_indexed
Bug: angleproject:4394
Change-Id: I7db9c695c233b2daf740acc654b1b2e546a8b681
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2172739
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@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>
|
|
01641c7a
|
2020-09-30T15:25:28
|
|
Vulkan: Fix UtilsVk clear in non-zero subpass
Mid-render-pass clears (through UtilsVk) run on the current subpass,
which in the presence of multisampled-render-to-texture unresolve
would be subpass 1. The graphics pipeline for that draw call should
set the correct subpass index.
Bug: angleproject:4836
Change-Id: Iba4a03ea96a63b0f5d09c27e5283ff8a8b534e05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2441509
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b156a753
|
2020-09-28T16:43:50
|
|
Move LayoutCaches to ShareGroup
Testing with TSN found a race condition with RefCounted objects
(DescriptorSetLayout and PipelineLayout). Rather than add more lock
calls to protect accesses to mRefCount and mObject recommendation was to
put these caches in the ShareGroup (basically part of the context).
Locking at the GL level will ensure that two threads that share the same
context will not access the ShareGroup at the same time.
The ShareGroup also works because these layouts are not destroyed until
the context is destroyed so don't have to worry about other threads
(e.g. command processor thread) accessing them.
Bug: b/168744561
Change-Id: Icc0aa07bf4787a69572d6ec62da2f21d286232c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437509
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@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>
|
|
6f521921
|
2020-08-24T11:29:33
|
|
Vulkan: Use one triangle for full-screen utils
In tiling GPUs, using two triangles means the tiles intersecting the
seam would be processed twice.
Bug: angleproject:4936
Change-Id: Ib10b77e6ab15bba932f0e4e970e10ed5a8399cdd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2372623
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
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>
|
|
32ed3e71
|
2020-09-21T23:42:34
|
|
Vulkan: Make UtilsVk not contribute to occlusion queries
UtilsVk implements some functionality with draw calls. Of these draw
calls, clear was accidentally contributing to occlusion query results.
Additionally, the copyImage utility creates its own framebuffer and thus
directly creates a render pass, bypassing ContextVk::startRenderPass.
This change also fixes bugs where occlusion query handling assumed
mRenderPassCommandBuffer to be valid and correspond to the started
render pass command buffer, which is not true for the copyImage render
pass.
Bug: angleproject:5042
Change-Id: I19cdbb8fbeabf139791b314a6da265ac5cfd68e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2423209
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@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>
|
|
f0b02054
|
2020-08-06T20:55:05
|
|
Add a Vulkan feature to compress float32 vertex formats.
Use the vertex conversion pipeline in VertexArrayVk to detect
static vertex data and convert float32 vertices to float16. This
feature is useful for determining if an allication is vertex
bandwidth bound and seeing what gains could be had by using smaller
attributes.
This feature could be implemented in ANGLE's frontend but new
infrastructure for converting and storing the converted attributes
would need to be added to gl::VertexArray. Our backends already
have the functionality needed to handle unsupported attribute formats
and this can be repurposed for compressing vertex formats.
Bug: b/167404532
Bug: b/161716126
Change-Id: I9a09656a72e8499faa4124adf876d7261c8341c9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2342285
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ed899835
|
2020-09-11T21:21:55
|
|
Vulkan: Allocate descriptor pools with layouts
Descriptor set layouts and pools are very tightly coupled, since their
binding types and counts must match to ensure the number of available
descriptor sets within a pool remains accurate. To enforce this, the
descriptor pools will now keep a copy of the VkDescriptorSetLayout that
the pool was created for, which is verified when a descriptor set is
allocated from the pool. If the handles don't match, an ASSERT() will
fire.
Bug: angleproject:5033
Test: CQ
Change-Id: I4faf82c24f31052e57b656c968788bb0c131b619
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2407282
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
f39e0f01
|
2020-09-07T23:07:37
|
|
Vulkan: Use subpass to unresolve render-to-texture attachments
GL_EXT_multisampled_render_to_texture allows singlesampled textures to
be used with multisampled framebuffers in such a way that the final
resolve operation is automatically done. In Vulkan terminology, the
render-to-texture GL attachment is used as a Vulkan subpass resolve
attachment with an implicit (ideally-)lazy-memory multisampled image as
the color attachment.
This extension expects that if the texture is drawn to after the
automatic resolve, the implicit multisampled image would take its
fragment colors from the singlesampled image. In other words, the
opposite of a resolve operation should be automatically performed at the
start of the render pass. This change refers to this operation as
"unresolve".
The goal of this extension is to allow tiling GPUs to always keep
multisampled data on tile memory and only ever load/store singlesampled
data. The latter is achieved by using a subpass resolve attachment and
setting storeOp of the multisampled color attachment to DONT_CARE. This
change achieves the former by using an initial subpass that uses the
resolve attachment as input attachment, draws into the multisampled
color attachment and sets loadOp of said attachment to DONT_CARE.
Bug: angleproject:4881
Change-Id: I99f410530365963567c77a7d62fc9db1500e5e3e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2397206
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
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>
|
|
83c7e1ae
|
2020-09-17T16:42:19
|
|
Fix the regression of color blit.
Move the offset aligning code to stencilBlitResolveNoShaderExport
to avoid affecting color blit.
Test: dEQP-GLES3.functional.fbo.blit.default_framebuffer.*_linear_*
Bug: angleproject:5044
Change-Id: Ic2ebef94091853146424d567b0035161611ba32d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2416008
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@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>
|
|
e4e2a016
|
2020-09-01T11:23:09
|
|
Vulkan: Use color mask to handle draw buffer disabled case
When draw buffers set to GL_NONE, instead of remove the attachment from
renderpass which breaks renderpass, we force vulkan's per buffer color
mask to false while keep the disabled draw buffer attached. This CL also
always create FrameBuffer with all color attachments regardless it is
enabled or not.
Bug: b/167301719
Change-Id: Ice9fca9aacf774a47d13b749f822b222cc050174
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2389007
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
b3c7d39a
|
2020-09-03T15:51:02
|
|
Align the sample position in blitResolveStencil compute shader
The input coordinates of blitResolveStencil compute shader start
from 0,we need to align the sample position to start from 0 if x/y
is flipped.
Test: dEQP-GLES3.functional.fbo.invalidate.*.unbind_blit_msaa_*
Bug: b/159995959
Change-Id: If0c9f5b7cacddbe1a2d7062469a757a63bcc1378
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2392162
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
0c25fbe3
|
2020-09-02T17:17:57
|
|
Vulkan: Remove accidental padding in push constants
Bug: chromium:1124379
Change-Id: I45f4511c836858c70d4dae23c7b3954e0bc65ab4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2391616
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b2944fcf
|
2020-09-02T11:10:00
|
|
Vulkan: Don't break the RP on masked/scissored clears
Bug: b/166809097
Change-Id: Iedd10a6528808e859c5693a2d30c98aca1a1159c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2390862
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@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>
|
|
85ddcc93
|
2020-08-24T14:22:22
|
|
Vulkan: Convert ProgramExecutableVk::mDescriptorSets to std::array
Currently ProgramExecutableVk::mDescriptorSets is a vector, but it's
size is bound so it can be a std::array (DescriptorSetLayoutArray).
To ensure the size grows correctly in the future, the various descriptor
set indexes are also being converted from independent constexpr
uint32_ts into the enum DescriptorSetIndex.
Bug: angleproject:4898
Test: CQ
Change-Id: I7ae8ff3455bcfb61e24b73bd16cc3f8cf9873087
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2372664
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
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>
|
|
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>
|
|
4e1abc75
|
2020-07-24T10:38:40
|
|
Vulkan: Set depthStencil loadOp to DontCare when not used and stored
If depth stencil buffer is disabled during entire renderpass, and at the
end of renderpass we are not storing the data back to memory, then force
the loadOP to DontCare to avoid unnecessary depth stencil load or
clear.
Bug: b/162080462
Change-Id: I30905a6d45bec038de68e7f363ec699eb2be09ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2317726
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
dcc56215
|
2020-07-19T01:12:09
|
|
Vulkan: Implement GL_EXT_multisampled_render_to_texture
This change allows the use of resolve attachments in the Vulkan backend.
GL_EXT_multisampled_render_to_texture is implemented using this feature.
The infrastructure for specifying resolve attachments is designed with
eventual support for GL_EXT_multisampled_render_to_texture2 in mind as
well as optimizations to glBlitFramebuffer() and multisampled
backbuffers.
Proper support for glRenderbufferStorageMultisampledEXT is still missing
from this change. All tests use this for the depth/stencil attachment
and don't read back the data. Currently, the depth/stencil attachment
is created as a normal multisampled image.
Bug: angleproject:4836
Change-Id: I110a7f63312ae61a657b6094adf7d97c92bd5843
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2304170
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
8adc5469
|
2020-07-02T10:15:17
|
|
Vulkan: Generate mipmap in compute
An initial implementation based on AMD's FFX SPD (Single Pass
Downsampler).
Apart from requiring STORAGE_IMAGE support for the image format, the
following limitations are in place due to FFX SPD:
- Image must be 2D or 2D array (including cube maps)
- Image must be single-sampled
The following _can_ be supported, but not yet implemented:
- sRGB formats
- Integer formats
- depth/stencil formats
Bug: angleproject:4551
Change-Id: Ibc4d5cea701cca31e55e3d651540872bbd3b473f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2278713
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d9818fd6
|
2020-07-19T00:37:21
|
|
Vulkan: Improve RenderTargetVk's getImage interface
Prior to this change, RenderTargetVk had getImage() and
getImageForWrite(). This change introduces getImageForCopy() and
renames getImage() to getImageForRenderPass().
Currently, all three functions do the same thing. However, with
upcoming changes the semantics will be different:
- getImageForRenderPass(): This is the image used as the non-resolve
attachment. When resolve attachments are introduced, there will be a
corresponding getResolveImageForRenderPass().
- getImageForCopy(): When GL_EXT_multisampled_render_to_texture is
implemented, this will return the image that owns the data.
- getImageForWrite(): Similar to getImageForCopy(), but should set
mContentDefined. This is currently missing, and is a bug that will be
resolved in a follow up.
This split change gets the mechanical rename out of the way to make
future changes simpler.
Bug: angleproject:4836
Bug: angleproject:4859
Change-Id: I5f7657cc049c0e1772a7c510e74289e685ba93c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2306516
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
7e2a9820
|
2020-07-20T12:38:05
|
|
Vulkan: Make explicitly-[non-]rotated get methods
Split FramebufferVk::getCompleteRenderArea() into 2, [non-]rotated,
explicitly-named methods. Simplify the uses of these methods, and fix
some rotation cases. Also explicitly-name
FramebufferVk::getScissoredRenderArea().
Bug: b/151111296
Change-Id: I1754ec2796fd8625b916a2dba2e723e70ecba419
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2305389
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
d38c75c5
|
2020-07-02T22:12:19
|
|
Vulkan: Remove BufferUtils shader
This was the first internal shader written for prototyping UtilsVk. It
ended up never having a user.
Bug: angleproject:2022
Change-Id: I846dcc216c4c018f5bda16ad67463f698b8e1c56
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2280944
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
da3e6451
|
2020-06-25T23:49:22
|
|
Vulkan: Fix fbo_invalidate tests for pre-rotation
The BlitFramebuffer path wasn't properly supporting stencil and MSAA
paths for pre-rotation:
1) The stencil path on Android isn't going through
UtilsVk::blitResolveImpl, but requires changing
UtilsVk::stencilBlitResolveNoShaderExport for rotation.
2) MSAA resolves requires rotating clippedSourceArea.
Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_fbo_invalidate_\*
Bug: b/158337857
Change-Id: I092cab302c247ff9b2e262b12de3d1a56a257f8e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2269499
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
b067db75
|
2020-06-25T23:47:09
|
|
Vulkan: Fix copySubImageImplWithDraw() for pre-rotation
This involves cases of copying from a rotated default framebuffer.
Various adjustments are needed for where the source is and its
relationship to gl_FragCoord in the custom ImageCopy fragment
shaders. Various tests are affected, including the following:
Test: angle_deqp_gles2_tests --gtest_filter=dEQP.GLES2/functional_texture_specification_basic_copy*teximage2d_*
Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_texture_specification_basic_copy*teximage2d_*
Bug: b/158245571
Bug: b/157933235
Change-Id: Id9ec56d849cd2268954dd82623a7632a10fb8e8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2248204
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
70e706f4
|
2020-06-22T18:14:44
|
|
Vulkan: Fix glBlitFramebuffer() for pre-rotation
This involves cases of blitting to/from a rotated default framebuffer,
potentially with scaling in one or both dimensions. Various
adjustments are needed at different times in the stack, including in
the custom BlitResolve fragment shaders. Various tests are affected,
including the following:
Test: angle_end2end_tests --gtest_filter=*EGLPreRotationLargeSurfaceTest.OrientedWindowWithBlitFramebuffer
Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_fbo_invalidate_\*
Bug: b/158337857
Change-Id: Ibb176e4215784e85c0f34e6e1c22ba662517fed2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2242359
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
2919dc6e
|
2020-06-15T18:39:39
|
|
Add immutable samplers to descriptor set layout
To support YUV conversion we need to track the use of immutable samplers
in the descriptor set layout.
Bug: b/155487768
Change-Id: Ic7dc6a08551f5125c4a519b5cfada312f95ab914
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2225423
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
e7ae237e
|
2020-06-12T23:52:09
|
|
Vulkan: ANGLE_copy_texture_3d support
Bug: angleproject:4748
Test: CopyTexImage*Vulkan:Texture3DCopy*Vulkan:Texture2DArrayCopy*Vulkan
Test: dEQP.KHR_GLES3/copy_tex_image_conversions_required_cubemap*cubemap*
Change-Id: Ifdc3d455ca8c9e732d0adf4afa9e2809d780ae18
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2246320
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b900f4e2
|
2020-06-12T16:01:58
|
|
Vulkan: Use GPU path for copy to sRGB textures
To avoid creating aliasing views for sRGB textures, the ImageCopy
texture will do/undo sRGB transformation such that the final result is
as-if both source and destination views were linear.
Possible future optimizations:
- If either of source or destination has already been created with the
MUTABLE flag, i.e. has a linear view already available, that can be
used.
- If destination is sRGB but not renderable while its corresponding
linear format is, and if the image is already created with the MUTABLE
flag, using the linear view would allow the copy to go through the GPU
instead of the CPU.
Bug: b/157934810
Bug: angleproject:4092
Change-Id: I43aaf882c90e1c60d0d9eb04636c203fc04090a4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241622
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|