diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-02-23 15:05:44 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-03-03 18:25:56 +0100 |
commit | 753e4d82be966b82ff6ba41a0e7c4452f494790a (patch) | |
tree | 2c5a6ef94dc9bf29cb2ff972d707190850ee572a /src/gui/rhi/qrhivulkan_p_p.h | |
parent | 7b8616859adcb0c8b38591b0e9c1165c986bad92 (diff) |
rhi: Execute pending host writes on nativeBuffer() query
Otherwise it is impossible to write an application that pulls out the
VkBuffer for a Dynamic QRhiBuffer, and then uses it with custom Vulkan
operations that read from the buffer. More precisely, the problem arises
only if the buffer in question is not used in combination with any QRhi
operations, because in that case there is nothing that would trigger
doing the host writes queued up by a resource batch's updateDynamicBuffer().
Task-number: QTBUG-82435
Change-Id: Ieb54422f1493921bc6d4d029be56130cd3a1362a
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhivulkan_p_p.h')
-rw-r--r-- | src/gui/rhi/qrhivulkan_p_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/rhi/qrhivulkan_p_p.h b/src/gui/rhi/qrhivulkan_p_p.h index 6322882569..0f0a89cbff 100644 --- a/src/gui/rhi/qrhivulkan_p_p.h +++ b/src/gui/rhi/qrhivulkan_p_p.h @@ -778,7 +778,7 @@ public: size_t *curOfs, void *mp, BufferImageCopyList *copyInfos); void enqueueResourceUpdates(QVkCommandBuffer *cbD, QRhiResourceUpdateBatch *resourceUpdates); - void executeBufferHostWritesForCurrentFrame(QVkBuffer *bufD); + void executeBufferHostWritesForSlot(QVkBuffer *bufD, int slot); void enqueueTransitionPassResources(QVkCommandBuffer *cbD); void recordPrimaryCommandBuffer(QVkCommandBuffer *cbD); void trackedRegisterBuffer(QRhiPassResourceTracker *passResTracker, |