diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-02-29 16:47:55 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-03-03 18:25:57 +0100 |
commit | bbc52a043da3b38a2d44a5502c8587a1fdc8ad59 (patch) | |
tree | 800f01e7eb8333263f820c6a0afe8a137acec89a /src/gui/vulkan/qvulkanwindow.cpp | |
parent | eff6f77c1a38a5a89268b2dfbe9ab03cf9b2d652 (diff) |
rhi: Add a way to communicate back the native image layout for a QRhiTexture
Relevant when doing custom rendering combined with QRhi, and only for
APIs like Vulkan, where image layouts are a thing.
As shown by demo apps, it is not currently possible to implement a
correct application that renders or raytraces into a QRhiTexture's backing
VkImage, and then uses that QRhiTexture in a QRhi-based render pass.
This is because QRhi has no knowledge of the image layout if it changes
due to commands recorded by direct Vulkan calls, and not via QRhi
itself. So, except for certain simple cases, one will end up with
incorrect image layout transitions in the barriers. (at minimum this
will be caught by the validation layer)
To remedy this, add a simple function taking the layout as int (we already
do the opposite in nativeTexture()).
Task-number: QTBUG-82435
Change-Id: Ic9e9c1b820b018f3b236742f99fe99fa6de63d36
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/vulkan/qvulkanwindow.cpp')
0 files changed, 0 insertions, 0 deletions