|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
61fa0878
|
2020-10-08T11:35:48
|
|
Vulkan: Invalidate/restore depth/stencil separately.
Depth/stencil content defined is already tracked separately in the
ImageHelper. This change exposes this tracking from RenderTargetVk.
Bug: b/167275320
Bug: angleproject:4836
Change-Id: Ie6520e7a4ab557eb233c60c6ab0d4a8f8f098bf6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462039
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
edc0d2ee
|
2020-09-15T16:02:05
|
|
Vulkan: Disallow loadOp=LOAD for MSRTT depth/stencil textures
EXT_multisampled_render_buffer2 specifies that depth/stencil textures
are expected to be in a perpetual state of invalidated, except during
rendering. This change makes sure that they never use loadOp=LOAD.
Additionally fixes a bug where clears applied to MSRTT depth/stencil
textures didn't take effect because they were applied to the
multisampled image (since the resolved image was not given to the render
target).
Bug: angleproject:4836
Bug: angleproject:5063
Change-Id: I4506f4de415dca6c222111a1ae62017d2fb1e2b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2412848
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
de335c16
|
2020-09-14T12:04:20
|
|
Vulkan: Implement a SharedResourceUse pool
When adding a Resource to the ResourceUseList of ContextVk
we constructed a new SharedResourceUse object for tracking
and update of the Resource's Serial. We would then delete
it after releasing the resource. This incurs repeated
memory operation costs.
Instead we now allocate a pool of SharedResourceUse objects
and acquire and release from this pool as needed.
VTune profile of the Manhattan 30 offscreen benchmark
shows the CPU occupancy of bufferRead decrease from an
average of 0.9% -> 0.6% and imageRead decreases from
an average of 0.4% -> 0.3%. The bottleneck for both
these methods is the retain() method that leverages
the new SharedResourceUse pool.
Bug: angleproject:4950
Change-Id: Ib4f67c6f101d4b2de118014546e6cc14ad108703
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396597
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
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>
|
|
ef315fdc
|
2020-09-10T14:56:35
|
|
Vulkan: Use current commandBuffer pointer
We were using a passed in commandBuffer in
ImageHelper::flushStagedUpdates which became invalid during the process
of handling the flush upon which subsequent uses could cause problems
when threading is enabled (and maybe when it's not as well, just harder
to see.)
Have ImageHelper::flushStagedUpdates use the current
OutsideRenderPassCommandBuffer and the code will use the proper one.
Bug: b/168144059
Change-Id: Ib9849efe9366cf61df5e68fd25d17df165dbd3a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2402354
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
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>
|
|
e689d316
|
2020-08-14T22:51:03
|
|
Vulkan: Don't end RenderPass on DS feedback loops.
Instead of always switching the Framebuffer to mask out depth/stencil
loops we now switch the RenderPass to a "read-only" depth/stencil mode.
Reduces the RenderPass count in Manhattan from 18->15. There are still
a couple extra RenderPasses inserted that we can get rid. We can merge
a few RenderPasses by retroactively changing a started RenderPass to
"read-only" when there are no prior recorded depth writes or clears.
Also adds a test to count the number of RenderPasses ANGLE generates in
DS feedback loop situaions.
Bug: angleproject:4959
Change-Id: I1855a45959655fc27ccd47a3469c1c672fc8fd9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2357973
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
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>
|
|
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>
|
|
25b0de6b
|
2020-08-01T13:45:11
|
|
Vulkan: Squash Texture+ImageView Serial and improve caching.
Previously we regenerated TextureSerial on Texture state changes such
as base/max level changes. This caused ANGLE to update descriptor sets
even though it was using the same image view handles. This change
instead uses an ImageViewSubresourceSerial which includes both a
serial for the ImageView and a 32-bit packed subresource range. The CL
speeds up NBA2k because ANGLE no longer writes new descriptors
for Texture max level changes. Local testing showed up to a 40% speedup.
Also adds a regression test with a counter for the number of descriptor
set writes in a frame.
This change will also be useful in upcoming changes that track Image
serials in the RenderPass.
Bug: angleproject:4911
Change-Id: I66249634aa56288079acf2c0eb8aa3391103533c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2333396
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
adc250c3
|
2020-07-31T21:11:05
|
|
Vulkan: Refactor ImageViewHelper serials.
Instead of storing a dictionary of serials to specific image views
we now store a single 32-bit serial combined with subresource info.
The serials combined with a subresource info (level/layer) gives a
unique identifier for each ImageView in the ImageViewHelper for the
descriptor set cache and the Framebuffer cache.
Also moves ImageView serial allocation to initialization and release.
This means we no longer need to use "getAssign" methods and instead
we use a few init methods to ensure the serials stay allocated.
Bug: angleproject:4911
Change-Id: Ia6af76ae16b3ff5d4a83974bde05cc704064b079
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2333395
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
22e6fc03
|
2020-07-31T15:58:28
|
|
Vulkan: Move Resource Serial gen into Renderer.
Putting Serial allocation in the Renderer allows the Helper
classes to manage allocating its own Serial. The init functions for
ImageViewHelper only have access to a vk::Context/RendererVk, not a
ContextVk. This will be updated in a future CL.
Re-uses the Serial Type X-Macro to do more code generation.
Serial allocation now uses an atomic because of its now Renderer
shared location.
Bug: angleproject:4911
Change-Id: I2d5d3d0bbf613d5468de795a700f66164291bc79
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2332884
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
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>
|
|
1c1c6b4e
|
2020-07-29T13:17:16
|
|
Vulkan: Cache/re-use vkImageView's per max level
For applications that frequently switch a texture's max level, cache
and re-use "read view" vkImageViews per max-level.
Test: NBA 2K20
Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_texture_mipmap_*_max_level_* --use-angle=vulkan
Bug: b/161993151
Change-Id: I9a6a81d5234196040bc6c264ec627a073ba73293
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2321370
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
248119b3
|
2020-07-20T16:05:45
|
|
Vulkan: Fix render target's tracking of content defined
Imagine the following scenario:
1. Clear draw framebuffer
2. Invalidate draw framebuffer
3. Update texture attached to draw framebuffer
4. Draw again into draw framebuffer
Step 3 could be a number of things, such as glCopyTex[Sub]Image,
glBlitFramebuffer, glTex[Sub]Image2D, glGenerateMipmap etc.
In the above scenario, at step 2, the framebuffer's render target
remembers it being invalidated (mContentDefined = false). This is used
to set the loadOp of the next render pass to DONT_CARE.
However, mContentDefined was implemented for a very specific
optimization regarding the swapchain's depth buffer. The reuse of this
variable for glInvalidateFramebuffer was erroneous as this variable
didn't track whether the contents are defined for the general case.
With this change, mContentDefined is set to true during
FramebufferVk::syncState for each render target whose contents are
marked dirty.
This change additionally makes glBlitFramebuffer signal the contents of
the blit targets as dirty, as well as textures that are used as storage
images.
Bug: angleproject:4859
Change-Id: I68c829f75ff4a3d03bb293ec72c609384983026d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2309110
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
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>
|
|
9a9ef0ae
|
2020-07-15T16:50:32
|
|
Vulkan: Fix RTs attached to textures with non-0 mip
Cleared confusion between GL level indices and VK level indices by
adding the corresponding suffix to variables and function arguments. A
handful of places that sent one index and expected the other are fixed.
A couple more places needed this adjustment that were missed in the
first CL. Also included a test to provoke those situations.
The conversion between the two is given by:
levelIndexGL = levelIndexVk + baseLevel;
Bug: angleproject:4695
Change-Id: I3b8e5699abee1b011e52b666e6e245f44cb8ad6f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2302549
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
67980f13
|
2020-07-08T08:51:02
|
|
Vulkan: add Buffer/Texture/ImageViewSerial class
In a few places we need a unique ID to represent that object and use
that to compute hash key. Right now we are using Serial for that purpose
but it creates confusion with QueueSerial which we are using Serial to
track GPU progress. This CL changes these usage of Serial to
TextureSerial, SamplerSerial, ImageViewSerial type so that compiler can
perform type checking. It also adds BufferSerial in preparation for next
CL.
Bug: b/159457348
Change-Id: I8e2da69c2029e4ddbcf163981ae46f85e19f751b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2287426
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
34ca1ac7
|
2020-06-16T12:05:12
|
|
Vulkan: Fix FramebufferVk cache
Migrate Serial from Image to ImageView.
Imageviews are what are utimately used in FramebufferVk, so move
the Serials into the ImageViewHelper class. Since that class also
knows the level/layer of the imageView, we can revert to using a
single Serial per ImageView instead of the AttachmentSerial that
included the layer and level.
ImageViewHelper caches Serials per layer/level combo.
Bug: angleproject:4651
Change-Id: I3741d7d03523eada84295cb712c1cc1e6e3c3867
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2248203
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
e7ae237e
|
2020-06-12T23:52:09
|
|
Vulkan: ANGLE_copy_texture_3d support
Bug: angleproject:4748
Test: CopyTexImage*Vulkan:Texture3DCopy*Vulkan:Texture2DArrayCopy*Vulkan
Test: dEQP.KHR_GLES3/copy_tex_image_conversions_required_cubemap*cubemap*
Change-Id: Ifdc3d455ca8c9e732d0adf4afa9e2809d780ae18
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2246320
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d657e1d7
|
2020-04-24T13:13:18
|
|
Vulkan: Defer framebuffer clears.
This works by storing the deferred clears in the ImageHelper's staging
buffers. We apply the deferred clears onto the RenderPass right before
we begin to draw. Storing the clears in the ImageHelper solves problems
where we clear GL Textures in a Framebuffer and then unbind the
Textures and sample from them. Or do other commands like CopyTexImage.
Note that because the staging buffer clears only handle full-image
clears we need to immediately apply some scissored clears where before
we would use the RP. This should be a pretty rare occurrence and it is
possible to optimize that in the future.
Reduces the RenderPass count in the Manhattan "frame 10" trace from max
22 to max 20. May improve perf slightly on Android or may have effects
too small to measure. Should not regress performance.
Bug: angleproject:4517
Change-Id: I02150d531022afb903f1058f070937ec6337bd88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2142711
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
03c18fbd
|
2020-04-13T16:01:01
|
|
Vulkan: Skip load if depth/stencil value are undefined
EGL1.5 spec says depth/stencil data are undefined after swap. This CL
will track the depth/stencil data and mark it as undefined and skip the
load if it is undefined.
Bug: b/153885625
Change-Id: Ifb3d88d442da547fa78c1eae091cbae08a20d0ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2148179
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
aa09ca69
|
2020-02-24T13:33:30
|
|
Vulkan: Update ContextVk command buffer access methods.
Use the following names:
- flushAndBeginRenderPass
- endRenderPassAndGetCommandBuffer
- flushAndGetPrimaryCommandBuffer
This clarifies that a flush is part of the method.
Bug: angleproject:4029
Change-Id: I6c870761339ea7aa39c83142200781ba39ad6a4b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2068129
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
a741abb9
|
2020-02-21T16:37:37
|
|
Vulkan: Rename CommandGraphResource to Resource.
Also renames the h and cpp files to ResourceVk (to keep distinct from
other resource.h/cpp files) and renames 'onResourceAccess' to 'retain'.
Cleans up a few remaining mentions of the command graph in comments.
Bug: angleproject:4029
Change-Id: Ifc8e880c8cea3fc48a4aec4730191c88aa35a076
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2065920
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
c58458e6
|
2020-02-19T14:51:41
|
|
Vulkan: Remove CommandGraph code.
Also updates relevant comments to no longer refer to a graph.
Bug: angleproject:4029
Change-Id: Ic29716e9ae4926870f902947d49d8fee7af98662
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057804
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
cf2ec3b1
|
2020-01-31T16:55:50
|
|
Vulkan:Add FramebufferVk cache
This adds a FramebufferVk cache. Cache signature is based on unique Serial
values that are assigned to ImageHelper objects backing all color and DS
rendertargets as well as level/layer values unique to the imageView.
Update the Serials and cache signature at FramebufferVk::syncState() time.
L0 cache is a currently active framebuffer.
L1 cache retrieves previously created framebuffer from new cache.
If neither of those hit, create new FramebufferVk and add to L1.
Bug: angleproject:4322
Change-Id: I3f585271798ddfb9e5f194020adca8cf8a6b19dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033869
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
a61e273a
|
2020-02-19T14:51:40
|
|
Vulkan: Fix store ops with linear command recording.
DiscardFramebuffer was being ignored in the new linear path. Fix this
by using the correct APIs. Also cleans up some of the access to the
"RenderPassCommandBuffer" struct in ContextVk. Add a new accessor that
returns the RenderPass without a flush that ensures it is only called
when a RenderPass is already started.
Bug: angleproject:4029
Change-Id: Ibd199f3a371c0f91b448a0b34c8752dc8b76c284
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057329
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
3c066404
|
2020-02-05T12:43:12
|
|
Vulkan: Command graph linearization (Step 4).
Implements GLES 3.0 functionality for the new command recording style.
Tested with angle_end2end_tests. dEQP/CTS testing will come later.
Bug: angleproject:4029
Change-Id: Ibdc4f1355a7b880946699ec227fd9807f4a27af9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2040197
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
8257ac30
|
2020-02-07T14:17:08
|
|
Vulkan: Defer RenderPass image barriers.
We accumulate image barriers in two places:
* for GL sampler textures
* for GL framebuffer attachments (Render Targets)
Then we issue the barriers together in a single call before the RP.
This fixes a bug where we were missing a layout transition in some
cases when transitioning between a sampler and a render target. It
should also be faster to issue a single barrier before a RP than issue
several smaller barriers.
Bug: angleproject:3539
Bug: angleproject:4029
Change-Id: I180b770f0df6b44d209e5c618ba36bcc1c6372e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2044236
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
20b1259a
|
2020-02-05T17:08:05
|
|
Vulkan: Command graph linearization (Step 2).
ES 2.0 is feature complete.
Passes all of the angle_end2end_tests with the new linear command
recording method. Also runs the T-Rex benchmark without any obvious
glitches. Likely has issues with creating too many RenderPasses. ES3
is mostly untouched.
Bug: angleproject:4029
Change-Id: Ic5acf3d768495fbffd07b07bf0a6f2b5787c51f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2012900
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
3712b2e4
|
2020-01-24T17:08:30
|
|
Vulkan: Command graph linearization (Step 1).
This initial prototype introduces a new feature to the Vulkan back-end
that disables the deferred command recording. The intent is to have a
lower CPU overhead during submission calls which currently walk a DAG.
The feature is not complete. Currently it only passes the ANGLE
SimpleOperationTests. Moreover it is extremely simple and only allows
use of one command buffer at a time. In the future we'll allow open
command buffers for recording outside and inside render pass commands
at the same time. We'll also support collapsing RenderPasses together
for some use cases.
Currently the prototype only passes "SimpleOperationTest". There are
quite a few unimplemented features like queries, XFB, etc.
Bug: angleproject:4029
Change-Id: I82760986683f55e37ac4ea559de6f4cffb6ef84e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1953485
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
|
|
579c5940
|
2020-01-17T13:20:21
|
|
Vulkan: Rename onGraphAccess to onResourceAccess.
Clarifies the function for the upcoming command graph linearization.
Bug: angleproject:4029
Change-Id: Ib50997c007053757de533f69c155a92d7555e0b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2003235
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
441b72f0
|
2020-01-16T14:48:39
|
|
Vulkan: Make ContextVk own ResourceUseList.
This moves the resource use tracking functionality out of CommandGraph.
Making the list a separate class helps the implementation avoid tricky
circular include problems.
Bug: angleproject:4029
Change-Id: I3288fc685b21e949f12b0796109a2b7bb117c249
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2002931
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
4ff1651e
|
2020-01-16T12:42:27
|
|
Vulkan: Add ResourceUseList helper.
This abstracts away the ResourceUse tracking from CommandGraph. Pulling
it out will allow us to more easily swap resource use tracking into
ContextVk. The command graph is eventually going away so we need to
move functionality out of CommandGraph.
Bug: angleproject:4029
Change-Id: Icc3bcc824510b03e91f8ff010a82751a81516bfa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2002930
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
68591eff
|
2019-10-13T15:05:23
|
|
Vulkan: Store ImageView access in the graph.
This will ensure we don't destroy the image views when they are still
in use by other Contexts.
Bug: angleproject:2464
Change-Id: I1d3ba2ad241250e31ea32873446c4cb23971750d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1843236
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
beacd8c8
|
2019-10-17T14:34:02
|
|
Vulkan: Rename format fields.
Renames 'angleFormat' to 'intendedFormat'. Also renames 'bufferFormat'
and 'imageFormat' to 'actualImageFormat' and 'actualBufferFormat'. This
renaming should make it clearer to the reader what the meaning of the
different format fields are. Intended format is the front-end format
and the actual formats are the formats we pass to Vulkan. Also updates
the documentation.
Bug: angleproject:4009
Change-Id: If61bf7250e88f7ed3d452718574c963d718e27b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866077
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
a14555a7
|
2019-10-13T15:05:22
|
|
Vulkan: Refactor RenderTargetVk ImageViews.
Instead of storing a pointer to an ImageView, store a
pointer to an ImageViewHelper. The level and layer index
are all that's needed to pull the right image view from
the ImageViewHelper.
Will make it easier to store ImageView references in the
graph to track lifetime.
Bug: angleproject:2464
Change-Id: I773fa79a89ceefc99ff70e4eed4985f9f01fe26a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1857549
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
88bc4d3d
|
2019-10-04T20:41:24
|
|
Vulkan: Get rid of "fetch" level/layer image views.
Instead always use 2D array views when rendering to cube maps. We need
to keep the "fetch" image view for the main image for emulating
seamless cube map textures on GL 2.0. We also use it for some texture
copying init. These uses could potentially be replaced with sample
instructions if we wanted to remove this last "fetch" view.
Bug: angleproject:3975
Change-Id: I90f9be9fc6542d8ec27f6722132c1b27acf72176
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1842226
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
d7f28aae
|
2019-09-19T14:19:10
|
|
Vulkan: Pass CommandGraph when updating serials.
This is in preparation for storing a pointer to a shared resource use
structure.
Bug: angleproject:2464
Change-Id: I8f4ba1c71de6ad6a27ac06fc8012a0e94267cc16
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1785988
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
0b1fbcff
|
2019-08-30T15:05:12
|
|
Vulkan: Make vk::ImageView pointers const
Bug: angleproject:3563
Change-Id: I8b6415dd9508941d093f36e7ded72d25f571b6f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1779204
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7e48c9eb
|
2019-08-06T17:17:19
|
|
Add explicit integer casts
WebKit uses the -Wshorten-64-to-32 flag which warns on these cases.
Bug: 3439
Change-Id: I8c1de60da0f173ca2036e2120e79b857f5f2775f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1740866
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
f2a1c384
|
2019-05-21T16:32:49
|
|
Vulkan: Implement multisampled framebuffers
Simultaneously implements ANGLE_framebuffer_multisample and ES3
multisampled framebuffers.
Additionally, implements ES3 framebuffer blitting where multisampled
framebuffers are involved.
Bug: angleproject:3203
Bug: angleproject:3204
Bug: angleproject:3200
Change-Id: I5694a30f71168e807688a9568e3742b81d907918
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1622667
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
ce9be8c7
|
2019-05-24T09:35:06
|
|
Vulkan: Have a cubemap as 2D-array view handy
Previously, only texture copies used a shader that performed
texelFetch(). To support cubemaps, a hack was used to temporarily
create a 2D array view.
With upcoming support for multisample resolve, more shaders will be
using texelFetch() all requiring this workaround. This change instead
makes sure that a separate view is created for cubemaps for the purpose
of being used with these shaders. As a result, we have three logical
views on textures and render targets:
- Draw: a view that can be used as a color/depth/stencil attachment
- Read: a view that can be used to sample from
- Fetch: a view that can be used to fetch from
The fetch view is generally the same as the read view, except for cube
maps.
Bug: angleproject:3200
Change-Id: I21547f728c16f0aa8f0fcae152c400b5cc1565da
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1628585
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
6722009e
|
2019-05-20T11:12:53
|
|
Vulkan: Handle dirty RTs with state messages.
Prior to this CL we were handling dirty state change notifications by
flushing the RT Images just prior to use or just after they were
changed. This could lead to a few redundant checks in several places.
It also meant we needed an owner pointer from the RT to the parent
Image. This pointer would be null for Surfaces and Renderbuffers.
This cleans up the image flushing logic to be handled by dirty bit
notifications. When an app updates an attached Texture with TexSubImage
or related calls it will send a notification to the Framebuffer. The
Framebuffer then sets a dirty contents bit that is handled in the
implementation. In Vulkan this means flushing the dirty bits.
Requires adding a flag to the FramebufferImpl class to determine if we
need to syncState before we checkStatus. Adding the option allows us to
only call syncState for the GL back-end. Not calling syncState allows
the robust resource init operation to happen *before* we syncState.
Which in turn allows FramebuffeVk to initialize the VkImages in one go.
Added new regression tests for Texture updates. This might not cover
all cases. I found it was very hard to trigger some of the resource
update staging in TextureVk.
Bug: angleproject:3427
Change-Id: Idfa177436ba7fcb9d398f2b67922e085f778f82a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601552
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9fa248e1
|
2019-05-06T14:55:18
|
|
Vulkan: Implement EXT_draw_buffers
In GLES, color attachments are referenced by their indices. These
indices match between the API and GLSL. For example, if a shader has:
layout(location=0) out color;
layout(location=3) out roughness;
Then GLES would bind and enable GL_COLOR_ATTACHMENT0 and
GL_COLOR_ATTACHMENT3.
In Vulkan, the framebuffer object and the corresponding renderpass
define the color attachments, and they don't allow gaps in color
attachments as GLES does. A render subpass creates the mapping between
the color attachments as defined in the framebuffer and the attachments
used by the shader (with possible gaps).
This change packs the enabled GL color attachments for the sake of the
framebuffer, and sets the subpass up in such a way that the shaders
continue to use the same color output indices as GLES.
In the example above, we have the attachment indices as follows:
Status | GLES | GLSL | RenderPass | Subpass
enabled 0 0 0 0
disabled 1 - VK_ATTACHMENT_UNUSED
disabled 2 - VK_ATTACHMENT_UNUSED
enabled 3 3 1 1
That is, the array of color attachments in the Vulkan
framebuffer/renderpass is:
[0] = GL color attachment 0
[1] = GL color attachment 3
And the array of color attachment references in the Vulkan render
subpass is:
[0] = 0 (index 0 of the renderpass attachment array)
[1] = VK_ATTACHMENT_UNUSED
[2] = VK_ATTACHMENT_UNUSED
[3] = 1 (index 1 of the renderpass attachment array)
Bug: angleproject:2394
Change-Id: Ib6cd2b60882643ea152986eee453270d09cd4aed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595442
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0631e19b
|
2019-04-18T16:09:12
|
|
Vulkan: Rename Vulkan "Texture" format to "Image"
Also adds some comments to vk_format_utils.h.
Bug: angleproject:3372
Change-Id: I529b9b189e4cdfd400c3c981a47139727d9954ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565062
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
65d10f3b
|
2019-03-21T16:30:31
|
|
Vulkan: Implement robust resource initialization
If a texture or renderbuffer needs to be cleared for robust access or
due to having emulated channels, it is immediately cleared. The former
relies on a front-end feature that optimizes robust access clears only
to levels and layers that are not fully initialized through data upload.
Bug: angleproject:2722
Change-Id: Icdab856eb4ffe963f78569b6d80d9ff5cb27ff9b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1535056
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
5a604a5f
|
2019-03-27T14:22:50
|
|
Ensure framebuffer is up-to-date before drawing
The dEQP-GLES2.functional.fbo.render.texsubimage.between_render_tex2d*
test was failing because a TexSubImage call modifying the framebuffer
wasn't being applied before a subsequent DrawElements call and thus
getting an incorrect result.
Bug: angleproject:3249
Test: angle_deqp_gles2_tests --gtest_filter=dEQP.GLES2/functional_fbo_render_texsubimage_between_render_tex2d_rgb --use-angle=vulkan
Change-Id: I90f791957e6536c5c62fb731d52cd486ab5c05c1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1542361
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
6854940d
|
2019-03-25T23:30:49
|
|
Vulkan: Correct RenderTargetVk extents to image mip
RenderTargetVk::getImageExtents() was always returning the base level
extents of the image it was viewing. This resulted in incorrect extents
being provided to various framebuffer- and renderpass-related
declarations. The function is renamed to `getExtents()` and returns the
appropriate mip extents.
Bug: angleproject:2361
Change-Id: I059a8d19fcb140c9095107d935aa3e5cb1852fc2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1537327
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
2660b503
|
2019-03-21T12:08:40
|
|
Vulkan: Restore CommandBuffer to namespace vk
Moved vk::CommandBuffer and vk::SecondaryCommandBuffer to vk::priv:: and
aliased vk::CommandBuffer to one or the other. This allows the rest of
the classes to continue seeing vk::CommandBuffer as they used to do.
Used a special alias for the primary command buffer that gets submitted
(vk::PrimaryCommandBuffer).
Bug: angleproject:3136
Change-Id: I61236fd182230991db7395d05e3da3be5e3f45be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1534456
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
134425c7
|
2019-03-15T17:02:17
|
|
Vulkan:Integrate SecondaryCommandBuffers
Integrate the custom SecondaryCommandBuffer type into the CommandGraph
nodes by adding new ANGLE_USE_CUSTOM_VULKAN_CMD_BUFFERS define that can
be set in the BUILD gn args with angle_enable_custom_vulkan_cmd_buffers
set to "true."
Initially the custom cmd buffers are disabled by default.
This adds some support functions to SecondaryCommandBuffer to make the
integration easier by matching the wrapped cmd buffer interface:
initialize(), end(), valid().
Bug: angleproject:3136
Change-Id: Ib910554583192550757bb8ce89914e3ea8737988
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1526556
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
028df5f5
|
2019-02-13T12:57:10
|
|
Vulkan: Implement transfer path for texture copy
This is primarily in preparation for compressed texture copy, but has
the following side effect:
- When transfer is possible, it's faster than draw
- When texture format does not support draw (but transfer is possible),
it will avoid copying through CPU.
Bug: angleproject:2670
Change-Id: I49e1b51e6ccec875db3f971106687c7d48c4916f
Reviewed-on: https://chromium-review.googlesource.com/c/1470595
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
4a298703
|
2019-01-18T10:49:36
|
|
Vulkan: Support creating EGL images from non-zero mipmaps of textures.
Store a mip offset in TextureVK to apply to all operations on the ImageHelper.
There is no need to store the mip offset in RenderbufferVk because it creates
the resource with the mip offset on the call to setStorageEGLImageTarget.
Store a mipmap level in the RenderTargetVk object so that clear operations
will target the correct mipmap of the image.
BUG=angleproject:2668
Change-Id: Ie976e3dd3a8de8135a7fbb8c84bd51eec0dddce8
Reviewed-on: https://chromium-review.googlesource.com/c/1422059
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
7dafe3eb
|
2019-01-28T11:39:15
|
|
Vulkan: optimize image memory barriers
Each image was tracking its current layout, but not the pipeline stage
it was used. Additionally, the barrier access masks were inferred from
the layout. This incurred two inefficiencies:
- The src pipeline stage mask often included all stages, causing
unnecessarily heavy barriers.
- The access masks included all possible accesses by a layout, which in
some cases was overkill, like VK_ACCESS_MEMORY_WRITE_BIT for
VK_IMAGE_LAYOUT_GENERAL (which will eventually used for compute shader
output).
This change instead creates an enum where each element represents the
layout, the stage and access masks when transitioning into the layout
and the stage and access masks when transitioning out of that layout.
The image will instead track a value of this enum (instead of
VkImageLayout), which allows it to create the layout transition barriers
as tight as possible, since it includes all the necessary information.
Bug: angleproject:2999
Change-Id: I91535ce06d10530a6fc217ad3b94b7e288521e25
Reviewed-on: https://chromium-review.googlesource.com/c/1440074
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f3e823db
|
2019-01-14T12:40:34
|
|
Vulkan: Store ImageHelper as a pointer in TextureVk and RenderbufferVk
Storing ImageHelper as a pointer allows the storage to be swapped or shared
with other objects.
BUG=angleproject:2668
Change-Id: I2e51f24737be59ffe9f472e9b0b592774a792cd1
Reviewed-on: https://chromium-review.googlesource.com/c/1409404
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
c81e7bfe
|
2019-01-18T15:35:55
|
|
Vulkan: refactor CommandGraphResource
Merged back RecordableGraphResource into CommandGraphResource. Queries
didn't really need to be a resource, as they always inserted separate
single-command nodes in the graph. The CommandGraph class is augmented
with a few functions that generate such nodes.
This is in preparation for debug markers, as they too require such
nodes.
Bug: angleproject:2853
Change-Id: I5251a0e0fdd42ed1126921b4acc13687a14af9cd
Reviewed-on: https://chromium-review.googlesource.com/c/1422549
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
29b49417
|
2019-01-07T14:03:06
|
|
Make copy texture test more extensive
By doing the copy multiple times, we exercise both paths where the
destination is already initialized and when it's not.
This adds tests for all combinations of formats and flags.
Bug: angleproject:2958
Change-Id: I56afb44496acd1b4d5a8527f4dbee29afbac9c81
Reviewed-on: https://chromium-review.googlesource.com/c/1398643
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
f83a28a6
|
2018-12-09T03:48:34
|
|
Vulkan: Shader path for framebuffer-to-texture copy
Part 1 in a series of changes to perform image copies on the GPU.
Bug: angleproject:2958
Change-Id: I6264a880865c4738c0866f2dc71af63425fc4118
Reviewed-on: https://chromium-review.googlesource.com/c/1370724
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b980c563
|
2018-11-27T11:34:27
|
|
Reformat all cpp and h files.
This applies git cl format --full to all ANGLE sources.
Bug: angleproject:2986
Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f
Reviewed-on: https://chromium-review.googlesource.com/c/1351367
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
502d2e21
|
2018-11-01T11:06:23
|
|
Vulkan: Crunch RenderPassDesc.
This reduces the size of the RenderPass desc from 64 to 12 bytes.
Bug: angleproject:2522
Change-Id: Iff2df87ba65be0bd976bba81c76c285cb0fa1ceb
Reviewed-on: https://chromium-review.googlesource.com/c/1308459
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
193a284d
|
2018-10-30T17:28:41
|
|
Vulkan: Split vk::CommandGraphResource.
This adds two subclasses: RecordableGraphResource and
QueryGraphResource. Each specializes for Buffer/Image/Frambuffer use
cases and Query use cases respectively. No virtual functions are added
to keep best performance.
We also change the CommandGraph API slightly to optimize away the check
for a barrier resource. This requires exposing the set current barrier
API on the CommandGraph.
Bug: angleproject:2828
Change-Id: I1c23f52bfe04cc682a00b245d63c3ac9a651615d
Reviewed-on: https://chromium-review.googlesource.com/c/1305994
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
2d03ff4a
|
2018-09-27T15:04:26
|
|
Vulkan: Make Buffer/Image be CommandGraphResources.
Don't make TextureVk/RenderbufferVk/SurfaceVk/BufferVk own the
manipulation of the command graph. Instead put the operations close to
the buffers and images used to render.
This will lead towards implementing implicit barriers on the command
graph resources.
Bug: angleproject:2828
Change-Id: I07b742b6792c60285b280d6454f90e963d667e0e
Reviewed-on: https://chromium-review.googlesource.com/1246983
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
3f3b358f
|
2018-09-14T10:38:44
|
|
Vulkan: Fix cube map attachment clears and readpixels.
These were both missing the correct layer offset. Cache the layer
inside the RenderTargetVk for easy access.
Bug: angleproject:2470
Change-Id: I690dbf0702d7ec52f44ba0a9429b6ef0e51baf6b
Reviewed-on: https://chromium-review.googlesource.com/1225910
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
71bb0267
|
2018-09-12T11:09:42
|
|
Vulkan: Implement cube map render targets.
Each TextureVk now stores vectors of RenderTargetVks and ImageViews
associated with the image faces. They are initialized lazily when the
RenderTarget is queried in getAttachmentRenderTarget.
There's still one missing edge case for handling clear with the
Framebuffer when using cube maps. Also one additional test failure on
Android.
Bug: angleproject:2470
Change-Id: Ib959a3434a992cef010a11940cf2ee49e118ac17
Reviewed-on: https://chromium-review.googlesource.com/1220727
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
1617e69e
|
2018-07-11T11:08:19
|
|
Vulkan: Implement depth/stencil blit with flip of the viewport
- This makes all end2end tests pass successfully on Win/Nvidia
with viewport flipping enabled.
Bug: angleproject:2673
Change-Id: I031c0a0f5fb0aede58b59479e57c2c127bcb964c
Reviewed-on: https://chromium-review.googlesource.com/1133703
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Luc Ferron <lucferron@chromium.org>
|
|
e4e2d0c5
|
2018-06-22T08:25:05
|
|
Vulkan: Add RenderTargetVk::getImageForRead.
This helper method will also transition the Image to the correct read
layout. We will need to revisit the implementation when working on
simulatenous read.
Bug: angleproject:2539
Change-Id: Id61404460f3ef0dbb054e6ac2dfc0b59adb78402
Reviewed-on: https://chromium-review.googlesource.com/1108378
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Luc Ferron <lucferron@chromium.org>
|
|
5bdf8bd1
|
2018-06-20T09:51:37
|
|
Vulkan: enable the rest of dEQP tests in fbo.render.*
Vulkan does not support separate depth and stencil attachments.
Adding this check to checkStatus skips the relevant tests to that.
There was also a bug in FramebufferVk::clear where we were not
checking the number of bits for depth/stencil attachments before
setting the aspects for clearing.
Bug: angleproject:2597
Change-Id: Iabe9f77a51fc7aca08b8faf3cecc3df9f99a7f1e
Reviewed-on: https://chromium-review.googlesource.com/1107847
Commit-Queue: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
316c6065
|
2018-05-29T10:49:45
|
|
Vulkan: Call GraphResource instead of GraphNode.
We don't need to use the CommandGraphNode class directly. This CL
consolidates our code so we never call the GraphNodes class directly.
Instead we call operations on GraphResource. This should simplify the
interaction with APIs from the various graph and dependency management
classes in the Vulkan back-end.
A new concept of 'starting' vs 'appending' commands is introduced.
Appending tries to avoid starting new command buffers when possible.
Should not change how the graphs are constructed, and mostly be a
refactoring change. There may be minor behaviour changes to some
commands.
Bug: angleproject:2539
Change-Id: Ia971e5cacb1164b9b3b22fa4a0a55b954d81f10e
Reviewed-on: https://chromium-review.googlesource.com/1052068
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
bcf467f2
|
2018-05-23T09:46:00
|
|
Vulkan: Encapsulate RenderTargetVk.
This makes the members private and adds more functionality. This moves
more responsibility out of vk::CommandGraphNode and also makes the
RenderPass init in the CommandGraphNode class better encapsulated.
Bug: angleproject:2539
Change-Id: Ia16f3f39cf011548c6473805b8b28e284808e856
Reviewed-on: https://chromium-review.googlesource.com/1040279
Reviewed-by: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
bc54342b
|
2018-03-30T10:43:19
|
|
Vulkan: Make RenderTargetVk use ImageHelper.
Bug: angleproject:2318
Change-Id: I9bc4bb7f5bcd3029a31c8570809f253cf5e4b12a
Reviewed-on: https://chromium-review.googlesource.com/980773
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
bd6ae4aa
|
2018-01-29T15:51:18
|
|
Vulkan: Don't create zero-sized textures.
Make sure the old resources are deleted but do not create new resources.
BUG=angleproject:2161
Change-Id: Ia6685e5c67b160d9bcd503983aee9607b2bd402c
Reviewed-on: https://chromium-review.googlesource.com/891644
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
4c26fc2f
|
2017-02-24T11:04:10
|
|
Vulkan: Initial command queueing implementation.
This removes the sychronous operation of the command buffers. It also
introduces a serial type for assigning ids to queue operations. This
gives us the ability to manage lifetimes of resources and track when
they're no longer in use on the device.
BUG=angleproject:1898
Change-Id: I91a4836d3098f1d7bd06cd389d88601a3a4826ab
Reviewed-on: https://chromium-review.googlesource.com/428352
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
7b57b9d7
|
2017-01-13T09:33:38
|
|
Vulkan: Implement basic Clear and ReadPixels.
This enables the simple operations clear test on Vulkan. The current
implementation is very synchronous - it will block and finish the
current command buffer if there is any possibility of a race.
BUG=angleproject:1319
Change-Id: If01fe9a19ed6f539639a38786193d3626164cada
Reviewed-on: https://chromium-review.googlesource.com/367754
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|