diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-08-27 12:49:38 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-08-29 10:23:15 +0200 |
commit | 2602209f545ea3873f0dc880c258669a508d283a (patch) | |
tree | c6bd770239f740af72161bac3c487edd122dd193 /src/gui/rhi/qrhi_p.h | |
parent | 0077e0f88cd3dfa59779ef121e4010f309f2ff7a (diff) |
rhi: vulkan: Introduce secondary command buffer usage
As an option. Must opt in via setting ExternalContentsInPass in
the flags for beginFrame(). It is somewhat unfortunate to require
declaring this up front, but forcing using secondary command buffers
always, even though beginExternal() may not be used in many applications,
would be an overkill.
Change-Id: I8d52bcab40c96f89f140c4c7877b6c459925e3c7
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi_p.h')
-rw-r--r-- | src/gui/rhi/qrhi_p.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/rhi/qrhi_p.h b/src/gui/rhi/qrhi_p.h index 51c60f1831..2d36c19e99 100644 --- a/src/gui/rhi/qrhi_p.h +++ b/src/gui/rhi/qrhi_p.h @@ -1326,6 +1326,7 @@ public: }; enum BeginFrameFlag { + ExternalContentsInPass = 0x01 }; Q_DECLARE_FLAGS(BeginFrameFlags, BeginFrameFlag) @@ -1386,8 +1387,8 @@ public: bool isRecordingFrame() const; int currentFrameSlot() const; - FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb); - FrameOpResult endOffscreenFrame(); + FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, BeginFrameFlags flags = BeginFrameFlags()); + FrameOpResult endOffscreenFrame(EndFrameFlags flags = EndFrameFlags()); QRhi::FrameOpResult finish(); |