Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QRhiGles2 Class Reference

#include <qrhigles2_p.h>

Inheritance diagram for QRhiGles2:
Collaboration diagram for QRhiGles2:

Classes

struct  Caps
struct  DeferredReleaseEntry
struct  OffscreenFrame
struct  PipelineCacheData
struct  Scratch

Public Types

enum  ProgramCacheResult { ProgramCacheHit , ProgramCacheMiss , ProgramCacheError }
using ActiveUniformLocationTracker = QDuplicateTracker<int, 32>

Public Member Functions

 QRhiGles2 (QRhiGles2InitParams *params, QRhiGles2NativeHandles *importDevice=nullptr)
bool create (QRhi::Flags flags) override
void destroy () override
QRhiGraphicsPipeline * createGraphicsPipeline () override
QRhiComputePipeline * createComputePipeline () override
QRhiShaderResourceBindings * createShaderResourceBindings () override
QRhiBuffer * createBuffer (QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size) override
QRhiRenderBuffer * createRenderBuffer (QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) override
QRhiTexture * createTexture (QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags) override
QRhiSampler * createSampler (QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w) override
QRhiTextureRenderTarget * createTextureRenderTarget (const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags) override
QRhiShadingRateMap * createShadingRateMap () override
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, QRhi::BeginFrameFlags flags) override
QRhi::FrameOpResult endOffscreenFrame (QRhi::EndFrameFlags flags) override
QRhi::FrameOpResult finish () override
void resourceUpdate (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void beginPass (QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void endPass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void setGraphicsPipeline (QRhiCommandBuffer *cb, QRhiGraphicsPipeline *ps) override
void setShaderResources (QRhiCommandBuffer *cb, QRhiShaderResourceBindings *srb, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override
void setVertexInput (QRhiCommandBuffer *cb, int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings, QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat) override
void setViewport (QRhiCommandBuffer *cb, const QRhiViewport &viewport) override
void setScissor (QRhiCommandBuffer *cb, const QRhiScissor &scissor) override
void setBlendConstants (QRhiCommandBuffer *cb, const QColor &c) override
void setStencilRef (QRhiCommandBuffer *cb, quint32 refValue) override
void setPushConstants (QRhiCommandBuffer *cb, quint32 offset, quint32 size, const void *data) override
void setShadingRate (QRhiCommandBuffer *cb, const QSize &coarsePixelSize) override
void draw (QRhiCommandBuffer *cb, quint32 vertexCount, quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override
void drawIndexed (QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance) override
void drawIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override
void drawIndexedIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) 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
void dispatchIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset) override
void debugMarkBegin (QRhiCommandBuffer *cb, const QByteArray &name) override
void debugMarkEnd (QRhiCommandBuffer *cb) override
void debugMarkMsg (QRhiCommandBuffer *cb, const QByteArray &msg) override
void beginComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void endComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void setComputePipeline (QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
void dispatch (QRhiCommandBuffer *cb, int x, int y, int z) override
const QRhiNativeHandles * nativeHandles (QRhiCommandBuffer *cb) override
void beginExternal (QRhiCommandBuffer *cb) override
void endExternal (QRhiCommandBuffer *cb) override
double lastCompletedGpuTime (QRhiCommandBuffer *cb) override
QList< int > supportedSampleCounts () const override
QList< QSize > supportedShadingRates (int sampleCount) const override
int ubufAlignment () const override
bool isYUpInFramebuffer () const override
bool isYUpInNDC () const override
bool isClipDepthZeroToOne () const override
QMatrix4x4 clipSpaceCorrMatrix () const override
bool isTextureFormatSupported (QRhiTexture::Format format, QRhiTexture::Flags flags) const override
bool isFeatureSupported (QRhi::Feature feature) const override
int resourceLimit (QRhi::ResourceLimit limit) const override
const QRhiNativeHandles * nativeHandles () override
QRhiDriverInfo driverInfo () const override
QRhiStats statistics () override
bool makeThreadLocalNativeContextCurrent () override
void setQueueSubmitParams (QRhiNativeHandles *params) override
void releaseCachedResources () override
bool isDeviceLost () const override
QByteArray pipelineCacheData () override
void setPipelineCacheData (const QByteArray &data) override
bool ensureContext (QSurface *surface=nullptr) const
QSurface * evaluateFallbackSurface () const
void executeDeferredReleases ()
void trackedBufferBarrier (QGles2CommandBuffer *cbD, QGles2Buffer *bufD, QGles2Buffer::Access access)
void trackedImageBarrier (QGles2CommandBuffer *cbD, QGles2Texture *texD, QGles2Texture::Access access)
void enqueueSubresUpload (QGles2Texture *texD, QGles2CommandBuffer *cbD, int layer, int level, const QRhiTextureSubresourceUploadDescription &subresDesc)
void enqueueResourceUpdates (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
void trackedRegisterBuffer (QRhiPassResourceTracker *passResTracker, QGles2Buffer *bufD, QRhiPassResourceTracker::BufferAccess access, QRhiPassResourceTracker::BufferStage stage)
void trackedRegisterTexture (QRhiPassResourceTracker *passResTracker, QGles2Texture *texD, QRhiPassResourceTracker::TextureAccess access, QRhiPassResourceTracker::TextureStage stage)
GLbitfield barriersForNextDispatch (QGles2CommandBuffer *cbD)
void executeCommandBuffer (QRhiCommandBuffer *cb)
void executeBindGraphicsPipeline (QGles2CommandBuffer *cbD, QGles2GraphicsPipeline *psD)
void bindCombinedSampler (QGles2CommandBuffer *cbD, QGles2Texture *texD, QGles2Sampler *samplerD, void *ps, uint psGeneration, int glslLocation, int *texUnit, bool *activeTexUnitAltered)
void bindShaderResources (QGles2CommandBuffer *cbD, QRhiGraphicsPipeline *maybeGraphicsPs, QRhiComputePipeline *maybeComputePs, QRhiShaderResourceBindings *srb, const uint *dynOfsPairs, int dynOfsCount)
void setUniformValue (const QGles2UniformDescription &uniform, const void *src, QGles2UniformState *uniformState)
void setUniformsFromBlock (const QGles2UniformDescriptionVector &uniforms, int binding, const char *blockData, qint64 blockSize, quint32 blockOffset, QGles2UniformState *uniformState)
QGles2RenderTargetData * enqueueBindFramebuffer (QRhiRenderTarget *rt, QGles2CommandBuffer *cbD, bool *wantsColorClear=nullptr, bool *wantsDsClear=nullptr)
void enqueueBarriersForPass (QGles2CommandBuffer *cbD)
QList< QShaderVersion > glslVersionsToTry () const
std::optional< QShaderVersion > commonGlslEsVersion (const QRhiShaderStage *stages, int stageCount) const
QByteArray shaderSource (const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion, std::optional< QShaderVersion > commonVersion=std::nullopt)
bool compileShader (GLuint program, const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion, std::optional< QShaderVersion > commonVersion=std::nullopt)
bool linkProgram (GLuint program)
void registerUniformIfActive (const QShaderDescription::BlockVariable &var, const QByteArray &namePrefix, int binding, int baseOffset, GLuint program, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst)
void gatherBlockMemberUniforms (GLuint program, const QByteArray &prefix, int binding, const QList< QShaderDescription::BlockVariable > &members, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst)
void gatherUniforms (GLuint program, const QShaderDescription::UniformBlock &ub, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst)
void gatherPushConstantUniforms (GLuint program, const QShaderDescription::PushConstantBlock &pcb, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst)
void gatherSamplers (GLuint program, const QShaderDescription::InOutVariable &v, QGles2SamplerDescriptionVector *dst)
void gatherGeneratedSamplers (GLuint program, const QShader::SeparateToCombinedImageSamplerMapping &mapping, QGles2SamplerDescriptionVector *dst)
void sanityCheckVertexFragmentInterface (const QShaderDescription &vsDesc, const QShaderDescription &fsDesc)
bool isProgramBinaryDiskCacheEnabled () const
ProgramCacheResult tryLoadFromDiskOrPipelineCache (const QRhiShaderStage *stages, int stageCount, GLuint program, const QVector< QShaderDescription::InOutVariable > &inputVars, QByteArray *cacheKey, std::optional< QShaderVersion > commonVersion=std::nullopt)
void trySaveToDiskCache (GLuint program, const QByteArray &cacheKey)
void trySaveToPipelineCache (GLuint program, const QByteArray &cacheKey, bool force=false)
 void (QOPENGLF_APIENTRYP glPolygonMode)(GLenum
 void (QOPENGLF_APIENTRYP glTexImage1D)(GLenum
const void * void (QOPENGLF_APIENTRYP glTexStorage1D)(GLenum
 void (QOPENGLF_APIENTRYP glTexSubImage1D)(GLenum
const GLvoid * void (QOPENGLF_APIENTRYP glCopyTexSubImage1D)(GLenum
 void (QOPENGLF_APIENTRYP glCompressedTexImage1D)(GLenum
const GLvoid * void (QOPENGLF_APIENTRYP glCompressedTexSubImage1D)(GLenum
const GLvoid const GLvoid * void (QOPENGLF_APIENTRYP glFramebufferTexture1D)(GLenum
 void (QOPENGLF_APIENTRYP glFramebufferTextureMultiviewOVR)(GLenum
 void (QOPENGLF_APIENTRYP glQueryCounter)(GLuint
 void (QOPENGLF_APIENTRYP glClearBufferSubData)(GLenum
const void * void (QOPENGLF_APIENTRYP glGetQueryObjectui64v)(GLuint
const void quint64 * void (QOPENGLF_APIENTRYP glObjectLabel)(GLenum
const void quint64 const GLchar * void (QOPENGLF_APIENTRYP glFramebufferTexture2DMultisampleEXT)(GLenum
 void (QOPENGLF_APIENTRYP glFramebufferTextureMultisampleMultiviewOVR)(GLenum
 void (QOPENGLF_APIENTRYP glRenderbufferStorageMultisampleEXT)(GLenum
 void (QOPENGLF_APIENTRYP glMultiDrawArraysIndirect)(GLenum
 void (QOPENGLF_APIENTRYP glMultiDrawElementsIndirect)(GLenum
 void (QOPENGLF_APIENTRYP glMultiDrawArraysIndirectCount)(GLenum
 void (QOPENGLF_APIENTRYP glMultiDrawElementsIndirectCount)(GLenum
 void (QOPENGLF_APIENTRYP glDrawArraysInstancedBaseInstance)(GLenum
 void (QOPENGLF_APIENTRYP glDrawElementsInstancedBaseInstance)(GLenum
 void (QOPENGLF_APIENTRYP glDrawElementsInstancedBaseVertexBaseInstance)(GLenum
Public Member Functions inherited from QRhiImplementation
virtual ~QRhiImplementation ()
virtual QRhi::AdapterList enumerateAdaptersBeforeCreate (QRhiNativeHandles *nativeHandles) const
virtual QRhiIndirectCommandBuffer * createIndirectCommandBuffer (QRhiIndirectCommandBuffer::Type type, quint32 maxCommandCount)
virtual void buildIndirect (QRhiCommandBuffer *cb, QRhiIndirectCommandBuffer *icb, const QRhiIndirectCommandBufferBuildInfo &info)
virtual void executeIndirect (QRhiCommandBuffer *cb, QRhiIndirectCommandBuffer *icb, quint32 firstCommand, quint32 commandCount)
virtual void commitIndirectCommandBuffer (QRhiResourceUpdateBatch *u, QRhiIndirectCommandBuffer *icb)
void prepareForCreate (QRhi *rhi, QRhi::Implementation impl, QRhi::Flags flags, QRhiAdapter *adapter)
bool isCompressedFormat (QRhiTexture::Format format) const
bool compressedFormatInfo (QRhiTexture::Format format, const QSize &size, quint32 *bpl, quint32 *byteSize, QSize *blockDim) const
bool 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)
void unregisterResource (QRhiResource *res)
void addDeleteLater (QRhiResource *res)
void addCleanupCallback (const QRhi::CleanupCallback &callback)
void addCleanupCallback (const void *key, const QRhi::CleanupCallback &callback)
void removeCleanupCallback (const void *key)
bool sanityCheckGraphicsPipeline (QRhiGraphicsPipeline *ps)
bool sanityCheckShaderResourceBindings (QRhiShaderResourceBindings *srb)
bool sanityCheckResourceOwnership (QRhiResource *maybeResource)
void updateLayoutDesc (QRhiShaderResourceBindings *srb)
quint32 pipelineCacheRhiId () const
void pipelineCreationStart ()
void pipelineCreationEnd ()
qint64 totalPipelineCreationTime () const
QRhiVertexInputAttribute::Format shaderDescVariableFormatToVertexInputFormat (QShaderDescription::VariableType type) const
quint32 byteSizePerVertexForVertexInputFormat (QRhiVertexInputAttribute::Format format) const
int effectiveSampleCount (int sampleCount) const
QSize clampedSubResourceUploadSize (QSize size, QPoint dstPos, int level, QSize textureSizeAtLevelZero, bool warn=true)
QSize clampedSubResourceUploadSizeForSourceData (QSize size, quint32 bpl, quint32 bytesPerPixel, qsizetype dataSize, bool warn=true)
void runCleanup ()

Static Public Member Functions

static void setupUniformStateTracking (QGles2UniformDescriptionVector *uniforms, QGles2UniformDescriptionVector *pushConstantUniforms, QGles2UniformStateVector *uniformState)
Static Public Member Functions inherited from QRhiImplementation
static QRhiImplementation * newInstance (QRhi::Implementation impl, QRhiInitParams *params, QRhiNativeHandles *importDevice)
static const QRhiShaderResourceBinding::Data * shaderResourceBindingData (const QRhiShaderResourceBinding &binding)
static QRhiShaderResourceBinding::Data * shaderResourceBindingData (QRhiShaderResourceBinding &binding)
static bool sortedBindingLessThan (const QRhiShaderResourceBinding &a, const QRhiShaderResourceBinding &b)

Public Attributes

QRhi::Flags rhiFlags
QOpenGLContext * ctx = nullptr
bool importedContext = false
QSurfaceFormat requestedFormat
QSurface * fallbackSurface = nullptr
QPointer< QWindow > maybeWindow = nullptr
QOpenGLContext * maybeShareContext = nullptr
bool needsMakeCurrentDueToSwap = false
QOpenGLExtensions * f = nullptr
 GLenum = nullptr
 GLint
 GLsizei = nullptr
const void GLint
const void GLenum
const void GLsizei = nullptr
const GLvoid GLint
const GLvoid GLsizei = nullptr
const GLvoid GLenum
const GLvoid const GLvoid GLenum
const GLvoid const GLvoid GLuint = nullptr
const GLvoid const GLvoid GLint = nullptr
 GLuint = nullptr
 GLintptr
 GLsizeiptr
const void quint64 GLuint
const void quint64 GLsizei
const void quint64 const GLchar GLenum
const void quint64 const GLchar GLuint
const void quint64 const GLchar GLint
const void quint64 const GLchar GLsizei = nullptr
const void GLintptr
const void GLuint = nullptr
uint vao = 0
struct QRhiGles2::Caps caps
QGles2SwapChain * currentSwapChain = nullptr
QSet< GLint > supportedCompressedFormats
QList< int > supportedSampleCountList
QRhiGles2NativeHandles nativeHandlesStruct
QRhiDriverInfo driverInfoStruct
bool contextLost = false
uint frameNo = 0
QList< DeferredReleaseEntry > releaseQueue
struct QRhiGles2::OffscreenFrame ofr
QHash< std::pair< QRhiShaderStage, QShaderVersion >, uint > m_shaderCache
QRhiBinaryCache< QByteArray, PipelineCacheData > m_pipelineCache { "Program binary cache" }
struct QRhiGles2::Scratch m_scratch
Public Attributes inherited from QRhiImplementation
QRhi * q
bool debugMarkers = false
bool timestamps = false
int currentFrameSlot = 0
bool inFrame = false
QRhiCommandBuffer * currentOffscreenCb = nullptr
QRhiAdapter * requestedRhiAdapter = nullptr
QHash< QRhiResource *, bool > resources

Static Public Attributes

static constexpr quint32 MAX_PUSH_CONSTANTS_SIZE = 128
Static Public Attributes inherited from QRhiImplementation
static const int MAX_SHADER_CACHE_ENTRIES = 128
static const quint32 MAX_BINARY_CACHE_BYTES = 16 * 1024 * 1024

Detailed Description

Definition at line 853 of file qrhigles2_p.h.

Member Typedef Documentation

◆ ActiveUniformLocationTracker

Definition at line 1034 of file qrhigles2_p.h.

Member Enumeration Documentation

◆ ProgramCacheResult

Enumerator
ProgramCacheHit 
ProgramCacheMiss 
ProgramCacheError 

Definition at line 1057 of file qrhigles2_p.h.

Constructor & Destructor Documentation

◆ QRhiGles2()

QRhiGles2::QRhiGles2 ( QRhiGles2InitParams * params,
QRhiGles2NativeHandles * importDevice = nullptr )

Definition at line 692 of file qrhigles2.cpp.

References QRhiGles2(), and importedContext.

Referenced by QRhiGles2().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ barriersForNextDispatch()

GLbitfield QRhiGles2::barriersForNextDispatch ( QGles2CommandBuffer * cbD)

Definition at line 5899 of file qrhigles2.cpp.

References QGles2CommandBuffer::ComputePassState::Read.

◆ beginComputePass()

void QRhiGles2::beginComputePass ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates,
QRhiCommandBuffer::BeginPassFlags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 5826 of file qrhigles2.cpp.

References QGles2CommandBuffer::ComputePass, enqueueBarriersForPass(), enqueueResourceUpdates(), QGles2CommandBuffer::NoPass, QGles2CommandBuffer::recordingPass, and QGles2CommandBuffer::resetCachedState().

Here is the call graph for this function:

◆ beginExternal()

void QRhiGles2::beginExternal ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2700 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::Barrier, QGles2CommandBuffer::Command::cmd, QRhiGles2::Caps::compute, QGles2CommandBuffer::ComputePass, currentSwapChain, executeCommandBuffer(), f, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::resetCommands(), and vao.

Here is the call graph for this function:

◆ beginFrame()

QRhi::FrameOpResult QRhiGles2::beginFrame ( QRhiSwapChain * swapChain,
QRhi::BeginFrameFlags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 2763 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::BeginFrame, currentSwapChain, QGles2SwapChain::currentTimestampPairIndex, executeDeferredReleases(), and frameNo.

Here is the call graph for this function:

◆ beginOffscreenFrame()

QRhi::FrameOpResult QRhiGles2::beginOffscreenFrame ( QRhiCommandBuffer ** cb,
QRhi::BeginFrameFlags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 2826 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::BeginFrame, executeDeferredReleases(), and f.

Here is the call graph for this function:

◆ beginPass()

void QRhiGles2::beginPass ( QRhiCommandBuffer * cb,
QRhiRenderTarget * rt,
const QColor & colorClearValue,
const QRhiDepthStencilClearValue & depthStencilClearValue,
QRhiResourceUpdateBatch * resourceUpdates,
QRhiCommandBuffer::BeginPassFlags flags )
overridevirtual

◆ bindCombinedSampler()

void QRhiGles2::bindCombinedSampler ( QGles2CommandBuffer * cbD,
QGles2Texture * texD,
QGles2Sampler * samplerD,
void * ps,
uint psGeneration,
int glslLocation,
int * texUnit,
bool * activeTexUnitAltered )

◆ bindShaderResources()

void QRhiGles2::bindShaderResources ( QGles2CommandBuffer * cbD,
QRhiGraphicsPipeline * maybeGraphicsPs,
QRhiComputePipeline * maybeComputePs,
QRhiShaderResourceBindings * srb,
const uint * dynOfsPairs,
int dynOfsCount )

◆ clipSpaceCorrMatrix()

QMatrix4x4 QRhiGles2::clipSpaceCorrMatrix ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1545 of file qrhigles2.cpp.

◆ commonGlslEsVersion()

std::optional< QShaderVersion > QRhiGles2::commonGlslEsVersion ( const QRhiShaderStage * stages,
int stageCount ) const

Definition at line 6116 of file qrhigles2.cpp.

References QRhiGles2::Caps::gles.

◆ compileShader()

bool QRhiGles2::compileShader ( GLuint program,
const QRhiShaderStage & shaderStage,
QShaderVersion * shaderVersion,
std::optional< QShaderVersion > commonVersion = std::nullopt )

Definition at line 6164 of file qrhigles2.cpp.

References f.

◆ create()

bool QRhiGles2::create ( QRhi::Flags flags)
overridevirtual

Implements QRhiImplementation.

Definition at line 832 of file qrhigles2.cpp.

References QRhiGles2::Caps::baseInstance, QRhiGles2::Caps::baseVertex, QRhiGles2::Caps::bgraExternalFormat, QRhiGles2::Caps::bgraInternalFormat, QRhiGles2::Caps::clearBuffer, QRhiGles2::Caps::compute, contextLost, QRhiGles2::Caps::copyBuffer, QRhiGles2::Caps::coreProfile, QRhiGles2::Caps::ctxMajor, QRhiGles2::Caps::ctxMinor, QRhiGles2::Caps::depth24, QRhiGles2::Caps::depthClamp, QRhiGles2::Caps::depthTexture, QRhiGles2::Caps::dispatchIndirect, QRhiGles2::Caps::drawIndirect, QRhiGles2::Caps::drawIndirectCount, QRhiGles2::Caps::drawIndirectMulti, QRhiGles2::Caps::elementIndexUint, f, QRhiGles2::Caps::fixedIndexPrimitiveRestart, QRhiGles2::Caps::floatFormats, QRhiGles2::Caps::geometryShader, QRhiGles2::Caps::gles, QRhiGles2::Caps::glesMultisampleRenderToTexture, QRhiGles2::Caps::glesMultiviewMultisampleRenderToTexture, GLint, GLintptr, GLuint, QRhiGles2::Caps::halfAttributes, QRhiGles2::Caps::hasDrawBuffersFunc, QRhiGles2::Caps::imageLoadStore, importedContext, QRhiGles2::Caps::instancing, QRhiGles2::Caps::intAttributes, QRhiGles2::Caps::maxDrawBuffers, QRhiGles2::Caps::maxFragmentStorageBuffers, QRhiGles2::Caps::maxSamples, QRhiGles2::Caps::maxTextureArraySize, QRhiGles2::Caps::maxTextureSize, QRhiGles2::Caps::maxThreadGroupsPerDimension, QRhiGles2::Caps::maxThreadGroupsX, QRhiGles2::Caps::maxThreadGroupsY, QRhiGles2::Caps::maxThreadGroupsZ, QRhiGles2::Caps::maxThreadsPerThreadGroup, QRhiGles2::Caps::maxUniformVectors, QRhiGles2::Caps::maxVertexInputs, QRhiGles2::Caps::maxVertexOutputs, QRhiGles2::Caps::maxVertexStorageBuffers, QRhiGles2::Caps::msaaRenderBuffer, QRhiGles2::Caps::multisampledTexture, QRhiGles2::Caps::multiView, QRhiGles2::Caps::needsDepthStencilCombinedAttach, QRhiGles2::Caps::nonBaseLevelFramebufferTexture, QRhiGles2::Caps::npotTextureFull, QRhiGles2::Caps::objectLabel, QRhiGles2::Caps::packedDepthStencil, QRhiGles2::Caps::perRenderTargetBlending, QRhiGles2::Caps::programBinary, QRhiGles2::Caps::properMapBuffer, QRhiGles2::Caps::r16Format, QRhiGles2::Caps::r32uiFormat, QRhiGles2::Caps::r8Format, QRhiGles2::Caps::rgb10Formats, QRhiGles2::Caps::rgba8Format, QRhiGles2::Caps::sampleVariables, QRhiGles2::Caps::screenSpaceDerivatives, QRhiGles2::Caps::shaderDrawParameters, QRhiGles2::Caps::srgbGenerateMipmap, QRhiGles2::Caps::srgbTextureFormat, QRhiGles2::Caps::srgbTextureRenderTarget, QRhiGles2::Caps::tessellation, QRhiGles2::Caps::texelFetch, QRhiGles2::Caps::texture1D, QRhiGles2::Caps::texture3D, QRhiGles2::Caps::textureCompareMode, QRhiGles2::Caps::timestamps, QRhiGles2::Caps::uniformBuffers, QRhiGles2::Caps::unpackRowLength, QRhiGles2::Caps::vertexArrayObject, void(), void(), void(), void(), void(), void(), and void().

Here is the call graph for this function:

◆ createBuffer()

QRhiBuffer * QRhiGles2::createBuffer ( QRhiBuffer::Type type,
QRhiBuffer::UsageFlags usage,
quint32 size )
overridevirtual

Implements QRhiImplementation.

Definition at line 1518 of file qrhigles2.cpp.

◆ createComputePipeline()

QRhiComputePipeline * QRhiGles2::createComputePipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2181 of file qrhigles2.cpp.

◆ createGraphicsPipeline()

QRhiGraphicsPipeline * QRhiGles2::createGraphicsPipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2171 of file qrhigles2.cpp.

◆ createRenderBuffer()

QRhiRenderBuffer * QRhiGles2::createRenderBuffer ( QRhiRenderBuffer::Type type,
const QSize & pixelSize,
int sampleCount,
QRhiRenderBuffer::Flags flags,
QRhiTexture::Format backingFormatHint )
overridevirtual

Implements QRhiImplementation.

Definition at line 2139 of file qrhigles2.cpp.

◆ createSampler()

QRhiSampler * QRhiGles2::createSampler ( QRhiSampler::Filter magFilter,
QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
QRhiSampler::AddressMode u,
QRhiSampler::AddressMode v,
QRhiSampler::AddressMode w )
overridevirtual

Implements QRhiImplementation.

Definition at line 2153 of file qrhigles2.cpp.

◆ createShaderResourceBindings()

QRhiShaderResourceBindings * QRhiGles2::createShaderResourceBindings ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2176 of file qrhigles2.cpp.

◆ createShadingRateMap()

QRhiShadingRateMap * QRhiGles2::createShadingRateMap ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2160 of file qrhigles2.cpp.

◆ createSwapChain()

QRhiSwapChain * QRhiGles2::createSwapChain ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1513 of file qrhigles2.cpp.

◆ createTexture()

QRhiTexture * QRhiGles2::createTexture ( QRhiTexture::Format format,
const QSize & pixelSize,
int depth,
int arraySize,
int sampleCount,
QRhiTexture::Flags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 2146 of file qrhigles2.cpp.

◆ createTextureRenderTarget()

QRhiTextureRenderTarget * QRhiGles2::createTextureRenderTarget ( const QRhiTextureRenderTargetDescription & desc,
QRhiTextureRenderTarget::Flags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 2165 of file qrhigles2.cpp.

◆ debugMarkBegin()

void QRhiGles2::debugMarkBegin ( QRhiCommandBuffer * cb,
const QByteArray & name )
overridevirtual

Implements QRhiImplementation.

Definition at line 2658 of file qrhigles2.cpp.

◆ debugMarkEnd()

void QRhiGles2::debugMarkEnd ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2667 of file qrhigles2.cpp.

◆ debugMarkMsg()

void QRhiGles2::debugMarkMsg ( QRhiCommandBuffer * cb,
const QByteArray & msg )
overridevirtual

Implements QRhiImplementation.

Definition at line 2675 of file qrhigles2.cpp.

◆ destroy()

void QRhiGles2::destroy ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1436 of file qrhigles2.cpp.

References executeDeferredReleases(), f, importedContext, and vao.

Here is the call graph for this function:

◆ dispatch()

◆ dispatchIndirect()

◆ draw()

void QRhiGles2::draw ( QRhiCommandBuffer * cb,
quint32 vertexCount,
quint32 instanceCount,
quint32 firstVertex,
quint32 firstInstance )
overridevirtual

◆ drawIndexed()

void QRhiGles2::drawIndexed ( QRhiCommandBuffer * cb,
quint32 indexCount,
quint32 instanceCount,
quint32 firstIndex,
qint32 vertexOffset,
quint32 firstInstance )
overridevirtual

◆ drawIndexedIndirect()

void QRhiGles2::drawIndexedIndirect ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset,
quint32 drawCount,
quint32 stride )
overridevirtual

◆ drawIndexedIndirectCount()

void QRhiGles2::drawIndexedIndirectCount ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset,
QRhiBuffer * countBuffer,
quint32 countBufferOffset,
quint32 maxDrawCount,
quint32 stride )
overridevirtual

◆ drawIndirect()

void QRhiGles2::drawIndirect ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset,
quint32 drawCount,
quint32 stride )
overridevirtual

◆ drawIndirectCount()

void QRhiGles2::drawIndirectCount ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset,
QRhiBuffer * countBuffer,
quint32 countBufferOffset,
quint32 maxDrawCount,
quint32 stride )
overridevirtual

◆ driverInfo()

QRhiDriverInfo QRhiGles2::driverInfo ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1974 of file qrhigles2.cpp.

◆ endComputePass()

void QRhiGles2::endComputePass ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )
overridevirtual

Implements QRhiImplementation.

Definition at line 5843 of file qrhigles2.cpp.

References QGles2CommandBuffer::ComputePass, enqueueResourceUpdates(), QGles2CommandBuffer::NoPass, and QGles2CommandBuffer::recordingPass.

Here is the call graph for this function:

◆ endExternal()

void QRhiGles2::endExternal ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2736 of file qrhigles2.cpp.

References addBoundaryCommand(), QGles2CommandBuffer::currentPassResTrackerIndex, enqueueBarriersForPass(), QGles2CommandBuffer::NoPass, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::resetCachedState(), and QGles2CommandBuffer::Command::ResetFrame.

Here is the call graph for this function:

◆ endFrame()

QRhi::FrameOpResult QRhiGles2::endFrame ( QRhiSwapChain * swapChain,
QRhi::EndFrameFlags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 2792 of file qrhigles2.cpp.

References currentSwapChain, QGles2SwapChain::currentTimestampPairIndex, QGles2CommandBuffer::Command::EndFrame, executeCommandBuffer(), f, needsMakeCurrentDueToSwap, and QGles2SwapChainTimestamps::TIMESTAMP_PAIRS.

Here is the call graph for this function:

◆ endOffscreenFrame()

QRhi::FrameOpResult QRhiGles2::endOffscreenFrame ( QRhi::EndFrameFlags flags)
overridevirtual

Implements QRhiImplementation.

Definition at line 2847 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::EndFrame, executeCommandBuffer(), f, and void().

Here is the call graph for this function:

◆ endPass()

◆ enqueueBarriersForPass()

void QRhiGles2::enqueueBarriersForPass ( QGles2CommandBuffer * cbD)

Definition at line 5612 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::BarriersForPass, QGles2CommandBuffer::Command::cmd, and QGles2CommandBuffer::currentPassResTrackerIndex.

Referenced by beginComputePass(), beginPass(), and endExternal().

Here is the caller graph for this function:

◆ enqueueBindFramebuffer()

QGles2RenderTargetData * QRhiGles2::enqueueBindFramebuffer ( QRhiRenderTarget * rt,
QGles2CommandBuffer * cbD,
bool * wantsColorClear = nullptr,
bool * wantsDsClear = nullptr )

Definition at line 5539 of file qrhigles2.cpp.

◆ enqueueResourceUpdates()

void QRhiGles2::enqueueResourceUpdates ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )

Definition at line 3134 of file qrhigles2.cpp.

References QGles2Texture::AccessFramebuffer, QGles2Texture::AccessRead, QGles2Buffer::AccessUpdate, QGles2Texture::AccessUpdate, QRhiResourceUpdateBatchPrivate::activeBufferOpCount, QRhiResourceUpdateBatchPrivate::activeTextureOpCount, QGles2CommandBuffer::Command::BufferSubData, QRhiResourceUpdateBatchPrivate::BufferOp::Clear, QRhiGles2::Caps::clearBuffer, QGles2CommandBuffer::Command::ClearBufferSubData, QGles2CommandBuffer::Command::cmd, QRhiBufferData::constData(), QRhiResourceUpdateBatchPrivate::BufferOp::Copy, QRhiResourceUpdateBatchPrivate::TextureOp::Copy, QGles2CommandBuffer::Command::CopyBuf, QRhiGles2::Caps::copyBuffer, QGles2CommandBuffer::Command::CopyTex, currentSwapChain, QRhiResourceUpdateBatchPrivate::BufferOp::data, QRhiResourceUpdateBatchPrivate::TextureOp::dst, QRhiResourceUpdateBatchPrivate::BufferOp::DynamicUpdate, QRhiResourceUpdateBatchPrivate::free(), QGles2CommandBuffer::Command::GenMip, QRhiResourceUpdateBatchPrivate::TextureOp::GenMips, QRhiResourceUpdateBatchPrivate::get(), QGles2CommandBuffer::Command::GetBufferSubData, QRhiResourceUpdateBatchPrivate::BufferOp::Read, QRhiResourceUpdateBatchPrivate::TextureOp::Read, QGles2CommandBuffer::Command::ReadPixels, QGles2Texture::specified, QRhiResourceUpdateBatchPrivate::TextureOp::src, QRhiResourceUpdateBatchPrivate::BufferOp::StaticUpload, trackedBufferBarrier(), trackedImageBarrier(), QRhiResourceUpdateBatchPrivate::BufferOp::type, QRhiResourceUpdateBatchPrivate::TextureOp::type, and QRhiResourceUpdateBatchPrivate::TextureOp::Upload.

Referenced by beginComputePass(), beginPass(), endComputePass(), endPass(), and resourceUpdate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enqueueSubresUpload()

void QRhiGles2::enqueueSubresUpload ( QGles2Texture * texD,
QGles2CommandBuffer * cbD,
int layer,
int level,
const QRhiTextureSubresourceUploadDescription & subresDesc )

◆ ensureContext()

bool QRhiGles2::ensureContext ( QSurface * surface = nullptr) const

Definition at line 742 of file qrhigles2.cpp.

References contextLost, and needsMakeCurrentDueToSwap.

◆ evaluateFallbackSurface()

QSurface * QRhiGles2::evaluateFallbackSurface ( ) const

Definition at line 730 of file qrhigles2.cpp.

◆ executeBindGraphicsPipeline()

◆ executeCommandBuffer()

void QRhiGles2::executeCommandBuffer ( QRhiCommandBuffer * cb)

Definition at line 3703 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::Barrier, QGles2CommandBuffer::Command::BarriersForPass, QRhiGles2::Caps::baseInstance, QRhiGles2::Caps::baseVertex, QGles2CommandBuffer::Command::BeginFrame, QGles2CommandBuffer::Command::BindComputePipeline, QGles2CommandBuffer::Command::BindFramebuffer, QGles2CommandBuffer::Command::BindGraphicsPipeline, QGles2CommandBuffer::Command::BindIndexBuffer, QGles2CommandBuffer::Command::BindVertexBuffer, QGles2CommandBuffer::Command::BlendConstants, QGles2CommandBuffer::Command::BlitFromRenderbuffer, QGles2CommandBuffer::Command::BlitFromTexture, QGles2CommandBuffer::Command::BufferSubData, QGles2CommandBuffer::Command::Clear, QGles2CommandBuffer::Command::ClearBufferSubData, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::Command::CompressedImage, QGles2CommandBuffer::Command::CompressedSubImage, QRhiGles2::Caps::compute, QGles2CommandBuffer::Command::CopyBuf, QGles2CommandBuffer::Command::CopyTex, QRhiGles2::Caps::ctxMajor, QGles2CommandBuffer::Command::Dispatch, QGles2CommandBuffer::Command::DispatchIndirect, QGles2CommandBuffer::Command::Draw, QGles2CommandBuffer::Command::DrawIndexed, QGles2CommandBuffer::Command::DrawIndexedIndirect, QGles2CommandBuffer::Command::DrawIndexedIndirectCount, QGles2CommandBuffer::Command::DrawIndirect, QGles2CommandBuffer::Command::DrawIndirectCount, CommandBufferExecTrackedState::enabledAttribArrays, QGles2CommandBuffer::Command::EndFrame, executeBindGraphicsPipeline(), f, QGles2CommandBuffer::Command::GenMip, QGles2CommandBuffer::Command::GetBufferSubData, GLenum, QRhiGles2::Caps::gles, GLint, GLintptr, GLuint, QRhiGles2::Caps::hasDrawBuffersFunc, CommandBufferExecTrackedState::instancedAttributesUsed, QRhiGles2::Caps::instancing, QRhiGles2::Caps::intAttributes, QGles2CommandBuffer::Command::InvalidateFramebuffer, QRhiGles2::Caps::maxDrawBuffers, CommandBufferExecTrackedState::maxUntrackedInstancedAttribute, QRhiGles2::Caps::nonBaseLevelFramebufferTexture, CommandBufferExecTrackedState::nonzeroAttribDivisor, QRhiGles2::Caps::properMapBuffer, QGles2CommandBuffer::Command::ReadPixels, QGles2CommandBuffer::Command::ResetFrame, QGles2CommandBuffer::Command::Scissor, QGles2CommandBuffer::Command::SetPushConstants, QRhiGles2::Caps::srgbWriteControl, QGles2CommandBuffer::Command::StencilRef, QGles2CommandBuffer::Command::SubImage, CommandBufferExecTrackedState::TRACKED_ATTRIB_COUNT, vao, QRhiGles2::Caps::vertexArrayObject, QGles2CommandBuffer::Command::Viewport, void(), void(), void(), void(), void(), void(), void(), and void().

Referenced by beginExternal(), endFrame(), endOffscreenFrame(), and finish().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ executeDeferredReleases()

void QRhiGles2::executeDeferredReleases ( )

Definition at line 1467 of file qrhigles2.cpp.

References QRhiGles2::DeferredReleaseEntry::Buffer, f, QRhiGles2::DeferredReleaseEntry::Pipeline, QRhiGles2::DeferredReleaseEntry::RenderBuffer, QRhiGles2::DeferredReleaseEntry::Texture, QRhiGles2::DeferredReleaseEntry::TextureRenderTarget, and QRhiGles2::DeferredReleaseEntry::type.

Referenced by beginFrame(), beginOffscreenFrame(), and destroy().

Here is the caller graph for this function:

◆ finish()

QRhi::FrameOpResult QRhiGles2::finish ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2879 of file qrhigles2.cpp.

References currentSwapChain, executeCommandBuffer(), f, and QGles2CommandBuffer::NoPass.

Here is the call graph for this function:

◆ gatherBlockMemberUniforms()

void QRhiGles2::gatherBlockMemberUniforms ( GLuint program,
const QByteArray & prefix,
int binding,
const QList< QShaderDescription::BlockVariable > & members,
ActiveUniformLocationTracker * activeUniformLocations,
QGles2UniformDescriptionVector * dst )

Definition at line 6280 of file qrhigles2.cpp.

◆ gatherGeneratedSamplers()

void QRhiGles2::gatherGeneratedSamplers ( GLuint program,
const QShader::SeparateToCombinedImageSamplerMapping & mapping,
QGles2SamplerDescriptionVector * dst )

Definition at line 6354 of file qrhigles2.cpp.

◆ gatherPushConstantUniforms()

void QRhiGles2::gatherPushConstantUniforms ( GLuint program,
const QShaderDescription::PushConstantBlock & pcb,
ActiveUniformLocationTracker * activeUniformLocations,
QGles2UniformDescriptionVector * dst )

Definition at line 6332 of file qrhigles2.cpp.

◆ gatherSamplers()

void QRhiGles2::gatherSamplers ( GLuint program,
const QShaderDescription::InOutVariable & v,
QGles2SamplerDescriptionVector * dst )

Definition at line 6340 of file qrhigles2.cpp.

◆ gatherUniforms()

void QRhiGles2::gatherUniforms ( GLuint program,
const QShaderDescription::UniformBlock & ub,
ActiveUniformLocationTracker * activeUniformLocations,
QGles2UniformDescriptionVector * dst )

Definition at line 6323 of file qrhigles2.cpp.

◆ glslVersionsToTry()

QList< QShaderVersion > QRhiGles2::glslVersionsToTry ( ) const

◆ isClipDepthZeroToOne()

bool QRhiGles2::isClipDepthZeroToOne ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1540 of file qrhigles2.cpp.

◆ isDeviceLost()

bool QRhiGles2::isDeviceLost ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 2012 of file qrhigles2.cpp.

References contextLost.

◆ isFeatureSupported()

◆ isProgramBinaryDiskCacheEnabled()

bool QRhiGles2::isProgramBinaryDiskCacheEnabled ( ) const

Definition at line 6393 of file qrhigles2.cpp.

◆ isTextureFormatSupported()

◆ isYUpInFramebuffer()

bool QRhiGles2::isYUpInFramebuffer ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1530 of file qrhigles2.cpp.

◆ isYUpInNDC()

bool QRhiGles2::isYUpInNDC ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1535 of file qrhigles2.cpp.

◆ lastCompletedGpuTime()

double QRhiGles2::lastCompletedGpuTime ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2757 of file qrhigles2.cpp.

References QGles2CommandBuffer::lastGpuTime.

◆ linkProgram()

bool QRhiGles2::linkProgram ( GLuint program)

Definition at line 6213 of file qrhigles2.cpp.

References f.

◆ makeThreadLocalNativeContextCurrent()

bool QRhiGles2::makeThreadLocalNativeContextCurrent ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1986 of file qrhigles2.cpp.

◆ nativeHandles() [1/2]

const QRhiNativeHandles * QRhiGles2::nativeHandles ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1969 of file qrhigles2.cpp.

◆ nativeHandles() [2/2]

const QRhiNativeHandles * QRhiGles2::nativeHandles ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2684 of file qrhigles2.cpp.

◆ pipelineCacheData()

QByteArray QRhiGles2::pipelineCacheData ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2026 of file qrhigles2.cpp.

References QGles2PipelineCacheDataHeader::driver.

◆ registerUniformIfActive()

void QRhiGles2::registerUniformIfActive ( const QShaderDescription::BlockVariable & var,
const QByteArray & namePrefix,
int binding,
int baseOffset,
GLuint program,
ActiveUniformLocationTracker * activeUniformLocations,
QGles2UniformDescriptionVector * dst )

◆ releaseCachedResources()

void QRhiGles2::releaseCachedResources ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1999 of file qrhigles2.cpp.

◆ resourceLimit()

◆ resourceUpdate()

void QRhiGles2::resourceUpdate ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )
overridevirtual

Implements QRhiImplementation.

Definition at line 5532 of file qrhigles2.cpp.

References enqueueResourceUpdates().

Here is the call graph for this function:

◆ sanityCheckVertexFragmentInterface()

void QRhiGles2::sanityCheckVertexFragmentInterface ( const QShaderDescription & vsDesc,
const QShaderDescription & fsDesc )

Definition at line 6368 of file qrhigles2.cpp.

◆ setBlendConstants()

void QRhiGles2::setBlendConstants ( QRhiCommandBuffer * cb,
const QColor & c )
overridevirtual

◆ setComputePipeline()

◆ setGraphicsPipeline()

◆ setPipelineCacheData()

void QRhiGles2::setPipelineCacheData ( const QByteArray & data)
overridevirtual

Implements QRhiImplementation.

Definition at line 2081 of file qrhigles2.cpp.

References QGles2PipelineCacheDataHeader::driver.

◆ setPushConstants()

◆ setQueueSubmitParams()

void QRhiGles2::setQueueSubmitParams ( QRhiNativeHandles * params)
overridevirtual

Implements QRhiImplementation.

Definition at line 1994 of file qrhigles2.cpp.

◆ setScissor()

void QRhiGles2::setScissor ( QRhiCommandBuffer * cb,
const QRhiScissor & scissor )
overridevirtual

◆ setShaderResources()

◆ setShadingRate()

void QRhiGles2::setShadingRate ( QRhiCommandBuffer * cb,
const QSize & coarsePixelSize )
overridevirtual

Implements QRhiImplementation.

Definition at line 2493 of file qrhigles2.cpp.

◆ setStencilRef()

◆ setUniformsFromBlock()

void QRhiGles2::setUniformsFromBlock ( const QGles2UniformDescriptionVector & uniforms,
int binding,
const char * blockData,
qint64 blockSize,
quint32 blockOffset,
QGles2UniformState * uniformState )

Definition at line 5339 of file qrhigles2.cpp.

◆ setUniformValue()

◆ setupUniformStateTracking()

void QRhiGles2::setupUniformStateTracking ( QGles2UniformDescriptionVector * uniforms,
QGles2UniformDescriptionVector * pushConstantUniforms,
QGles2UniformStateVector * uniformState )
static

Definition at line 5320 of file qrhigles2.cpp.

◆ setVertexInput()

void QRhiGles2::setVertexInput ( QRhiCommandBuffer * cb,
int startBinding,
int bindingCount,
const QRhiCommandBuffer::VertexInput * bindings,
QRhiBuffer * indexBuf,
quint32 indexOffset,
QRhiCommandBuffer::IndexFormat indexFormat )
overridevirtual

◆ setViewport()

void QRhiGles2::setViewport ( QRhiCommandBuffer * cb,
const QRhiViewport & viewport )
overridevirtual

◆ shaderSource()

QByteArray QRhiGles2::shaderSource ( const QRhiShaderStage & shaderStage,
QShaderVersion * shaderVersion,
std::optional< QShaderVersion > commonVersion = std::nullopt )

Definition at line 6140 of file qrhigles2.cpp.

◆ statistics()

QRhiStats QRhiGles2::statistics ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1979 of file qrhigles2.cpp.

◆ supportedSampleCounts()

QList< int > QRhiGles2::supportedSampleCounts ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1497 of file qrhigles2.cpp.

◆ supportedShadingRates()

QList< QSize > QRhiGles2::supportedShadingRates ( int sampleCount) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1507 of file qrhigles2.cpp.

◆ trackedBufferBarrier()

void QRhiGles2::trackedBufferBarrier ( QGles2CommandBuffer * cbD,
QGles2Buffer * bufD,
QGles2Buffer::Access access )

Definition at line 2941 of file qrhigles2.cpp.

References QGles2Buffer::UsageState::access, QGles2CommandBuffer::Command::Barrier, bufferAccessIsWrite(), QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::NoPass, QGles2CommandBuffer::recordingPass, and QGles2Buffer::usageState.

Referenced by enqueueResourceUpdates().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trackedImageBarrier()

void QRhiGles2::trackedImageBarrier ( QGles2CommandBuffer * cbD,
QGles2Texture * texD,
QGles2Texture::Access access )

Definition at line 2964 of file qrhigles2.cpp.

References QGles2Texture::UsageState::access, QGles2CommandBuffer::Command::Barrier, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::NoPass, QGles2CommandBuffer::recordingPass, textureAccessIsWrite(), and QGles2Texture::usageState.

Referenced by enqueueResourceUpdates(), and enqueueSubresUpload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trackedRegisterBuffer()

void QRhiGles2::trackedRegisterBuffer ( QRhiPassResourceTracker * passResTracker,
QGles2Buffer * bufD,
QRhiPassResourceTracker::BufferAccess access,
QRhiPassResourceTracker::BufferStage stage )

Definition at line 3649 of file qrhigles2.cpp.

References QGles2Buffer::UsageState::access, QRhiPassResourceTracker::registerBuffer(), toGlAccess(), toPassTrackerUsageState(), and QGles2Buffer::usageState.

Referenced by dispatchIndirect(), drawIndexedIndirect(), drawIndexedIndirectCount(), drawIndirect(), drawIndirectCount(), setShaderResources(), and setVertexInput().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trackedRegisterTexture()

void QRhiGles2::trackedRegisterTexture ( QRhiPassResourceTracker * passResTracker,
QGles2Texture * texD,
QRhiPassResourceTracker::TextureAccess access,
QRhiPassResourceTracker::TextureStage stage )

Definition at line 3659 of file qrhigles2.cpp.

References QGles2Texture::UsageState::access, QRhiPassResourceTracker::registerTexture(), toGlAccess(), toPassTrackerUsageState(), and QGles2Texture::usageState.

Referenced by setShaderResources().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tryLoadFromDiskOrPipelineCache()

QRhiGles2::ProgramCacheResult QRhiGles2::tryLoadFromDiskOrPipelineCache ( const QRhiShaderStage * stages,
int stageCount,
GLuint program,
const QVector< QShaderDescription::InOutVariable > & inputVars,
QByteArray * cacheKey,
std::optional< QShaderVersion > commonVersion = std::nullopt )

Definition at line 6421 of file qrhigles2.cpp.

◆ trySaveToDiskCache()

void QRhiGles2::trySaveToDiskCache ( GLuint program,
const QByteArray & cacheKey )

Definition at line 6514 of file qrhigles2.cpp.

◆ trySaveToPipelineCache()

void QRhiGles2::trySaveToPipelineCache ( GLuint program,
const QByteArray & cacheKey,
bool force = false )

Definition at line 6526 of file qrhigles2.cpp.

◆ ubufAlignment()

int QRhiGles2::ubufAlignment ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1523 of file qrhigles2.cpp.

◆ void() [1/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glClearBufferSubData)

◆ void() [2/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glCompressedTexImage1D)

Referenced by executeCommandBuffer().

Here is the caller graph for this function:

◆ void() [3/23]

const GLvoid * QRhiGles2::void ( QOPENGLF_APIENTRYP glCompressedTexSubImage1D)

◆ void() [4/23]

const GLvoid * QRhiGles2::void ( QOPENGLF_APIENTRYP glCopyTexSubImage1D)

◆ void() [5/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glDrawArraysInstancedBaseInstance)

Referenced by create(), and executeCommandBuffer().

Here is the caller graph for this function:

◆ void() [6/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glDrawElementsInstancedBaseInstance)

◆ void() [7/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glDrawElementsInstancedBaseVertexBaseInstance)

Referenced by create(), and executeCommandBuffer().

Here is the caller graph for this function:

◆ void() [8/23]

const GLvoid const GLvoid * QRhiGles2::void ( QOPENGLF_APIENTRYP glFramebufferTexture1D)

◆ void() [9/23]

const void quint64 const GLchar * QRhiGles2::void ( QOPENGLF_APIENTRYP glFramebufferTexture2DMultisampleEXT)

◆ void() [10/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glFramebufferTextureMultisampleMultiviewOVR)

◆ void() [11/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glFramebufferTextureMultiviewOVR)

◆ void() [12/23]

const void * QRhiGles2::void ( QOPENGLF_APIENTRYP glGetQueryObjectui64v)

Referenced by create(), and endOffscreenFrame().

Here is the caller graph for this function:

◆ void() [13/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glMultiDrawArraysIndirect)

Referenced by create(), and executeCommandBuffer().

Here is the caller graph for this function:

◆ void() [14/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glMultiDrawArraysIndirectCount)

◆ void() [15/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glMultiDrawElementsIndirect)

Referenced by create(), and executeCommandBuffer().

Here is the caller graph for this function:

◆ void() [16/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glMultiDrawElementsIndirectCount)

Referenced by create(), and executeCommandBuffer().

Here is the caller graph for this function:

◆ void() [17/23]

const void quint64 * QRhiGles2::void ( QOPENGLF_APIENTRYP glObjectLabel)

◆ void() [18/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glPolygonMode)

◆ void() [19/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glQueryCounter)

Referenced by create(), and executeCommandBuffer().

Here is the caller graph for this function:

◆ void() [20/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glRenderbufferStorageMultisampleEXT)

◆ void() [21/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glTexImage1D)

◆ void() [22/23]

const void * QRhiGles2::void ( QOPENGLF_APIENTRYP glTexStorage1D)

◆ void() [23/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glTexSubImage1D)

Referenced by executeCommandBuffer().

Here is the caller graph for this function:

Member Data Documentation

◆ caps

struct QRhiGles2::Caps QRhiGles2::caps

◆ contextLost

bool QRhiGles2::contextLost = false
mutable

Definition at line 1269 of file qrhigles2_p.h.

Referenced by create(), ensureContext(), and isDeviceLost().

◆ ctx

QOpenGLContext* QRhiGles2::ctx = nullptr

Definition at line 1072 of file qrhigles2_p.h.

◆ currentSwapChain

QGles2SwapChain* QRhiGles2::currentSwapChain = nullptr

Definition at line 1264 of file qrhigles2_p.h.

Referenced by beginExternal(), beginFrame(), endFrame(), enqueueResourceUpdates(), and finish().

◆ driverInfoStruct

QRhiDriverInfo QRhiGles2::driverInfoStruct

Definition at line 1268 of file qrhigles2_p.h.

◆ f

◆ fallbackSurface

QSurface* QRhiGles2::fallbackSurface = nullptr

Definition at line 1075 of file qrhigles2_p.h.

◆ frameNo

uint QRhiGles2::frameNo = 0

Definition at line 1270 of file qrhigles2_p.h.

Referenced by beginFrame(), setComputePipeline(), and setGraphicsPipeline().

◆ GLenum [1/5]

const void quint64 const GLchar QRhiGles2::GLenum

Definition at line 1101 of file qrhigles2_p.h.

◆ GLenum [2/5]

const GLvoid const GLvoid QRhiGles2::GLenum

Definition at line 1092 of file qrhigles2_p.h.

Referenced by executeCommandBuffer().

◆ GLenum [3/5]

const GLvoid QRhiGles2::GLenum

Definition at line 1090 of file qrhigles2_p.h.

Referenced by executeCommandBuffer().

◆ GLenum [4/5]

const void QRhiGles2::GLenum

Definition at line 1083 of file qrhigles2_p.h.

◆ GLenum [5/5]

const void quint64 const GLchar QRhiGles2::GLenum = nullptr

Definition at line 1080 of file qrhigles2_p.h.

Referenced by executeBindGraphicsPipeline().

◆ GLint [1/5]

const void quint64 const GLchar QRhiGles2::GLint

Definition at line 1101 of file qrhigles2_p.h.

◆ GLint [2/5]

const GLvoid const GLvoid QRhiGles2::GLint = nullptr

Definition at line 1093 of file qrhigles2_p.h.

◆ GLint [3/5]

const GLvoid QRhiGles2::GLint

Definition at line 1086 of file qrhigles2_p.h.

Referenced by executeCommandBuffer().

◆ GLint [4/5]

const void QRhiGles2::GLint

Definition at line 1083 of file qrhigles2_p.h.

◆ GLint [5/5]

const void QRhiGles2::GLint

Definition at line 1081 of file qrhigles2_p.h.

Referenced by create().

◆ GLintptr [1/2]

const void QRhiGles2::GLintptr

Definition at line 1106 of file qrhigles2_p.h.

Referenced by create(), and executeCommandBuffer().

◆ GLintptr [2/2]

const void QRhiGles2::GLintptr

Definition at line 1097 of file qrhigles2_p.h.

Referenced by create(), and executeCommandBuffer().

◆ GLsizei [1/5]

const void quint64 const GLchar QRhiGles2::GLsizei = nullptr

Definition at line 1101 of file qrhigles2_p.h.

◆ GLsizei [2/5]

const void quint64 QRhiGles2::GLsizei

Definition at line 1100 of file qrhigles2_p.h.

◆ GLsizei [3/5]

const GLvoid QRhiGles2::GLsizei = nullptr

Definition at line 1087 of file qrhigles2_p.h.

◆ GLsizei [4/5]

const void QRhiGles2::GLsizei = nullptr

Definition at line 1083 of file qrhigles2_p.h.

◆ GLsizei [5/5]

const void QRhiGles2::GLsizei = nullptr

Definition at line 1081 of file qrhigles2_p.h.

◆ GLsizeiptr

QRhiGles2::GLsizeiptr

Definition at line 1097 of file qrhigles2_p.h.

◆ GLuint [1/5]

const void QRhiGles2::GLuint = nullptr

Definition at line 1110 of file qrhigles2_p.h.

Referenced by create(), and executeCommandBuffer().

◆ GLuint [2/5]

const void quint64 const GLchar QRhiGles2::GLuint

Definition at line 1101 of file qrhigles2_p.h.

◆ GLuint [3/5]

const void quint64 QRhiGles2::GLuint

Definition at line 1100 of file qrhigles2_p.h.

◆ GLuint [4/5]

QRhiGles2::GLuint = nullptr

Definition at line 1094 of file qrhigles2_p.h.

◆ GLuint [5/5]

const void QRhiGles2::GLuint = nullptr

Definition at line 1092 of file qrhigles2_p.h.

◆ importedContext

bool QRhiGles2::importedContext = false

Definition at line 1073 of file qrhigles2_p.h.

Referenced by QRhiGles2(), create(), and destroy().

◆ m_pipelineCache

QRhiBinaryCache<QByteArray, PipelineCacheData> QRhiGles2::m_pipelineCache { "Program binary cache" }

Definition at line 1317 of file qrhigles2_p.h.

◆ m_scratch

struct QRhiGles2::Scratch QRhiGles2::m_scratch

◆ m_shaderCache

QHash<std::pair<QRhiShaderStage, QShaderVersion>, uint> QRhiGles2::m_shaderCache

Definition at line 1311 of file qrhigles2_p.h.

◆ MAX_PUSH_CONSTANTS_SIZE

quint32 QRhiGles2::MAX_PUSH_CONSTANTS_SIZE = 128
staticconstexpr

Definition at line 925 of file qrhigles2_p.h.

◆ maybeShareContext

QOpenGLContext* QRhiGles2::maybeShareContext = nullptr

Definition at line 1077 of file qrhigles2_p.h.

◆ maybeWindow

QPointer<QWindow> QRhiGles2::maybeWindow = nullptr

Definition at line 1076 of file qrhigles2_p.h.

◆ nativeHandlesStruct

QRhiGles2NativeHandles QRhiGles2::nativeHandlesStruct

Definition at line 1267 of file qrhigles2_p.h.

◆ needsMakeCurrentDueToSwap

bool QRhiGles2::needsMakeCurrentDueToSwap = false
mutable

Definition at line 1078 of file qrhigles2_p.h.

Referenced by endFrame(), and ensureContext().

◆ ofr

struct QRhiGles2::OffscreenFrame QRhiGles2::ofr

◆ releaseQueue

QList<DeferredReleaseEntry> QRhiGles2::releaseQueue

Definition at line 1301 of file qrhigles2_p.h.

◆ requestedFormat

QSurfaceFormat QRhiGles2::requestedFormat

Definition at line 1074 of file qrhigles2_p.h.

◆ rhiFlags

QRhi::Flags QRhiGles2::rhiFlags

Definition at line 1071 of file qrhigles2_p.h.

◆ supportedCompressedFormats

QSet<GLint> QRhiGles2::supportedCompressedFormats

Definition at line 1265 of file qrhigles2_p.h.

◆ supportedSampleCountList

QList<int> QRhiGles2::supportedSampleCountList
mutable

Definition at line 1266 of file qrhigles2_p.h.

◆ vao

uint QRhiGles2::vao = 0

Definition at line 1112 of file qrhigles2_p.h.

Referenced by beginExternal(), destroy(), and executeCommandBuffer().


The documentation for this class was generated from the following files: