diff options
Diffstat (limited to 'src/gui/rhi/qrhi_p.h')
-rw-r--r-- | src/gui/rhi/qrhi_p.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhi_p.h b/src/gui/rhi/qrhi_p.h index 05df169a35..b5429372a8 100644 --- a/src/gui/rhi/qrhi_p.h +++ b/src/gui/rhi/qrhi_p.h @@ -149,6 +149,7 @@ public: QSize *blockDim) const; void textureFormatInfo(QRhiTexture::Format format, const QSize &size, quint32 *bpl, quint32 *byteSize, quint32 *bytesPerPixel) const; + bool isStencilSupportingFormat(QRhiTexture::Format format) const; void registerResource(QRhiResource *res, bool ownsNativeResources = true) { @@ -178,6 +179,16 @@ public: cleanupCallbacks.append(callback); } + void addCleanupCallback(const void *key, const QRhi::CleanupCallback &callback) + { + keyedCleanupCallbacks[key] = callback; + } + + void removeCleanupCallback(const void *key) + { + keyedCleanupCallbacks.remove(key); + } + bool sanityCheckGraphicsPipeline(QRhiGraphicsPipeline *ps); bool sanityCheckShaderResourceBindings(QRhiShaderResourceBindings *srb); void updateLayoutDesc(QRhiShaderResourceBindings *srb); @@ -221,6 +232,8 @@ public: return a.d.binding < b.d.binding; } + int effectiveSampleCount(int sampleCount) const; + QRhi *q; static const int MAX_SHADER_CACHE_ENTRIES = 128; @@ -238,6 +251,7 @@ private: QHash<QRhiResource *, bool> resources; QSet<QRhiResource *> pendingDeleteResources; QVarLengthArray<QRhi::CleanupCallback, 4> cleanupCallbacks; + QHash<const void *, QRhi::CleanupCallback> keyedCleanupCallbacks; QElapsedTimer pipelineCreationTimer; qint64 accumulatedPipelineCreationTime = 0; |