20#include <rhi/qshaderdescription.h>
25#include <QtCore/private/qduplicatetracker_p.h>
30class QOpenGLExtensions;
35 QGles2Buffer(QRhiImplementation *rhi, Type type, UsageFlags usage, quint32 size);
69 int sampleCount, QRhiRenderBuffer::Flags flags,
70 QRhiTexture::Format backingFormatHint);
74 bool createFrom(NativeRenderBuffer src)
override;
97 return a.glminfilter == b.glminfilter
98 && a.glmagfilter == b.glmagfilter
99 && a.glwraps == b.glwraps
100 && a.glwrapt == b.glwrapt
101 && a.glwrapr == b.glwrapr
102 && a.gltexcomparefunc == b.gltexcomparefunc;
112 QGles2Texture(QRhiImplementation *rhi, Format format,
const QSize &pixelSize,
int depth,
113 int arraySize,
int sampleCount, Flags flags);
139 return specified || (allocatedLevels[face] & (1u << uint(level)));
163 QGles2Sampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
164 AddressMode u, AddressMode v, AddressMode w);
179 bool isCompatible(
const QRhiRenderPassDescriptor *other)
const override;
274using QGles2UniformDescriptionVector = QVarLengthArray<QGles2UniformDescription, 8>;
275using QGles2SamplerDescriptionVector = QVarLengthArray<QGles2SamplerDescription, 4>;
285using QGles2UniformStateVector = QVarLengthArray<QGles2UniformState, 8>;
381 GLuint timestampQuery;
384 GLuint timestampQuery;
398 QRhiGraphicsPipeline *ps;
401 QRhiGraphicsPipeline *ps;
412 QRhiGraphicsPipeline *ps;
415 quint32 instanceCount;
416 quint32 baseInstance;
419 QRhiGraphicsPipeline *ps;
422 quint32 instanceCount;
423 quint32 baseInstance;
427 QRhiGraphicsPipeline *ps;
434 QRhiGraphicsPipeline *ps;
439 } drawIndexedIndirect;
441 QRhiGraphicsPipeline *ps;
446 quint32 maxDrawCount;
450 QRhiGraphicsPipeline *ps;
455 quint32 maxDrawCount;
457 } drawIndexedIndirectCount;
459 QRhiGraphicsPipeline *ps;
460 } bindGraphicsPipeline;
462 QRhiGraphicsPipeline *maybeGraphicsPs;
463 QRhiComputePipeline *maybeComputePs;
464 QRhiShaderResourceBindings *srb;
465 int dynamicOffsetCount;
466 quint32 dynamicOffsetPoolOffset;
467 } bindShaderResources;
469 QRhiGraphicsPipeline *maybeGraphicsPs;
470 QRhiComputePipeline *maybeComputePs;
485 QRhiSwapChain::StereoTargetBuffer stereoTarget;
495 QRhiReadbackResult *result;
514 } clearBufferSubData;
517 GLenum srcFaceTarget;
525 GLenum dstFaceTarget;
534 QRhiReadbackResult *result;
540 QRhiTexture::Format format;
586 } compressedSubImage;
589 GLuint stencilRenderbuffer;
598 } blitFromRenderbuffer;
618 QRhiComputePipeline *ps;
619 } bindComputePipeline;
639 } invalidateFramebuffer;
704 GLint stencilRef = 0;
715 writtenResources.clear();
723 } textureUnitState[16];
733 dataRetainPool.append(data);
734 return dataRetainPool.last().constData();
737 bufferDataRetainPool.append(data);
738 return reinterpret_cast<
const uchar *>(bufferDataRetainPool.last().constData());
741 imageRetainPool.append(image);
742 return imageRetainPool.last().constBits();
746 pushConstantPool.clear();
747 dynamicOffsetPool.clear();
748 dataRetainPool.clear();
749 bufferDataRetainPool.clear();
750 imageRetainPool.clear();
752 passResTrackers.clear();
759 currentTarget =
nullptr;
764 currentGraphicsPipeline =
nullptr;
765 currentComputePipeline =
nullptr;
767 currentGraphicsSrb =
nullptr;
768 currentComputeSrb =
nullptr;
770 pushConstantData.clear();
771 graphicsPassState.reset();
773 memset(textureUnitState, 0,
sizeof(textureUnitState));
780 return a.func == b.func
781 && a.failOp == b.failOp
782 && a.zfailOp == b.zfailOp
783 && a.zpassOp == b.zpassOp;
807 return a.srcColor == b.srcColor
808 && a.dstColor == b.dstColor
809 && a.srcAlpha == b.srcAlpha
810 && a.dstAlpha == b.dstAlpha
811 && a.opColor == b.opColor
812 && a.opAlpha == b.opAlpha;
864 QRhiGles2(QRhiGles2InitParams *params, QRhiGles2NativeHandles *importDevice =
nullptr);
866 bool create(QRhi::Flags flags)
override;
873 QRhiBuffer::UsageFlags usage,
874 quint32 size)
override;
876 const QSize &pixelSize,
878 QRhiRenderBuffer::Flags flags,
879 QRhiTexture::Format backingFormatHint)
override;
881 const QSize &pixelSize,
885 QRhiTexture::Flags flags)
override;
887 QRhiSampler::Filter minFilter,
888 QRhiSampler::Filter mipmapMode,
889 QRhiSampler:: AddressMode u,
890 QRhiSampler::AddressMode v,
891 QRhiSampler::AddressMode w)
override;
894 QRhiTextureRenderTarget::Flags flags)
override;
908 QRhiRenderTarget *rt,
909 const QColor &colorClearValue,
910 const QRhiDepthStencilClearValue &depthStencilClearValue,
911 QRhiResourceUpdateBatch *resourceUpdates,
912 QRhiCommandBuffer::BeginPassFlags flags)
override;
913 void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
override;
916 QRhiGraphicsPipeline *ps)
override;
919 QRhiShaderResourceBindings *srb,
920 int dynamicOffsetCount,
921 const QRhiCommandBuffer::DynamicOffset *dynamicOffsets)
override;
924 int startBinding,
int bindingCount,
const QRhiCommandBuffer::VertexInput *bindings,
925 QRhiBuffer *indexBuf, quint32 indexOffset,
926 QRhiCommandBuffer::IndexFormat indexFormat)
override;
928 void setViewport(QRhiCommandBuffer *cb,
const QRhiViewport &viewport)
override;
929 void setScissor(QRhiCommandBuffer *cb,
const QRhiScissor &scissor)
override;
931 void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue)
override;
932 void setPushConstants(QRhiCommandBuffer *cb, quint32 offset, quint32 size,
const void *data)
override;
934 void setShadingRate(QRhiCommandBuffer *cb,
const QSize &coarsePixelSize)
override;
936 void draw(QRhiCommandBuffer *cb, quint32 vertexCount,
937 quint32 instanceCount, quint32 firstVertex, quint32 firstInstance)
override;
939 void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount,
940 quint32 instanceCount, quint32 firstIndex,
941 qint32 vertexOffset, quint32 firstInstance)
override;
943 void drawIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer,
944 quint32 indirectBufferOffset, quint32 drawCount, quint32 stride)
override;
947 quint32 indirectBufferOffset, quint32 drawCount, quint32 stride)
override;
950 QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset,
951 QRhiBuffer *countBuffer, quint32 countBufferOffset,
952 quint32 maxDrawCount, quint32 stride)
override;
954 QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset,
955 QRhiBuffer *countBuffer, quint32 countBufferOffset,
956 quint32 maxDrawCount, quint32 stride)
override;
959 quint32 indirectBufferOffset)
override;
961 void debugMarkBegin(QRhiCommandBuffer *cb,
const QByteArray &name)
override;
963 void debugMarkMsg(QRhiCommandBuffer *cb,
const QByteArray &msg)
override;
966 QRhiResourceUpdateBatch *resourceUpdates,
967 QRhiCommandBuffer::BeginPassFlags flags)
override;
1006 int layer,
int level,
const QRhiTextureSubresourceUploadDescription &subresDesc);
1020 void *ps, uint psGeneration,
int glslLocation,
1021 int *texUnit,
bool *activeTexUnitAltered);
1023 QRhiGraphicsPipeline *maybeGraphicsPs, QRhiComputePipeline *maybeComputePs,
1024 QRhiShaderResourceBindings *srb,
1025 const uint *dynOfsPairs,
int dynOfsCount);
1029 QGles2UniformDescriptionVector *pushConstantUniforms,
1030 QGles2UniformStateVector *uniformState);
1032 const char *blockData, qint64 blockSize, quint32 blockOffset,
1035 bool *wantsColorClear =
nullptr,
bool *wantsDsClear =
nullptr);
1040 std::optional<QShaderVersion> commonVersion =
std::nullopt);
1041 bool compileShader(GLuint program,
const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion,
1042 std::optional<QShaderVersion> commonVersion =
std::nullopt);
1046 const QByteArray &namePrefix,
int binding,
int baseOffset,
1048 ActiveUniformLocationTracker *activeUniformLocations,
1049 QGles2UniformDescriptionVector *dst);
1051 const QList<QShaderDescription::BlockVariable> &members,
1052 ActiveUniformLocationTracker *activeUniformLocations,
1053 QGles2UniformDescriptionVector *dst);
1054 void gatherUniforms(GLuint program,
const QShaderDescription::UniformBlock &ub,
1055 ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst);
1057 ActiveUniformLocationTracker *activeUniformLocations,
1058 QGles2UniformDescriptionVector *dst);
1059 void gatherSamplers(GLuint program,
const QShaderDescription::InOutVariable &v,
1060 QGles2SamplerDescriptionVector *dst);
1062 const QShader::SeparateToCombinedImageSamplerMapping &mapping,
1063 QGles2SamplerDescriptionVector *dst);
1075 const QVector<QShaderDescription::InOutVariable> &inputVars,
1076 QByteArray *cacheKey,
1077 std::optional<QShaderVersion> commonVersion =
std::nullopt);
1089 QOpenGLExtensions *
f =
nullptr;
1092 const void *) =
nullptr;
1095 const GLvoid *) =
nullptr;
1099 const GLvoid *) =
nullptr;
1101 GLsizei,
const GLvoid *) =
nullptr;
1306 GLuint renderbuffer;
1307 GLuint renderbuffer2;
1311 GLuint nonMsaaThrowawayDepthTexture;
1312 } textureRenderTarget;
1358 return quint32(d.data.size());
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 execute(QRhiCommandBuffer *cb, quint32 firstCommand, quint32 commandCount)
QRhiBufferBackedIndirectCommandBuffer(QRhiImplementation *rhi, Type type, quint32 maxCommandCount)
\variable QRhiIndirectCommandBufferBuildInfo::topology
void enqueueUpload(QRhiResourceUpdateBatch *u)
QRhiIndirectCommandBufferBuildInfo buildInfo
~QRhiBufferBackedIndirectCommandBuffer()
quint64 uploadedGeneration
void build(const QRhiIndirectCommandBufferBuildInfo &info)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool create() override
Creates the corresponding native objects.
void swap(QRhiBufferData &other) noexcept
void assign(QByteArray data)
void assign(const char *s, quint32 size)
QRhiBufferData(const QRhiBufferData &other)
quint32 largeAlloc() const
QRhiBufferData(QRhiBufferData &&other) noexcept
QRhiBufferData & operator=(const QRhiBufferData &other)
const char * constData() const
const GLvoid const GLvoid GLenum
QRhiStats statistics() override
void releaseBufferNameCache()
const QRhiNativeHandles * nativeHandles(QRhiCommandBuffer *cb) override
void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance) override
QOpenGLContext * maybeShareContext
void gatherUniforms(GLuint program, const QShaderDescription::UniformBlock &ub, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst)
void trackedBufferBarrier(QGles2CommandBuffer *cbD, QGles2Buffer *bufD, QGles2Buffer::Access access)
void gatherBlockMemberUniforms(GLuint program, const QByteArray &prefix, int binding, const QList< QShaderDescription::BlockVariable > &members, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst)
QRhi::FrameOpResult beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override
std::optional< QShaderVersion > commonGlslEsVersion(const QRhiShaderStage *stages, int stageCount) const
void enqueueBarriersForPass(QGles2CommandBuffer *cbD)
QList< DeferredReleaseEntry > releaseQueue
void drawIndirectCount(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCount, quint32 stride) override
int resourceLimit(QRhi::ResourceLimit limit) const override
void setVertexInput(QRhiCommandBuffer *cb, int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings, QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat) override
void(QOPENGLF_APIENTRYP glRenderbufferStorageMultisampleEXT)(GLenum
bool isFeatureSupported(QRhi::Feature feature) const override
static void setupUniformStateTracking(QGles2UniformDescriptionVector *uniforms, QGles2UniformDescriptionVector *pushConstantUniforms, QGles2UniformStateVector *uniformState)
QRhiGraphicsPipeline * createGraphicsPipeline() override
void bindShaderResources(QGles2CommandBuffer *cbD, QRhiGraphicsPipeline *maybeGraphicsPs, QRhiComputePipeline *maybeComputePs, QRhiShaderResourceBindings *srb, const uint *dynOfsPairs, int dynOfsCount)
bool create(QRhi::Flags flags) override
void trackedRegisterTexture(QRhiPassResourceTracker *passResTracker, QGles2Texture *texD, QRhiPassResourceTracker::TextureAccess access, QRhiPassResourceTracker::TextureStage stage)
void executeBindGraphicsPipeline(QGles2CommandBuffer *cbD, QGles2GraphicsPipeline *psD)
void dispatchIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset) override
QRhiDriverInfo driverInfo() const override
QSurfaceFormat requestedFormat
bool isProgramBinaryDiskCacheEnabled() const
void(QOPENGLF_APIENTRYP glFramebufferTextureMultisampleMultiviewOVR)(GLenum
bool needsMakeCurrentDueToSwap
QRhiShadingRateMap * createShadingRateMap() override
const void quint64 GLuint
void setUniformsFromBlock(const QGles2UniformDescriptionVector &uniforms, int binding, const char *blockData, qint64 blockSize, quint32 blockOffset, QGles2UniformState *uniformState)
void trackedImageBarrier(QGles2CommandBuffer *cbD, QGles2Texture *texD, QGles2Texture::Access access)
void trackedRegisterBuffer(QRhiPassResourceTracker *passResTracker, QGles2Buffer *bufD, QRhiPassResourceTracker::BufferAccess access, QRhiPassResourceTracker::BufferStage stage)
void setShadingRate(QRhiCommandBuffer *cb, const QSize &coarsePixelSize) override
void gatherPushConstantUniforms(GLuint program, const QShaderDescription::PushConstantBlock &pcb, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst)
QRhiComputePipeline * createComputePipeline() override
QRhiDriverInfo driverInfoStruct
QSurface * evaluateFallbackSurface() const
void resourceUpdate(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void sanityCheckVertexFragmentInterface(const QShaderDescription &vsDesc, const QShaderDescription &fsDesc)
QRhiGles2NativeHandles nativeHandlesStruct
QMatrix4x4 clipSpaceCorrMatrix() const override
QRhi::FrameOpResult finish() override
void setComputePipeline(QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
const void * void(QOPENGLF_APIENTRYP glGetQueryObjectui64v)(GLuint
void(QOPENGLF_APIENTRYP glMultiDrawArraysIndirect)(GLenum
QList< int > supportedSampleCounts() const override
void gatherSamplers(GLuint program, const QShaderDescription::InOutVariable &v, QGles2SamplerDescriptionVector *dst)
QSet< GLint > supportedCompressedFormats
void(QOPENGLF_APIENTRYP glMultiDrawElementsIndirectCount)(GLenum
static constexpr quint32 MAX_PUSH_CONSTANTS_SIZE
QRhiSwapChain * createSwapChain() override
void dispatch(QRhiCommandBuffer *cb, int x, int y, int z) override
QRhiBinaryCache< QByteArray, PipelineCacheData > m_pipelineCache
QRhiRenderBuffer * createRenderBuffer(QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) override
void executeCommandBuffer(QRhiCommandBuffer *cb)
void setGraphicsPipeline(QRhiCommandBuffer *cb, QRhiGraphicsPipeline *ps) override
QList< QShaderVersion > glslVersionsToTry() const
QSurface * fallbackSurface
QRhiGles2(QRhiGles2InitParams *params, QRhiGles2NativeHandles *importDevice=nullptr)
void trySaveToDiskCache(GLuint program, const QByteArray &cacheKey)
GLbitfield barriersForNextDispatch(QGles2CommandBuffer *cbD)
QList< QSize > supportedShadingRates(int sampleCount) const override
void drawIndexedIndirectCount(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCount, quint32 stride) override
void(QOPENGLF_APIENTRYP glTexSubImage1D)(GLenum
QRhiTexture * createTexture(QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags) override
void bindCombinedSampler(QGles2CommandBuffer *cbD, QGles2Texture *texD, QGles2Sampler *samplerD, void *ps, uint psGeneration, int glslLocation, int *texUnit, bool *activeTexUnitAltered)
void setViewport(QRhiCommandBuffer *cb, const QRhiViewport &viewport) override
QRhiTextureRenderTarget * createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags) override
QByteArray shaderSource(const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion, std::optional< QShaderVersion > commonVersion=std::nullopt)
void(QOPENGLF_APIENTRYP glMultiDrawElementsIndirect)(GLenum
QRhiSampler * createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w) override
void beginPass(QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
QGles2SwapChain * currentSwapChain
bool isDeviceLost() const override
QRhiShaderResourceBindings * createShaderResourceBindings() override
void drawIndexedIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override
void drawIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override
bool isYUpInNDC() const override
void debugMarkBegin(QRhiCommandBuffer *cb, const QByteArray &name) override
void enqueueResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
void setQueueSubmitParams(QRhiNativeHandles *params) override
std::array< GLuint, 8 > bufferNameCache
bool makeThreadLocalNativeContextCurrent() override
int ubufAlignment() const override
void beginExternal(QRhiCommandBuffer *cb) override
void endExternal(QRhiCommandBuffer *cb) override
bool isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture::Flags flags) const override
ProgramCacheResult tryLoadFromDiskOrPipelineCache(const QRhiShaderStage *stages, int stageCount, GLuint program, const QVector< QShaderDescription::InOutVariable > &inputVars, QByteArray *cacheKey, std::optional< QShaderVersion > commonVersion=std::nullopt)
QRhiBuffer * createBuffer(QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size) override
void(QOPENGLF_APIENTRYP glCompressedTexImage1D)(GLenum
void(QOPENGLF_APIENTRYP glDrawElementsInstancedBaseVertexBaseInstance)(GLenum
void setScissor(QRhiCommandBuffer *cb, const QRhiScissor &scissor) override
void setUniformValue(const QGles2UniformDescription &uniform, const void *src, QGles2UniformState *uniformState)
void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue) override
bool ensureContext(QSurface *surface=nullptr) const
void draw(QRhiCommandBuffer *cb, quint32 vertexCount, quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override
void endComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void(QOPENGLF_APIENTRYP glQueryCounter)(GLuint
QHash< std::pair< QRhiShaderStage, QShaderVersion >, uint > m_shaderCache
void(QOPENGLF_APIENTRYP glDrawArraysInstancedBaseInstance)(GLenum
void beginComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
bool isYUpInFramebuffer() const override
bool linkProgram(GLuint program)
void debugMarkMsg(QRhiCommandBuffer *cb, const QByteArray &msg) override
QGles2RenderTargetData * enqueueBindFramebuffer(QRhiRenderTarget *rt, QGles2CommandBuffer *cbD, bool *wantsColorClear=nullptr, bool *wantsDsClear=nullptr)
void debugMarkEnd(QRhiCommandBuffer *cb) override
void setBlendConstants(QRhiCommandBuffer *cb, const QColor &c) override
void registerUniformIfActive(const QShaderDescription::BlockVariable &var, const QByteArray &namePrefix, int binding, int baseOffset, GLuint program, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst)
void setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBindings *srb, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override
void releaseCachedResources() override
bool isClipDepthZeroToOne() const override
void trySaveToPipelineCache(GLuint program, const QByteArray &cacheKey, bool force=false)
bool compileShader(GLuint program, const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion, std::optional< QShaderVersion > commonVersion=std::nullopt)
void executeDeferredReleases()
QByteArray pipelineCacheData() override
double lastCompletedGpuTime(QRhiCommandBuffer *cb) override
QRhi::FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override
QList< int > supportedSampleCountList
QPointer< QWindow > maybeWindow
void enqueueSubresUpload(QGles2Texture *texD, QGles2CommandBuffer *cbD, int layer, int level, const QRhiTextureSubresourceUploadDescription &subresDesc)
void setPushConstants(QRhiCommandBuffer *cb, quint32 offset, quint32 size, const void *data) override
QRhi::FrameOpResult endFrame(QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override
void setPipelineCacheData(const QByteArray &data) override
QRhi::FrameOpResult endOffscreenFrame(QRhi::EndFrameFlags flags) override
void gatherGeneratedSamplers(GLuint program, const QShader::SeparateToCombinedImageSamplerMapping &mapping, QGles2SamplerDescriptionVector *dst)
const QRhiNativeHandles * nativeHandles() override
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
void setPushConstants(QRhiCommandBuffer *cb, quint32 offset, quint32 size, const void *data) override
void dispatchIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset) 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
void drawIndirectCount(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCount, quint32 stride) override
void drawIndexedIndirectCount(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCount, quint32 stride) 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
void drawIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) 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
void drawIndexedIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) 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
const value_type * const_iterator
const_iterator end() const
void append(Key key, const T &value)
const_iterator find(Key key) const
std::pair< Key, T > value_type
const_iterator begin() const
bool contains(Key key) const
const_iterator cend() const
const_iterator cbegin() const
static TextureStage toPassTrackerTextureStage(QRhiShaderResourceBinding::StageFlags stages)
static BufferStage toPassTrackerBufferStage(QRhiShaderResourceBinding::StageFlags stages)
const QRhiPassResourceMap< 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)
const QRhiPassResourceMap< QRhiBuffer *, Buffer, 12 > & buffers() const
QRhiPipelineCacheDataReader(const char *data, quint32 size)
bool readByteArray(QByteArray *dst)
bool readUInt32(quint32 *dst)
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
Combined button and popup list for selecting options.
QDebug operator<<(QDebug dbg, const QFileInfo &fi)
#define QOPENGLF_APIENTRYP
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 auto & emplaceData(QRhiShaderResourceBinding::Data &d)
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)
quint32 qrhiBinaryCacheEntryByteSize(const QByteArray &data)
bool qrhi_toTopLeftRenderTargetRect(const QSize &outputSize, const std::array< T, N > &r, T *x, T *y, T *w, T *h)
bool operator!=(const QGles2CommandBuffer::GraphicsPassState::Blend &a, const QGles2CommandBuffer::GraphicsPassState::Blend &b)
bool operator!=(const QGles2SamplerData &a, const QGles2SamplerData &b)
bool operator==(const QGles2CommandBuffer::GraphicsPassState::StencilFace &a, const QGles2CommandBuffer::GraphicsPassState::StencilFace &b)
bool operator==(const QGles2CommandBuffer::GraphicsPassState::Blend &a, const QGles2CommandBuffer::GraphicsPassState::Blend &b)
Q_DECLARE_TYPEINFO(QRhiGles2::DeferredReleaseEntry, Q_RELOCATABLE_TYPE)
bool operator!=(const QGles2CommandBuffer::GraphicsPassState::ColorMask &a, const QGles2CommandBuffer::GraphicsPassState::ColorMask &b)
bool operator==(const QGles2CommandBuffer::GraphicsPassState::ColorMask &a, const QGles2CommandBuffer::GraphicsPassState::ColorMask &b)
Q_DECLARE_TYPEINFO(QGles2SamplerDescription, Q_RELOCATABLE_TYPE)
bool operator==(const QGles2SamplerData &a, const QGles2SamplerData &b)
bool operator!=(const QGles2CommandBuffer::GraphicsPassState::StencilFace &a, const QGles2CommandBuffer::GraphicsPassState::StencilFace &b)
Q_DECLARE_TYPEINFO(QGles2UniformState, Q_PRIMITIVE_TYPE)
Q_DECLARE_TYPEINFO(QGles2UniformDescription, Q_RELOCATABLE_TYPE)
quint32 qrhiBinaryCacheEntryByteSize(const QRhiGles2::PipelineCacheData &d)
constexpr size_t qHash(const QSize &s, size_t seed=0) noexcept
QGles2Buffer(QRhiImplementation *rhi, Type type, UsageFlags usage, quint32 size)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
char * beginFullDynamicBufferUpdateForCurrentFrame() override
void endFullDynamicBufferUpdateForCurrentFrame() override
To be called when the entire contents of the buffer data has been updated in the memory block returne...
QRhiBuffer::NativeBuffer nativeBuffer() override
bool create() override
Creates the corresponding native graphics resources.
void fullDynamicBufferUpdateForCurrentFrame(const void *data, quint32 size) override
@ DrawIndexedIndirectCount
QVarLengthArray< QImage, 4 > imageRetainPool
QRhiShaderResourceBindings * currentGraphicsSrb
uint currentPipelineGeneration
int currentPassResTrackerIndex
QVarLengthArray< QRhiBufferData, 4 > bufferDataRetainPool
uint currentSrbGeneration
QRhiBackendCommandList< Command > commands
QRhiComputePipeline * currentComputePipeline
QRhiRenderTarget * currentTarget
QRhiShaderResourceBindings * currentComputeSrb
QVarLengthArray< QRhiPassResourceTracker, 8 > passResTrackers
QVarLengthArray< char, 128 > pushConstantData
bool passNeedsResourceTracking
QGles2CommandBuffer(QRhiImplementation *rhi)
const void * retainImage(const QImage &image)
const void * retainData(const QByteArray &data)
QVarLengthArray< char, 1024 > pushConstantPool
QVarLengthArray< uint, 32 > dynamicOffsetPool
const uchar * retainBufferData(const QRhiBufferData &data)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QRhiGraphicsPipeline * currentGraphicsPipeline
QVarLengthArray< QByteArray, 4 > dataRetainPool
QGles2UniformDescriptionVector pushConstantUniforms
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QGles2UniformDescriptionVector uniforms
QRhiShaderResourceBindings * currentSrb
QGles2UniformStateVector uniformState
QGles2ComputePipeline(QRhiImplementation *rhi)
QGles2SamplerDescriptionVector samplers
uint currentSrbGeneration
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QGles2SamplerDescriptionVector samplers
bool create() override
Creates the corresponding native graphics resources.
QGles2GraphicsPipeline(QRhiImplementation *rhi)
QGles2UniformDescriptionVector pushConstantUniforms
~QGles2GraphicsPipeline()
QGles2UniformStateVector uniformState
QRhiShaderResourceBindings * currentSrb
uint currentSrbGeneration
QGles2UniformDescriptionVector uniforms
bool create() override
Creates the corresponding native graphics resources.
QGles2RenderBuffer(QRhiImplementation *rhi, Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint)
bool createFrom(NativeRenderBuffer src) override
Similar to create() except that no new native renderbuffer objects are created.
QRhiTexture::Format backingFormat() const override
GLuint stencilRenderbuffer
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.
QVector< quint32 > serializedFormat() const override
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() const override
bool isCompatible(const QRhiRenderPassDescriptor *other) const override
~QGles2RenderPassDescriptor()
QGles2RenderPassDescriptor(QRhiImplementation *rhi)
QGles2RenderTargetData(QRhiImplementation *)
std::optional< QRhiSwapChain::StereoTargetBuffer > stereoTarget
QGles2RenderPassDescriptor * rp
QRhiRenderTargetAttachmentTracker::ResIdList currentResIdList
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QGles2Sampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode, AddressMode u, AddressMode v, AddressMode w)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
void updateResources(UpdateFlags flags) override
~QGles2ShaderResourceBindings()
bool create() override
Creates the corresponding resource binding set.
QGles2ShaderResourceBindings(QRhiImplementation *rhi)
float devicePixelRatio() const override
QGles2SwapChainRenderTarget(QRhiImplementation *rhi, QRhiSwapChain *swapchain)
QSize pixelSize() const override
int sampleCount() const override
~QGles2SwapChainRenderTarget()
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
void prepare(QRhiGles2 *rhiD)
bool active[TIMESTAMP_PAIRS]
bool tryQueryTimestamps(int pairIndex, QRhiGles2 *rhiD, double *elapsedSec)
static const int TIMESTAMP_PAIRS
GLuint query[TIMESTAMP_PAIRS *2]
void destroy(QRhiGles2 *rhiD)
void initSwapChainRenderTarget(QGles2SwapChainRenderTarget *rt)
QGles2SwapChainRenderTarget rtRight
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QGles2SwapChainRenderTarget rt
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
int currentTimestampPairIndex
bool isFormatSupported(Format f) override
bool createOrResize() override
Creates the swapchain if not already done and resizes the swapchain buffers to match the current size...
QGles2SwapChainTimestamps timestamps
QGles2SwapChain(QRhiImplementation *rhi)
QRhiCommandBuffer * currentFrameCommandBuffer() override
QRhiRenderTarget * currentFrameRenderTarget(StereoTargetBuffer targetBuffer) override
QGles2SwapChainRenderTarget rtLeft
QSize surfacePixelSize() override
QRhiRenderTarget * currentFrameRenderTarget() override
int sampleCount() const override
QGles2TextureRenderTarget(QRhiImplementation *rhi, const QRhiTextureRenderTargetDescription &desc, Flags flags)
~QGles2TextureRenderTarget()
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
float devicePixelRatio() const override
QSize pixelSize() const override
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
bool create() override
Creates the corresponding native graphics resources.
GLuint nonMsaaThrowawayDepthTexture
bool createFrom(NativeTexture src) override
Similar to create(), except that no new native textures are created.
QGles2Texture(QRhiImplementation *rhi, Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, Flags flags)
bool isLevelAllocated(int face, int level) const
QGles2SamplerData samplerState
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool prepareCreate(QSize *adjustedSize=nullptr)
quint32 allocatedLevels[6]
bool create() override
Creates the corresponding native graphics resources.
NativeTexture nativeTexture() override
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
void feed(int binding, T resource)
bool operator!=(const QRhiBatchedBindings< T > &other) const
bool operator==(const QRhiBatchedBindings< T > &other) const
void insertWithCapacityLimit(const Key &key, const Value &value)
QRhiBinaryCache(const char *name)
char smallData[SMALL_DATA_SIZE]
static constexpr quint32 SMALL_DATA_SIZE
void(*) frameEnd(QRhiImplementation *d, QRhiSwapChain *swapChain, QRhiCommandBuffer *cb)
void(*) rhiAboutToBeDestroyed(QRhiImplementation *d)
uint needsDepthStencilCombinedAttach
uint perRenderTargetBlending
int maxThreadGroupsPerDimension
uint glesMultisampleRenderToTexture
int maxVertexStorageBuffers
uint srgbTextureRenderTarget
int maxFragmentStorageBuffers
uint shaderDrawParameters
uint fixedIndexPrimitiveRestart
uint screenSpaceDerivatives
uint nonBaseLevelFramebufferTexture
int maxThreadsPerThreadGroup
uint glesMultiviewMultisampleRenderToTexture
OffscreenFrame(QRhiImplementation *rhi)
QGles2CommandBuffer cbWrapper
QVarLengthArray< data32_t, 128 > packedArray
QVarLengthArray< SeparateTexture, 8 > separateTextureBindings
QVarLengthArray< SeparateSampler, 4 > separateSamplerBindings
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 BufferOp clear(QRhiBuffer *buf, quint32 offset, quint32 size, quint8 value)
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 copy(QRhiBuffer *dst, QRhiBuffer *src, quint32 dstOffset, quint32 srcOffset, quint32 size)
quint32 fillValue32() const
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)
QRhiTextureSubresourceUploadDescription desc
QRhiTextureCopyDescription desc
static TextureOp copy(QRhiTexture *dst, QRhiTexture *src, const QRhiTextureCopyDescription &desc)
QRhiReadbackDescription rb
QVarLengthArray< SubresourceUpload, 4 > 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
LuminanceBehavior luminanceBehavior
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h