24#include <QtCore/private/qduplicatetracker_p.h>
93 return a.glminfilter ==
b.glminfilter
94 &&
a.glmagfilter ==
b.glmagfilter
95 &&
a.glwraps ==
b.glwraps
96 &&
a.glwrapt ==
b.glwrapt
97 &&
a.glwrapr ==
b.glwrapr
98 &&
a.gltexcomparefunc ==
b.gltexcomparefunc;
662 return a.func ==
b.func
663 &&
a.failOp ==
b.failOp
664 &&
a.zfailOp ==
b.zfailOp
665 &&
a.zpassOp ==
b.zpassOp;
677 return a.r ==
b.r &&
a.g ==
b.g &&
a.b ==
b.b &&
a.a ==
b.a;
689 return a.srcColor ==
b.srcColor
690 &&
a.dstColor ==
b.dstColor
691 &&
a.srcAlpha ==
b.srcAlpha
692 &&
a.dstAlpha ==
b.dstAlpha
693 &&
a.opColor ==
b.opColor
694 &&
a.opAlpha ==
b.opAlpha;
742 QRhiBuffer::UsageFlags
usage,
745 const QSize &pixelSize,
747 QRhiRenderBuffer::Flags
flags,
750 const QSize &pixelSize,
754 QRhiTexture::Flags
flags)
override;
763 QRhiTextureRenderTarget::Flags
flags)
override;
776 const QColor &colorClearValue,
779 QRhiCommandBuffer::BeginPassFlags
flags)
override;
787 int dynamicOffsetCount,
813 QRhiCommandBuffer::BeginPassFlags
flags)
override;
861 void *ps,
uint psGeneration,
int glslLocation,
862 int *texUnit,
bool *activeTexUnitAltered);
866 const uint *dynOfsPairs,
int dynOfsCount);
868 bool *wantsColorClear =
nullptr,
bool *wantsDsClear =
nullptr);
875 const QByteArray &namePrefix,
int binding,
int baseOffset,
913 const void *) =
nullptr;
916 const GLvoid *) =
nullptr;
920 const GLvoid *) =
nullptr;
922 GLsizei,
const GLvoid *) =
nullptr;
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
The QColor class provides colors based on RGB, HSV or CMYK values.
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
const uchar * constBits() const
Returns a pointer to the first pixel data.
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
const char * constData() const
Type
Specifies storage type of buffer resource.
QPair< QRhiBuffer *, quint32 > VertexInput
Synonym for QPair<QRhiBuffer *, quint32>.
QPair< int, quint32 > DynamicOffset
Synonym for QPair<int, quint32>.
IndexFormat
Specifies the index data type.
\variable QRhiGles2InitParams::format
QHash< QRhiShaderStage, uint > m_shaderCache
QRhiStats statistics() override
void gatherUniforms(GLuint program, const QShaderDescription::UniformBlock &ub, QDuplicateTracker< int, 256 > *activeUniformLocations, QGles2UniformDescriptionVector *dst)
void registerUniformIfActive(const QShaderDescription::BlockVariable &var, const QByteArray &namePrefix, int binding, int baseOffset, GLuint program, QDuplicateTracker< int, 256 > *activeUniformLocations, QGles2UniformDescriptionVector *dst)
const GLvoid const GLvoid GLuint
void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance) override
QOpenGLContext * maybeShareContext
void trackedBufferBarrier(QGles2CommandBuffer *cbD, QGles2Buffer *bufD, QGles2Buffer::Access access)
QRhi::FrameOpResult beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override
void enqueueBarriersForPass(QGles2CommandBuffer *cbD)
QList< DeferredReleaseEntry > releaseQueue
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
bool isFeatureSupported(QRhi::Feature feature) const override
QRhiGraphicsPipeline * createGraphicsPipeline() override
void bindShaderResources(QGles2CommandBuffer *cbD, QRhiGraphicsPipeline *maybeGraphicsPs, QRhiComputePipeline *maybeComputePs, QRhiShaderResourceBindings *srb, const uint *dynOfsPairs, int dynOfsCount)
void trackedRegisterTexture(QRhiPassResourceTracker *passResTracker, QGles2Texture *texD, QRhiPassResourceTracker::TextureAccess access, QRhiPassResourceTracker::TextureStage stage)
void executeBindGraphicsPipeline(QGles2CommandBuffer *cbD, QGles2GraphicsPipeline *psD)
QRhiDriverInfo driverInfo() const override
QSurfaceFormat requestedFormat
QHash< QByteArray, PipelineCacheData > m_pipelineCache
bool isProgramBinaryDiskCacheEnabled() const
bool needsMakeCurrentDueToSwap
void trackedImageBarrier(QGles2CommandBuffer *cbD, QGles2Texture *texD, QGles2Texture::Access access)
void trackedRegisterBuffer(QRhiPassResourceTracker *passResTracker, QGles2Buffer *bufD, QRhiPassResourceTracker::BufferAccess access, QRhiPassResourceTracker::BufferStage stage)
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
QList< int > supportedSampleCounts() const override
int effectiveSampleCount(int sampleCount) const
void gatherSamplers(GLuint program, const QShaderDescription::InOutVariable &v, QGles2SamplerDescriptionVector *dst)
QSet< GLint > supportedCompressedFormats
QRhiSwapChain * createSwapChain() override
void dispatch(QRhiCommandBuffer *cb, int x, int y, int z) override
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
QSurface * fallbackSurface
void trySaveToDiskCache(GLuint program, const QByteArray &cacheKey)
struct QRhiGles2::Caps caps
bool compileShader(GLuint program, const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion)
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
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
bool isYUpInNDC() const override
void debugMarkBegin(QRhiCommandBuffer *cb, const QByteArray &name) override
void enqueueResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
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
QByteArray shaderSource(const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion)
QRhiBuffer * createBuffer(QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size) override
void(QOPENGLF_APIENTRYP glCompressedTexImage1D)(GLenum
const GLvoid const GLvoid GLint
void setScissor(QRhiCommandBuffer *cb, const QRhiScissor &scissor) override
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
ProgramCacheResult tryLoadFromDiskOrPipelineCache(const QRhiShaderStage *stages, int stageCount, GLuint program, const QVector< QShaderDescription::InOutVariable > &inputVars, QByteArray *cacheKey)
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 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)
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)
struct QRhiGles2::OffscreenFrame ofr
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
Type
Specifies the type of the renderbuffer.
Filter
Specifies the minification, magnification, or mipmap filtering.
AddressMode
Specifies the addressing mode.
Filter mipmapMode() const
Format
Describes the swapchain format.
StereoTargetBuffer
Selects the backbuffer to use with a stereoscopic swapchain.
Format
Specifies the texture format.
ResourceLimit
Describes the resource limit to query.
Feature
Flag values to indicate what features are supported by the backend currently in use.
FrameOpResult
Describes the result of operations that can have a soft failure.
VariableType
Represents the type of a variable or block member.
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
#define QOPENGLF_APIENTRYP
GLboolean GLboolean GLboolean b
typedef GLint(GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXEXTPROC)(GLuint program
GLsizei const GLfloat * v
[13]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLint GLenum GLsizei GLsizei GLsizei depth
GLenum GLuint GLint level
GLfloat GLfloat GLfloat w
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei const GLubyte * commands
typedef GLenum(GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC)(void)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
typedef GLbitfield(APIENTRYP PFNGLQUERYMATRIXXOESPROC)(GLfixed *mantissa
GLenum GLenum GLenum GLenum mapping
GLint GLfloat GLint stencil
GLsizeiptr const void GLenum usage
bool operator!=(const QGles2SamplerData &a, const QGles2SamplerData &b)
bool operator==(const QGles2SamplerData &a, const QGles2SamplerData &b)
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
view viewport() -> scroll(dx, dy, deviceRect)
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.
union QGles2CommandBuffer::Command::Args args
QHash< QRhiResource *, QPair< int, bool > > writtenResources
struct QGles2CommandBuffer::GraphicsPassState::Blend blend
struct QGles2CommandBuffer::GraphicsPassState::@357 dynamic
struct QGles2CommandBuffer::GraphicsPassState::ColorMask colorMask
QVarLengthArray< QImage, 4 > imageRetainPool
struct QGles2CommandBuffer::ComputePassState computePassState
QRhiShaderResourceBindings * currentGraphicsSrb
uint currentPipelineGeneration
int currentPassResTrackerIndex
QVarLengthArray< QRhiBufferData, 4 > bufferDataRetainPool
uint currentSrbGeneration
static const int MAX_DYNAMIC_OFFSET_COUNT
struct QGles2CommandBuffer::GraphicsPassState graphicsPassState
QRhiBackendCommandList< Command > commands
QRhiComputePipeline * currentComputePipeline
QRhiRenderTarget * currentTarget
QRhiShaderResourceBindings * currentComputeSrb
QVarLengthArray< QRhiPassResourceTracker, 8 > passResTrackers
bool passNeedsResourceTracking
const void * retainImage(const QImage &image)
const void * retainData(const QByteArray &data)
const uchar * retainBufferData(const QRhiBufferData &data)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
struct QGles2CommandBuffer::TextureUnitState textureUnitState[16]
QRhiGraphicsPipeline * currentGraphicsPipeline
QVarLengthArray< QByteArray, 4 > dataRetainPool
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QGles2UniformState uniformState[QGles2UniformState::MAX_TRACKED_LOCATION+1]
QGles2UniformDescriptionVector uniforms
QRhiShaderResourceBindings * currentSrb
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()
QRhiShaderResourceBindings * currentSrb
uint currentSrbGeneration
QGles2UniformDescriptionVector uniforms
QGles2UniformState uniformState[QGles2UniformState::MAX_TRACKED_LOCATION+1]
bool create() override
Creates the corresponding native graphics resources.
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()
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.
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
void updateResources(UpdateFlags flags) override
~QGles2ShaderResourceBindings()
float devicePixelRatio() const override
QSize pixelSize() const override
int sampleCount() const override
~QGles2SwapChainRenderTarget()
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
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
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...
QRhiCommandBuffer * currentFrameCommandBuffer() override
QGles2SwapChainRenderTarget rtLeft
QSize surfacePixelSize() override
QRhiRenderTarget * currentFrameRenderTarget() override
int sampleCount() const override
~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.
bool createFrom(NativeTexture src) override
Similar to create(), except that no new native textures are created.
QGles2SamplerData samplerState
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool prepareCreate(QSize *adjustedSize=nullptr)
bool create() override
Creates the corresponding native graphics resources.
NativeTexture nativeTexture() override
uint needsDepthStencilCombinedAttach
uint srgbCapableDefaultFramebuffer
int maxThreadGroupsPerDimension
uint fixedIndexPrimitiveRestart
uint screenSpaceDerivatives
uint nonBaseLevelFramebufferTexture
int maxThreadsPerThreadGroup
struct QRhiGles2::DeferredReleaseEntry::@384::@390 textureRenderTarget
struct QRhiGles2::DeferredReleaseEntry::@384::@387 pipeline
OffscreenFrame(QRhiImplementation *rhi)
QGles2CommandBuffer cbWrapper
\variable QRhiReadbackResult::completed
\variable QShaderDescription::InOutVariable::name
struct QGles2CommandBuffer::Command::Args::@261 stencilRef
struct QGles2CommandBuffer::Command::Args::@290 compressedSubImage
struct QGles2CommandBuffer::Command::Args::@288 compressedImage
struct QGles2CommandBuffer::Command::Args::@305 barriersForPass
struct QGles2CommandBuffer::Command::Args::@268 bindShaderResources
struct QGles2CommandBuffer::Command::Args::@296 blitFromTexture
struct QGles2CommandBuffer::Command::Args::@300 bindComputePipeline
struct QGles2CommandBuffer::Command::Args::@260 blendConstants
struct QGles2CommandBuffer::Command::Args::@302 dispatch
struct QGles2CommandBuffer::Command::Args::@270 clear
struct QGles2CommandBuffer::Command::Args::@281 readPixels
struct QGles2CommandBuffer::Command::Args::@259 scissor
struct QGles2CommandBuffer::Command::Args::@298 genMip
struct QGles2CommandBuffer::Command::Args::@263 bindIndexBuffer
struct QGles2CommandBuffer::Command::Args::@285 subImage
uint dynamicOffsetPairs[MAX_DYNAMIC_OFFSET_COUNT *2]
QRhiShaderResourceBindings * srb
struct QGles2CommandBuffer::Command::Args::@273 bindFramebuffer
struct QGles2CommandBuffer::Command::Args::@276 getBufferSubData
QRhiGraphicsPipeline * maybeGraphicsPs
struct QGles2CommandBuffer::Command::Args::@264 draw
struct QGles2CommandBuffer::Command::Args::@275 bufferSubData
QRhiReadbackResult * result
struct QGles2CommandBuffer::Command::Args::@279 copyTex
struct QGles2CommandBuffer::Command::Args::@306 barrier
struct QGles2CommandBuffer::Command::Args::@258 viewport
struct QGles2CommandBuffer::Command::Args::@265 drawIndexed
QRhiComputePipeline * maybeComputePs
QRhiTexture::Format format
QRhiSwapChain::StereoTargetBuffer stereoTarget
QRhiGraphicsPipeline * ps
struct QGles2CommandBuffer::Command::Args::@266 bindGraphicsPipeline
struct QGles2CommandBuffer::Command::Args::@292 blitFromRenderbuffer
struct QGles2CommandBuffer::Command::Args::@262 bindVertexBuffer