24 QNullBuffer(QRhiImplementation *rhi, Type type, UsageFlags usage, quint32 size);
36 int sampleCount, QRhiRenderBuffer::Flags flags,
37 QRhiTexture::Format backingFormatHint);
49 QNullTexture(QRhiImplementation *rhi, Format format,
const QSize &pixelSize,
int depth,
50 int arraySize,
int sampleCount, Flags flags);
63 QNullSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
64 AddressMode u, AddressMode v, AddressMode w);
75 bool isCompatible(
const QRhiRenderPassDescriptor *other)
const override;
175 QRhiNull(QRhiNullInitParams *params);
177 bool create(QRhi::Flags flags)
override;
184 QRhiBuffer::UsageFlags usage,
185 quint32 size)
override;
187 const QSize &pixelSize,
189 QRhiRenderBuffer::Flags flags,
190 QRhiTexture::Format backingFormatHint)
override;
192 const QSize &pixelSize,
196 QRhiTexture::Flags flags)
override;
198 QRhiSampler::Filter minFilter,
199 QRhiSampler::Filter mipmapMode,
200 QRhiSampler:: AddressMode u,
201 QRhiSampler::AddressMode v,
202 QRhiSampler::AddressMode w)
override;
205 QRhiTextureRenderTarget::Flags flags)
override;
219 QRhiRenderTarget *rt,
220 const QColor &colorClearValue,
221 const QRhiDepthStencilClearValue &depthStencilClearValue,
222 QRhiResourceUpdateBatch *resourceUpdates,
223 QRhiCommandBuffer::BeginPassFlags flags)
override;
224 void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
override;
227 QRhiGraphicsPipeline *ps)
override;
230 QRhiShaderResourceBindings *srb,
231 int dynamicOffsetCount,
232 const QRhiCommandBuffer::DynamicOffset *dynamicOffsets)
override;
235 int startBinding,
int bindingCount,
const QRhiCommandBuffer::VertexInput *bindings,
236 QRhiBuffer *indexBuf, quint32 indexOffset,
237 QRhiCommandBuffer::IndexFormat indexFormat)
override;
239 void setViewport(QRhiCommandBuffer *cb,
const QRhiViewport &viewport)
override;
240 void setScissor(QRhiCommandBuffer *cb,
const QRhiScissor &scissor)
override;
242 void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue)
override;
243 void setShadingRate(QRhiCommandBuffer *cb,
const QSize &coarsePixelSize)
override;
245 void draw(QRhiCommandBuffer *cb, quint32 vertexCount,
246 quint32 instanceCount, quint32 firstVertex, quint32 firstInstance)
override;
248 void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount,
249 quint32 instanceCount, quint32 firstIndex,
250 qint32 vertexOffset, quint32 firstInstance)
override;
252 void debugMarkBegin(QRhiCommandBuffer *cb,
const QByteArray &name)
override;
254 void debugMarkMsg(QRhiCommandBuffer *cb,
const QByteArray &msg)
override;
257 QRhiResourceUpdateBatch *resourceUpdates,
258 QRhiCommandBuffer::BeginPassFlags flags)
override;
friend bool operator==(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
Returns true if lhs and rhs are equal, otherwise returns false.
friend bool operator!=(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
Returns true if lhs and rhs are different, otherwise returns false.
QRhiBackendCommandList()=default
~QRhiBackendCommandList()
void assign(QByteArray data)
void assign(const char *s, quint32 size)
QRhiBufferData(const QRhiBufferData &other)
quint32 largeAlloc() const
QRhiBufferData & operator=(const QRhiBufferData &other)
const char * constData() const
void setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBindings *srb, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override
double lastCompletedGpuTime(QRhiCommandBuffer *cb) override
QRhi::FrameOpResult endOffscreenFrame(QRhi::EndFrameFlags flags) override
bool isFeatureSupported(QRhi::Feature feature) const override
QRhiNull(QRhiNullInitParams *params)
void debugMarkMsg(QRhiCommandBuffer *cb, const QByteArray &msg) override
void dispatch(QRhiCommandBuffer *cb, int x, int y, int z) override
QRhi::FrameOpResult beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override
void resourceUpdate(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance) override
void beginComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void beginPass(QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void setQueueSubmitParams(QRhiNativeHandles *params) override
bool isClipDepthZeroToOne() const override
void endComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
QNullCommandBuffer offscreenCommandBuffer
void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
QRhi::FrameOpResult endFrame(QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override
QRhi::FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override
bool isYUpInNDC() const override
QRhiDriverInfo driverInfo() const override
void setScissor(QRhiCommandBuffer *cb, const QRhiScissor &scissor) override
void simulateTextureUpload(const QRhiResourceUpdateBatchPrivate::TextureOp &u)
QRhiComputePipeline * createComputePipeline() override
void setPipelineCacheData(const QByteArray &data) override
void setVertexInput(QRhiCommandBuffer *cb, int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings, QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat) override
void debugMarkBegin(QRhiCommandBuffer *cb, const QByteArray &name) override
void draw(QRhiCommandBuffer *cb, quint32 vertexCount, quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override
QByteArray pipelineCacheData() override
const QRhiNativeHandles * nativeHandles() override
void setGraphicsPipeline(QRhiCommandBuffer *cb, QRhiGraphicsPipeline *ps) override
void releaseCachedResources() override
void simulateTextureCopy(const QRhiResourceUpdateBatchPrivate::TextureOp &u)
QRhiTexture * createTexture(QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags) override
QList< QSize > supportedShadingRates(int sampleCount) const override
void simulateTextureGenMips(const QRhiResourceUpdateBatchPrivate::TextureOp &u)
void setShadingRate(QRhiCommandBuffer *cb, const QSize &coarsePixelSize) override
QRhiRenderBuffer * createRenderBuffer(QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) override
bool makeThreadLocalNativeContextCurrent() override
const QRhiNativeHandles * nativeHandles(QRhiCommandBuffer *cb) override
QRhiNullNativeHandles nativeHandlesStruct
bool isYUpInFramebuffer() const override
QRhi::FrameOpResult finish() override
void setComputePipeline(QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
QRhiBuffer * createBuffer(QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size) override
QRhiStats statistics() override
QRhiShadingRateMap * createShadingRateMap() override
void beginExternal(QRhiCommandBuffer *cb) override
QRhiSwapChain * createSwapChain() override
void setViewport(QRhiCommandBuffer *cb, const QRhiViewport &viewport) override
QRhiTextureRenderTarget * createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags) override
QRhiGraphicsPipeline * createGraphicsPipeline() override
bool create(QRhi::Flags flags) override
void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue) override
void debugMarkEnd(QRhiCommandBuffer *cb) override
QList< int > supportedSampleCounts() const override
QMatrix4x4 clipSpaceCorrMatrix() const override
QRhiSampler * createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w) override
QRhiSwapChain * currentSwapChain
int ubufAlignment() const override
bool isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture::Flags flags) const override
int resourceLimit(QRhi::ResourceLimit limit) const override
QRhiShaderResourceBindings * createShaderResourceBindings() override
void setBlendConstants(QRhiCommandBuffer *cb, const QColor &c) override
void endExternal(QRhiCommandBuffer *cb) override
bool isDeviceLost() const override
static TextureStage toPassTrackerTextureStage(QRhiShaderResourceBinding::StageFlags stages)
const QVarLengthFlatMap< QRhiBuffer *, Buffer, 12 > & buffers() const
static BufferStage toPassTrackerBufferStage(QRhiShaderResourceBinding::StageFlags stages)
const QVarLengthFlatMap< QRhiTexture *, Texture, 12 > & textures() const
void registerBuffer(QRhiBuffer *buf, int slot, BufferAccess *access, BufferStage *stage, const UsageState &state)
void registerTexture(QRhiTexture *tex, TextureAccess *access, TextureStage *stage, const UsageState &state)
QVarLengthArray< BufferOp, BUFFER_OPS_STATIC_ALLOC > bufferOps
bool hasOptimalCapacity() const
QVarLengthArray< TextureOp, TEXTURE_OPS_STATIC_ALLOC > textureOps
static const int BUFFER_OPS_STATIC_ALLOC
static QRhiResourceUpdateBatchPrivate * get(QRhiResourceUpdateBatch *b)
void merge(QRhiResourceUpdateBatchPrivate *other)
QRhiResourceUpdateBatch * q
static const int TEXTURE_OPS_STATIC_ALLOC
QDebug operator<<(QDebug dbg, const QFileInfo &fi)
static const char * resourceTypeStr(const QRhiResource *res)
static QRhiPassResourceTracker::BufferStage earlierStage(QRhiPassResourceTracker::BufferStage a, QRhiPassResourceTracker::BufferStage b)
QDebug operator<<(QDebug dbg, const QRhiSwapChainHdrInfo &info)
static bool isImageLoadStore(QRhiPassResourceTracker::TextureAccess access)
static const char * deviceTypeStr(QRhiDriverInfo::DeviceType type)
\variable QRhiDriverInfo::deviceName
static QRhiPassResourceTracker::TextureStage earlierStage(QRhiPassResourceTracker::TextureStage a, QRhiPassResourceTracker::TextureStage b)
Q_DECLARE_TYPEINFO(QRhiPassResourceTracker::Texture, Q_RELOCATABLE_TYPE)
Q_DECLARE_TYPEINFO(QRhiBufferData, Q_RELOCATABLE_TYPE)
T * qrhi_objectFromProxyData(QRhiSwapChainProxyData *pd, QWindow *window, QRhi::Implementation impl, uint objectIndex)
bool operator!=(const QRhiRenderTargetAttachmentTracker::ResId &a, const QRhiRenderTargetAttachmentTracker::ResId &b)
Q_DECLARE_TYPEINFO(QRhiPassResourceTracker::Buffer, Q_RELOCATABLE_TYPE)
bool operator==(const QRhiRenderTargetAttachmentTracker::ResId &a, const QRhiRenderTargetAttachmentTracker::ResId &b)
bool qrhi_toTopLeftRenderTargetRect(const QSize &outputSize, const std::array< T, N > &r, T *x, T *y, T *w, T *h)
constexpr size_t qHash(const QSize &s, size_t seed=0) noexcept
QNullBuffer(QRhiImplementation *rhi, Type type, UsageFlags usage, quint32 size)
bool create() override
Creates the corresponding native graphics resources.
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
char * beginFullDynamicBufferUpdateForCurrentFrame() override
QNullCommandBuffer(QRhiImplementation *rhi)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QNullComputePipeline(QRhiImplementation *rhi)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool create() override
Creates the corresponding native graphics resources.
QNullGraphicsPipeline(QRhiImplementation *rhi)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool create() override
Creates the corresponding native graphics resources.
QNullRenderBuffer(QRhiImplementation *rhi, Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint)
QRhiTexture::Format backingFormat() const override
QNullRenderPassDescriptor(QRhiImplementation *rhi)
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() const override
~QNullRenderPassDescriptor()
QVector< quint32 > serializedFormat() const override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool isCompatible(const QRhiRenderPassDescriptor *other) const override
QRhiRenderTargetAttachmentTracker::ResIdList currentResIdList
QNullRenderPassDescriptor * rp
QNullRenderTargetData(QRhiImplementation *)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QNullSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode, AddressMode u, AddressMode v, AddressMode w)
QNullShaderResourceBindings(QRhiImplementation *rhi)
bool create() override
Creates the corresponding resource binding set.
void updateResources(UpdateFlags flags) override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
~QNullShaderResourceBindings()
QSize pixelSize() const override
float devicePixelRatio() const override
~QNullSwapChainRenderTarget()
QNullSwapChainRenderTarget(QRhiImplementation *rhi, QRhiSwapChain *swapchain)
int sampleCount() const override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool createOrResize() override
Creates the swapchain if not already done and resizes the swapchain buffers to match the current size...
QSize surfacePixelSize() override
QNullSwapChainRenderTarget rt
bool isFormatSupported(Format f) override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QRhiCommandBuffer * currentFrameCommandBuffer() override
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
QRhiRenderTarget * currentFrameRenderTarget() override
QNullSwapChain(QRhiImplementation *rhi)
~QNullTextureRenderTarget()
QSize pixelSize() const override
int sampleCount() const override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
bool create() override
Creates the corresponding native graphics resources.
QNullTextureRenderTarget(QRhiImplementation *rhi, const QRhiTextureRenderTargetDescription &desc, Flags flags)
float devicePixelRatio() const override
bool create() override
Creates the corresponding native graphics resources.
bool createFrom(NativeTexture src) override
Similar to create(), except that no new native textures are created.
QVarLengthArray< std::array< QImage, QRhi::MAX_MIP_LEVELS >, 6 > image
QNullTexture(QRhiImplementation *rhi, Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, Flags flags)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool operator!=(const Batch &other) const
bool operator==(const Batch &other) const
QVarLengthArray< T, 4 > resources
void feed(int binding, T resource)
QVarLengthArray< Batch, 4 > batches
bool operator!=(const QRhiBatchedBindings< T > &other) const
bool operator==(const QRhiBatchedBindings< T > &other) const
char smallData[SMALL_DATA_SIZE]
static constexpr quint32 SMALL_DATA_SIZE
UsageState stateAtPassBegin
UsageState stateAtPassBegin
static void updateResIdList(const QRhiTextureRenderTargetDescription &desc, ResIdList *dst)
static bool isUpToDate(const QRhiTextureRenderTargetDescription &desc, const ResIdList ¤tResIdList)
static void changeToDynamicUpdate(BufferOp *op, QRhiBuffer *buf, quint32 offset, QByteArray data)
static void changeToStaticUpload(BufferOp *op, QRhiBuffer *buf, quint32 offset, QByteArray data)
QRhiReadbackResult * result
static void changeToStaticUpload(BufferOp *op, QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
static BufferOp dynamicUpdate(QRhiBuffer *buf, quint32 offset, QByteArray data)
static BufferOp staticUpload(QRhiBuffer *buf, quint32 offset, QByteArray data)
static BufferOp staticUpload(QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
static BufferOp read(QRhiBuffer *buf, quint32 offset, quint32 size, QRhiReadbackResult *result)
static BufferOp dynamicUpdate(QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
static void changeToDynamicUpdate(BufferOp *op, QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
QRhiTextureCopyDescription desc
static TextureOp copy(QRhiTexture *dst, QRhiTexture *src, const QRhiTextureCopyDescription &desc)
QRhiReadbackDescription rb
QVarLengthArray< MipLevelUploadList, 6 > subresDesc
static TextureOp upload(QRhiTexture *tex, const QRhiTextureUploadDescription &desc)
static TextureOp genMips(QRhiTexture *tex)
static TextureOp read(const QRhiReadbackDescription &rb, QRhiReadbackResult *result)
QRhiReadbackResult * result
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
float maxPotentialColorComponentValue
LuminanceBehavior luminanceBehavior
float maxColorComponentValue
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h