diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-11 16:16:29 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-11 16:23:19 +0200 |
commit | f4b4c4f79b629498f3cddbbc10df8c1b4d6020d9 (patch) | |
tree | 4119707660438ff58bd51f9cbe0f9e2a33f4b806 /src/gui/rhi/qrhigles2_p_p.h | |
parent | 9bd6cec74dbbc5aece55dc0c8808494db29b9963 (diff) | |
parent | 93f2f33a49f6c96a4f94f344edf03164ed944d02 (diff) |
Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
Diffstat (limited to 'src/gui/rhi/qrhigles2_p_p.h')
-rw-r--r-- | src/gui/rhi/qrhigles2_p_p.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/gui/rhi/qrhigles2_p_p.h b/src/gui/rhi/qrhigles2_p_p.h index 88a6144b42..6da529be92 100644 --- a/src/gui/rhi/qrhigles2_p_p.h +++ b/src/gui/rhi/qrhigles2_p_p.h @@ -525,19 +525,16 @@ struct QGles2CommandBuffer : public QRhiCommandBuffer } void resetCommands() { commands.clear(); - // beginExternal() can lead to calling resetCommands() inside a pass, - // hence the condition - if (recordingPass == NoPass) { - passResTrackers.clear(); - currentPassResTrackerIndex = -1; - } dataRetainPool.clear(); imageRetainPool.clear(); + + passResTrackers.clear(); + currentPassResTrackerIndex = -1; } void resetState() { - resetCommands(); recordingPass = NoPass; currentTarget = nullptr; + resetCommands(); resetCachedState(); } void resetCachedState() { @@ -605,8 +602,8 @@ public: QRhiSwapChain *createSwapChain() override; QRhi::FrameOpResult beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override; QRhi::FrameOpResult endFrame(QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override; - QRhi::FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb) override; - QRhi::FrameOpResult endOffscreenFrame() override; + QRhi::FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override; + QRhi::FrameOpResult endOffscreenFrame(QRhi::EndFrameFlags flags) override; QRhi::FrameOpResult finish() override; void resourceUpdate(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override; @@ -671,7 +668,6 @@ public: bool ensureContext(QSurface *surface = nullptr) const; void executeDeferredReleases(); - QRhi::FrameOpResult flushCommandBuffer(); void trackedBufferBarrier(QGles2CommandBuffer *cbD, QGles2Buffer *bufD, QGles2Buffer::Access access); void trackedImageBarrier(QGles2CommandBuffer *cbD, QGles2Texture *texD, QGles2Texture::Access access); void enqueueSubresUpload(QGles2Texture *texD, QGles2CommandBuffer *cbD, @@ -692,8 +688,8 @@ public: const uint *dynOfsPairs, int dynOfsCount); QGles2RenderTargetData *enqueueBindFramebuffer(QRhiRenderTarget *rt, QGles2CommandBuffer *cbD, bool *wantsColorClear = nullptr, bool *wantsDsClear = nullptr); + void enqueueBarriersForPass(QGles2CommandBuffer *cbD); int effectiveSampleCount(int sampleCount) const; - QSize safeTextureSize(const QSize &size) const; bool compileShader(GLuint program, const QRhiShaderStage &shaderStage, QShaderDescription *desc, int *glslVersionUsed); bool linkProgram(GLuint program); @@ -717,8 +713,7 @@ public: maxTextureSize(2048), maxDrawBuffers(4), msaaRenderBuffer(false), - npotTexture(true), - npotTextureRepeat(true), + npotTextureFull(true), gles(false), fixedIndexPrimitiveRestart(false), bgraExternalFormat(false), @@ -747,8 +742,7 @@ public: // Multisample fb and blit are supported (GLES 3.0 or OpenGL 3.x). Not // the same as multisample textures! uint msaaRenderBuffer : 1; - uint npotTexture : 1; - uint npotTextureRepeat : 1; + uint npotTextureFull : 1; uint gles : 1; uint fixedIndexPrimitiveRestart : 1; uint bgraExternalFormat : 1; @@ -768,6 +762,7 @@ public: uint instancing : 1; uint baseVertex : 1; uint compute : 1; + uint textureCompareMode : 1; } caps; QGles2SwapChain *currentSwapChain = nullptr; QVector<GLint> supportedCompressedFormats; |