src/libANGLE/renderer/vulkan/vk_helpers.cpp


Log

Author Commit Date CI Message
Luc Ferron 33e05bab 2018-04-23T15:12:34 Vulkan: Bugfix in TextureVk::setSubImage and DynamicBuffer Bug 1) The offset wasn't plumbed through for setSubImage. Bug 2) The DynamicBuffer allocation sometime allocates a bit more than requested, but we were using the size requested as the next offset instead of the actual allocated size. This could get us in a situation in certain corner cases where the next allocation would be done on the said buffer instead of using a new allocation as it should. Also enables a bunch of new texture_specification_* tests that were unable to run successfully without these 2 bug fixes. Found a weird issue on WIN AMD only and suppressed these tests for now. Will investigate part of the same bug number as a separate change. Bug: angleproject:2495 Bug: angleproject:2492 Change-Id: I490b1bf2d1795b7a1033365e29eac12a8bc50bff Reviewed-on: https://chromium-review.googlesource.com/1024380 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Luc Ferron 66410530 2018-04-20T12:47:45 Vulkan: Textures mipmaps support Note that generate mipmaps is not yet supported, but uploading mipmaps is. This also enables 64 tests in dEQP gles2 to validate the changes. While trying to enable tests in functional.texture.mipmap.*, I found an issue where the graph ends up in an invalid state and triggers and assert in onReadResource in ContextVk.cpp:188. It seems like an unrelated bug to mip maps, I will investigate to enable these tests separately in a following CL. Bug: angleproject:2479 Change-Id: If51776d8ef3d994bee620d6a1cf982bb51838ff0 Reviewed-on: https://chromium-review.googlesource.com/1022232 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0cb6dc4c 2018-04-16T10:36:39 Vulkan: Fix texture descriptor set alloc count. We were reserving half the required descriptor sets for our pool. This fixes the counting and ensures we won't regress by adding a test. Also enables the cube map texture sample, and removes an UNIMPLEMENTED warning that was spurious. Bug: angleproject:2318 Change-Id: I371cd7c5b42e1ce980cce7bb0ef04885db72b614 Reviewed-on: https://chromium-review.googlesource.com/1014165 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Luc Ferron a4fa9c27 2018-04-13T07:00:56 Vulkan: drawElements with GL_LINE_LOOP and an offset Also enables a test in LineLoopTest that validates this case. Bug: angleproject:2473 Change-Id: Icb4c5735c11be40cdeceaa051f5a5cef33fd22c6 Reviewed-on: https://chromium-review.googlesource.com/1011669 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 20fa8d5c 2018-04-15T10:09:32 Vulkan: Implement cube map texture sampling. This changes the TextureVk class to have a queue of staging copies, instead of a single copy at a time. This will allow us to upload multiple sub regions of a texture image at once when we need to resolve the Image at sampling time. Enables the remainder of the texture.format tests, and all non-mipped tests in the texture.size tests. Also updates the expectations with the bug number for mipmap support. Bug: angleproject:2318 Change-Id: Ie55f8f2dc24d7b133ad735e37f0f78937f022b5b Reviewed-on: https://chromium-review.googlesource.com/980775 Reviewed-by: Luc Ferron <lucferron@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron a912046d 2018-04-12T13:11:03 Vulkan: DrawElements with line loops client side memory support - Also enables 6 new tests in LineLoopTests.cpp in angle_end2end Bug: angleproject:2458 Change-Id: I4aec12b0ac780e81e6811f1199a5acaf17d9b982 Reviewed-on: https://chromium-review.googlesource.com/1010411 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Luc Ferron 983c429f 2018-04-10T13:05:45 Vulkan: Lineloops edge base bugfix and new tests The dynamic buffer we are using in the LineLoopHelper wasn't able to support switching between different allocation sizes. Fix this by simply using a min alignment of the maximum allocation size we can reach. Adds 2 new tests to validate these calls in StateChangeTest.cpp Bug: angleproject:2458 Change-Id: I9d224e7dcfcd7627010832ca30dd9e1b9eceea4e Reviewed-on: https://chromium-review.googlesource.com/1007335 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 22f12fed 2018-04-08T14:23:40 Vulkan: Rename vk::LineLoopHelper. This more closely follows the general pattern laid out by the naming in vk_helpers.h. It also changes the dynamic buffer that the helper wraps to be stored by-value since the header include order problem is fixed. Bug: angleproject:2318 Change-Id: I1de9e1edee2125d3afd490b4f9c99cf70c61215c Reviewed-on: https://chromium-review.googlesource.com/1001654 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9cceac42 2018-03-31T14:19:16 Vulkan: Update resource dependency semantics. This removes passing the Serial around to several methods, so that dependency management is a bit more automatic. This makes life a bit easier when dealing with state updates when resources are in use by Vulkan. The FramebuffeVk no longer stores an extra serial of the last draw, instead it will trigger creation of a new writing node on a state change update. Bug: angleproject:2318 Change-Id: Ie58ec66e6e8644ba4d402c509255c3795d363dd3 Reviewed-on: https://chromium-review.googlesource.com/985201 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 6c7ab7fe 2018-03-31T14:19:15 Vulkan: Reorganize helper classes. This renames ResourceVk to vk::CommandGraphResource, which should help clarify its usage. This also moves LineLoopHandler, ImageHelper, and the DynamicBuffer and DynamicCommandPool classes into a new vk_helpers module. This file contains helper classes that manage other resources. Also this makes DynamicBuffer and DynamicDescriptorPool no longer inherit from CommandGraphResource. In the future, only Impl objects will be allowed to be graph resources. Bug: angleproject:2318 Change-Id: I0fa23da2ac853d90f3c822547a4a314f247cc757 Reviewed-on: https://chromium-review.googlesource.com/985200 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>