diff options
Diffstat (limited to 'src/plugins/renderers/rhi/graphicshelpers/submissioncontext_p.h')
-rw-r--r-- | src/plugins/renderers/rhi/graphicshelpers/submissioncontext_p.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/plugins/renderers/rhi/graphicshelpers/submissioncontext_p.h b/src/plugins/renderers/rhi/graphicshelpers/submissioncontext_p.h index dba99e505..6a1091e51 100644 --- a/src/plugins/renderers/rhi/graphicshelpers/submissioncontext_p.h +++ b/src/plugins/renderers/rhi/graphicshelpers/submissioncontext_p.h @@ -191,6 +191,17 @@ public: StateVariant* getState(RenderStateSet *ss, StateMask type) const; + // Swap chain + + + struct SwapChainInfo + { + QRhiSwapChain *swapChain = nullptr; + QRhiRenderBuffer *renderBuffer = nullptr; + QRhiRenderPassDescriptor *renderPassDescriptor = nullptr; + }; + SwapChainInfo* swapChainForSurface(QSurface* surface) noexcept; + QRhiResourceUpdateBatch *m_currentUpdates{}; @@ -198,10 +209,10 @@ public: QRhiCommandBuffer *currentFrameCommandBuffer() const; QRhiRenderTarget *currentFrameRenderTarget() const; QRhiRenderPassDescriptor *currentRenderPassDescriptor() const; + QRhiSwapChain *currentSwapChain() const; QSurfaceFormat format() const noexcept; private: - // Material Material* activeMaterial() const { return m_material; } void setActiveMaterial(Material* rmat); @@ -223,6 +234,7 @@ private: void applyState(const StateVariant &state, QRhiGraphicsPipeline *graphicsPipeline); + bool m_ownCurrent; const unsigned int m_id; QSurface *m_surface; @@ -249,22 +261,10 @@ private: GraphicsApiFilterData m_contextInfo; QRhi* m_rhi; - - struct SwapChainInfo - { - QRhiSwapChain *swapChain = nullptr; - QRhiRenderBuffer *renderBuffer = nullptr; - QRhiRenderPassDescriptor *renderPassDescriptor = nullptr; - }; - QHash<QSurface *, SwapChainInfo> m_swapChains; QRhiSwapChain *m_currentSwapChain; QRhiRenderPassDescriptor *m_currentRenderPassDescriptor; -#if QT_CONFIG(vulkan) - QVulkanInstance *m_vkInstance; - bool m_ownsVkInstance{}; -#endif #ifndef QT_NO_OPENGL QOffscreenSurface *m_fallbackSurface; #endif |