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 *paramsparams, QRhiGles2NativeHandles *importDevice=nullptr)
bool create (QRhi::Flags flagsflags) override
void destroy () override
QRhiGraphicsPipeline * createGraphicsPipeline () override
QRhiComputePipeline * createComputePipeline () override
QRhiShaderResourceBindings * createShaderResourceBindings () override
QRhiBuffer * createBuffer (QRhiBuffer::Type typetype, QRhiBuffer::UsageFlags usageusage, quint32 sizesize) override
QRhiRenderBuffer * createRenderBuffer (QRhiRenderBuffer::Type typetype, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flagsflags, QRhiTexture::Format backingFormatHint) override
QRhiTexture * createTexture (QRhiTexture::Format formatformat, const QSize &pixelSize, int depthdepth, int arraySize, int sampleCount, QRhiTexture::Flags flagsflags) override
QRhiSampler * createSampler (QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode vv, QRhiSampler::AddressMode ww) override
QRhiTextureRenderTarget * createTextureRenderTarget (const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flagsflags) override
QRhiShadingRateMap * createShadingRateMap () override
QRhiSwapChain * createSwapChain () override
QRhi::FrameOpResult beginFrame (QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flagsflags) override
QRhi::FrameOpResult endFrame (QRhiSwapChain *swapChain, QRhi::EndFrameFlags flagsflags) override
QRhi::FrameOpResult beginOffscreenFrame (QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flagsflags) override
QRhi::FrameOpResult endOffscreenFrame (QRhi::EndFrameFlags flagsflags) 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 flagsflags) 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 &cc) override
void setStencilRef (QRhiCommandBuffer *cb, quint32 refValue) override
void setPushConstants (QRhiCommandBuffer *cb, quint32 offsetoffset, quint32 sizesize, const void *datadata) 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 drawCountdrawCount, quint32 stridestride) override
void drawIndexedIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCountdrawCount, quint32 stridestride) override
void drawIndirectCount (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCountmaxDrawCount, quint32 stridestride) override
void drawIndexedIndirectCount (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCountmaxDrawCount, quint32 stridestride) override
void dispatchIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset) override
void debugMarkBegin (QRhiCommandBuffer *cb, const QByteArray &namename) override
void debugMarkEnd (QRhiCommandBuffer *cb) override
void debugMarkMsg (QRhiCommandBuffer *cb, const QByteArray &msg) override
void beginComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flagsflags) override
void endComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void setComputePipeline (QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
void dispatch (QRhiCommandBuffer *cb, int xx, int yy, int zz) 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 formatformat, QRhiTexture::Flags flagsflags) const override
bool isFeatureSupported (QRhi::Feature feature) const override
int resourceLimit (QRhi::ResourceLimit limitlimit) const override
const QRhiNativeHandles * nativeHandles () override
QRhiDriverInfo driverInfo () const override
QRhiStats statistics () override
bool makeThreadLocalNativeContextCurrent () override
void setQueueSubmitParams (QRhiNativeHandles *paramsparams) override
void releaseCachedResources () override
bool isDeviceLost () const override
QByteArray pipelineCacheData () override
void setPipelineCacheData (const QByteArray &datadata) override
bool ensureContext (QSurface *surface=nullptr) const
QSurface * evaluateFallbackSurface () const
void executeDeferredReleases ()
GLuint genBuffer ()
void releaseBufferNameCache ()
void trackedBufferBarrier (QGles2CommandBuffer *cbD, QGles2Buffer *bufD, QGles2Buffer::Access accessaccess)
void trackedImageBarrier (QGles2CommandBuffer *cbD, QGles2Texture *texD, QGles2Texture::Access accessaccess)
void enqueueSubresUpload (QGles2Texture *texD, QGles2CommandBuffer *cbD, int layerlayer, int levellevel, const QRhiTextureSubresourceUploadDescription &subresDesc)
void enqueueResourceUpdates (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
void trackedRegisterBuffer (QRhiPassResourceTracker *passResTracker, QGles2Buffer *bufD, QRhiPassResourceTracker::BufferAccess accessaccess, QRhiPassResourceTracker::BufferStage stage)
void trackedRegisterTexture (QRhiPassResourceTracker *passResTracker, QGles2Texture *texD, QRhiPassResourceTracker::TextureAccess accessaccess, 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 *srcsrc, 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 *stagesstages, int stageCount) const
QByteArray shaderSource (const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion, std::optional< QShaderVersion > commonVersion=std::nullopt)
bool compileShader (GLuint programprogram, const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion, std::optional< QShaderVersion > commonVersion=std::nullopt)
bool linkProgram (GLuint programprogram)
void registerUniformIfActive (const QShaderDescription::BlockVariable &var, const QByteArray &namePrefix, int binding, int baseOffset, GLuint programprogram, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dstdst)
void gatherBlockMemberUniforms (GLuint programprogram, const QByteArray &prefix, int binding, const QList< QShaderDescription::BlockVariable > &members, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dstdst)
void gatherUniforms (GLuint programprogram, const QShaderDescription::UniformBlock &ub, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dstdst)
void gatherPushConstantUniforms (GLuint programprogram, const QShaderDescription::PushConstantBlock &pcb, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dstdst)
void gatherSamplers (GLuint programprogram, const QShaderDescription::InOutVariable &vv, QGles2SamplerDescriptionVector *dstdst)
void gatherGeneratedSamplers (GLuint programprogram, const QShader::SeparateToCombinedImageSamplerMapping &mappingmapping, QGles2SamplerDescriptionVector *dstdst)
void sanityCheckVertexFragmentInterface (const QShaderDescription &vsDesc, const QShaderDescription &fsDesc)
bool isProgramBinaryDiskCacheEnabled () const
ProgramCacheResult tryLoadFromDiskOrPipelineCache (const QRhiShaderStage *stagesstages, int stageCount, GLuint programprogram, const QVector< QShaderDescription::InOutVariable > &inputVars, QByteArray *cacheKey, std::optional< QShaderVersion > commonVersion=std::nullopt)
void trySaveToDiskCache (GLuint programprogram, const QByteArray &cacheKey)
void trySaveToPipelineCache (GLuint programprogram, 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 typetype, 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 flagsflags, QRhiAdapter *adapter)
bool isCompressedFormat (QRhiTexture::Format formatformat) const
bool compressedFormatInfo (QRhiTexture::Format formatformat, const QSize &sizesize, quint32 *bpl, quint32 *byteSize, QSize *blockDim) const
bool textureFormatInfo (QRhiTexture::Format formatformat, const QSize &sizesize, quint32 *bpl, quint32 *byteSize, quint32 *bytesPerPixel) const
bool isStencilSupportingFormat (QRhiTexture::Format formatformat) const
void registerResource (QRhiResource *resres, bool ownsNativeResources=true)
void unregisterResource (QRhiResource *resres)
void addDeleteLater (QRhiResource *resres)
void addCleanupCallback (const QRhi::CleanupCallback &callback)
void addCleanupCallback (const void *keykey, const QRhi::CleanupCallback &callback)
void removeCleanupCallback (const void *keykey)
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 typetype) const
quint32 byteSizePerVertexForVertexInputFormat (QRhiVertexInputAttribute::Format formatformat) const
int effectiveSampleCount (int sampleCount) const
QSize clampedSubResourceUploadSize (QSize sizesize, QPoint dstPos, int levellevel, QSize textureSizeAtLevelZero, bool warn=true)
QSize clampedSubResourceUploadSizeForSourceData (QSize sizesize, quint32 bpl, quint32 bytesPerPixel, qsizetype dataSizedataSize, 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 *paramsparams, QRhiNativeHandles *importDevice)
static const QRhiShaderResourceBinding::Data * shaderResourceBindingData (const QRhiShaderResourceBinding &binding)
static QRhiShaderResourceBinding::Data * shaderResourceBindingData (QRhiShaderResourceBinding &binding)
static bool sortedBindingLessThan (const QRhiShaderResourceBinding &aa, const QRhiShaderResourceBinding &bb)

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
std::array< GLuint, 8 > bufferNameCache
int bufferNameCacheCount = 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 861 of file qrhigles2_p.h.

Member Typedef Documentation

◆ ActiveUniformLocationTracker

Definition at line 1044 of file qrhigles2_p.h.

Member Enumeration Documentation

◆ ProgramCacheResult

Enumerator
ProgramCacheHit 
ProgramCacheMiss 
ProgramCacheError 

Definition at line 1067 of file qrhigles2_p.h.

Constructor & Destructor Documentation

◆ QRhiGles2()

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

Definition at line 693 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 6003 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 5930 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 2748 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 2811 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 2874 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 1575 of file qrhigles2.cpp.

◆ commonGlslEsVersion()

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

Definition at line 6220 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 6268 of file qrhigles2.cpp.

References f.

◆ create()

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

Implements QRhiImplementation.

Definition at line 833 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, GLenum, 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::srgbWriteControl, QRhiGles2::Caps::tessellation, QRhiGles2::Caps::texelFetch, QRhiGles2::Caps::texture1D, QRhiGles2::Caps::texture3D, QRhiGles2::Caps::textureCompareMode, QRhiGles2::Caps::textureStorage, QRhiGles2::Caps::timestamps, QRhiGles2::Caps::uniformBuffers, QRhiGles2::Caps::unpackRowLength, QRhiGles2::Caps::vertexArrayObject, void(), void(), void(), void(), 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 1548 of file qrhigles2.cpp.

◆ createComputePipeline()

QRhiComputePipeline * QRhiGles2::createComputePipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2229 of file qrhigles2.cpp.

◆ createGraphicsPipeline()

QRhiGraphicsPipeline * QRhiGles2::createGraphicsPipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2219 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 2187 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 2201 of file qrhigles2.cpp.

◆ createShaderResourceBindings()

QRhiShaderResourceBindings * QRhiGles2::createShaderResourceBindings ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2224 of file qrhigles2.cpp.

◆ createShadingRateMap()

QRhiShadingRateMap * QRhiGles2::createShadingRateMap ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2208 of file qrhigles2.cpp.

◆ createSwapChain()

QRhiSwapChain * QRhiGles2::createSwapChain ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1543 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 2194 of file qrhigles2.cpp.

◆ createTextureRenderTarget()

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

Implements QRhiImplementation.

Definition at line 2213 of file qrhigles2.cpp.

◆ debugMarkBegin()

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

Implements QRhiImplementation.

Definition at line 2706 of file qrhigles2.cpp.

◆ debugMarkEnd()

void QRhiGles2::debugMarkEnd ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2715 of file qrhigles2.cpp.

◆ debugMarkMsg()

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

Implements QRhiImplementation.

Definition at line 2723 of file qrhigles2.cpp.

◆ destroy()

void QRhiGles2::destroy ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1445 of file qrhigles2.cpp.

References bufferNameCacheCount, executeDeferredReleases(), f, importedContext, releaseBufferNameCache(), 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 2020 of file qrhigles2.cpp.

◆ endComputePass()

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

Implements QRhiImplementation.

Definition at line 5947 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 2784 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 2840 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 2895 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 5716 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 5643 of file qrhigles2.cpp.

◆ enqueueResourceUpdates()

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

Definition at line 3198 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, QRhiResourceUpdateBatchPrivate::BufferOp::Copy, QRhiResourceUpdateBatchPrivate::TextureOp::Copy, QGles2CommandBuffer::Command::CopyBuf, QRhiGles2::Caps::copyBuffer, QGles2CommandBuffer::Command::CopyTex, currentSwapChain, 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, 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 )

Definition at line 3031 of file qrhigles2.cpp.

References QGles2Texture::AccessUpdate, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::Command::CompressedImage, QGles2CommandBuffer::Command::CompressedSubImage, QGles2Texture::isLevelAllocated(), QGles2CommandBuffer::Command::SubImage, trackedImageBarrier(), and QRhiGles2::Caps::unpackRowLength.

Here is the call graph for this function:

◆ ensureContext()

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

Definition at line 743 of file qrhigles2.cpp.

References contextLost, and needsMakeCurrentDueToSwap.

◆ evaluateFallbackSurface()

QSurface * QRhiGles2::evaluateFallbackSurface ( ) const

Definition at line 731 of file qrhigles2.cpp.

◆ executeBindGraphicsPipeline()

◆ executeCommandBuffer()

void QRhiGles2::executeCommandBuffer ( QRhiCommandBuffer * cb)

Definition at line 3766 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 1497 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 2927 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 6385 of file qrhigles2.cpp.

◆ gatherGeneratedSamplers()

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

Definition at line 6459 of file qrhigles2.cpp.

◆ gatherPushConstantUniforms()

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

Definition at line 6437 of file qrhigles2.cpp.

◆ gatherSamplers()

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

Definition at line 6445 of file qrhigles2.cpp.

◆ gatherUniforms()

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

Definition at line 6428 of file qrhigles2.cpp.

◆ genBuffer()

GLuint QRhiGles2::genBuffer ( )

Definition at line 1479 of file qrhigles2.cpp.

References bufferNameCacheCount, and f.

◆ glslVersionsToTry()

QList< QShaderVersion > QRhiGles2::glslVersionsToTry ( ) const

◆ isClipDepthZeroToOne()

bool QRhiGles2::isClipDepthZeroToOne ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1570 of file qrhigles2.cpp.

◆ isDeviceLost()

bool QRhiGles2::isDeviceLost ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 2060 of file qrhigles2.cpp.

References contextLost.

◆ isFeatureSupported()

◆ isProgramBinaryDiskCacheEnabled()

bool QRhiGles2::isProgramBinaryDiskCacheEnabled ( ) const

Definition at line 6498 of file qrhigles2.cpp.

◆ isTextureFormatSupported()

◆ isYUpInFramebuffer()

bool QRhiGles2::isYUpInFramebuffer ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1560 of file qrhigles2.cpp.

◆ isYUpInNDC()

bool QRhiGles2::isYUpInNDC ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1565 of file qrhigles2.cpp.

◆ lastCompletedGpuTime()

double QRhiGles2::lastCompletedGpuTime ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2805 of file qrhigles2.cpp.

References QGles2CommandBuffer::lastGpuTime.

◆ linkProgram()

bool QRhiGles2::linkProgram ( GLuint program)

Definition at line 6318 of file qrhigles2.cpp.

References f.

◆ makeThreadLocalNativeContextCurrent()

bool QRhiGles2::makeThreadLocalNativeContextCurrent ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2032 of file qrhigles2.cpp.

◆ nativeHandles() [1/2]

const QRhiNativeHandles * QRhiGles2::nativeHandles ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2015 of file qrhigles2.cpp.

◆ nativeHandles() [2/2]

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

Implements QRhiImplementation.

Definition at line 2732 of file qrhigles2.cpp.

◆ pipelineCacheData()

QByteArray QRhiGles2::pipelineCacheData ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2074 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 )

◆ releaseBufferNameCache()

void QRhiGles2::releaseBufferNameCache ( )

Definition at line 1489 of file qrhigles2.cpp.

References bufferNameCacheCount, and f.

Referenced by destroy(), and releaseCachedResources().

Here is the caller graph for this function:

◆ releaseCachedResources()

void QRhiGles2::releaseCachedResources ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2045 of file qrhigles2.cpp.

References releaseBufferNameCache().

Here is the call graph for this function:

◆ resourceLimit()

◆ resourceUpdate()

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

Implements QRhiImplementation.

Definition at line 5636 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 6473 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 2129 of file qrhigles2.cpp.

References QGles2PipelineCacheDataHeader::driver.

◆ setPushConstants()

◆ setQueueSubmitParams()

void QRhiGles2::setQueueSubmitParams ( QRhiNativeHandles * params)
overridevirtual

Implements QRhiImplementation.

Definition at line 2040 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 2541 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 5439 of file qrhigles2.cpp.

◆ setUniformValue()

◆ setupUniformStateTracking()

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

Definition at line 5420 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 6244 of file qrhigles2.cpp.

◆ statistics()

QRhiStats QRhiGles2::statistics ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2025 of file qrhigles2.cpp.

◆ supportedSampleCounts()

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

Implements QRhiImplementation.

Definition at line 1527 of file qrhigles2.cpp.

◆ supportedShadingRates()

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

Implements QRhiImplementation.

Definition at line 1537 of file qrhigles2.cpp.

◆ trackedBufferBarrier()

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

Definition at line 2989 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 3012 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 3712 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 3722 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 6526 of file qrhigles2.cpp.

◆ trySaveToDiskCache()

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

Definition at line 6619 of file qrhigles2.cpp.

◆ trySaveToPipelineCache()

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

Definition at line 6631 of file qrhigles2.cpp.

◆ ubufAlignment()

int QRhiGles2::ubufAlignment ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1553 of file qrhigles2.cpp.

◆ void() [1/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glClearBufferSubData)

◆ void() [2/23]

QRhiGles2::void ( QOPENGLF_APIENTRYP glCompressedTexImage1D)

Referenced by create(), and 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)

Referenced by create().

Here is the caller graph for this function:

◆ 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)

Referenced by create().

Here is the caller graph for this function:

◆ 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 create(), and executeCommandBuffer().

Here is the caller graph for this function:

Member Data Documentation

◆ bufferNameCache

std::array<GLuint, 8> QRhiGles2::bufferNameCache

Definition at line 1283 of file qrhigles2_p.h.

◆ bufferNameCacheCount

int QRhiGles2::bufferNameCacheCount = 0

Definition at line 1284 of file qrhigles2_p.h.

Referenced by destroy(), genBuffer(), and releaseBufferNameCache().

◆ caps

struct QRhiGles2::Caps QRhiGles2::caps

◆ contextLost

bool QRhiGles2::contextLost = false
mutable

Definition at line 1281 of file qrhigles2_p.h.

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

◆ ctx

QOpenGLContext* QRhiGles2::ctx = nullptr

Definition at line 1082 of file qrhigles2_p.h.

◆ currentSwapChain

QGles2SwapChain* QRhiGles2::currentSwapChain = nullptr

Definition at line 1276 of file qrhigles2_p.h.

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

◆ driverInfoStruct

QRhiDriverInfo QRhiGles2::driverInfoStruct

Definition at line 1280 of file qrhigles2_p.h.

◆ f

◆ fallbackSurface

QSurface* QRhiGles2::fallbackSurface = nullptr

Definition at line 1085 of file qrhigles2_p.h.

◆ frameNo

uint QRhiGles2::frameNo = 0

Definition at line 1282 of file qrhigles2_p.h.

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

◆ GLenum [1/5]

const void quint64 const GLchar QRhiGles2::GLenum

Definition at line 1111 of file qrhigles2_p.h.

Referenced by create().

◆ GLenum [2/5]

const GLvoid const GLvoid QRhiGles2::GLenum

Definition at line 1102 of file qrhigles2_p.h.

Referenced by create(), and executeCommandBuffer().

◆ GLenum [3/5]

const GLvoid QRhiGles2::GLenum

Definition at line 1100 of file qrhigles2_p.h.

Referenced by create(), and executeCommandBuffer().

◆ GLenum [4/5]

const void QRhiGles2::GLenum

Definition at line 1093 of file qrhigles2_p.h.

◆ GLenum [5/5]

const void quint64 const GLchar QRhiGles2::GLenum = nullptr

Definition at line 1090 of file qrhigles2_p.h.

Referenced by create(), and executeBindGraphicsPipeline().

◆ GLint [1/5]

const void quint64 const GLchar QRhiGles2::GLint

Definition at line 1111 of file qrhigles2_p.h.

◆ GLint [2/5]

const GLvoid const GLvoid QRhiGles2::GLint = nullptr

Definition at line 1103 of file qrhigles2_p.h.

◆ GLint [3/5]

const GLvoid QRhiGles2::GLint

Definition at line 1096 of file qrhigles2_p.h.

Referenced by create(), and executeCommandBuffer().

◆ GLint [4/5]

const void QRhiGles2::GLint

Definition at line 1093 of file qrhigles2_p.h.

Referenced by create().

◆ GLint [5/5]

const void QRhiGles2::GLint

Definition at line 1091 of file qrhigles2_p.h.

Referenced by create().

◆ GLintptr [1/2]

const void QRhiGles2::GLintptr

Definition at line 1116 of file qrhigles2_p.h.

Referenced by create(), and executeCommandBuffer().

◆ GLintptr [2/2]

const void QRhiGles2::GLintptr

Definition at line 1107 of file qrhigles2_p.h.

Referenced by create(), and executeCommandBuffer().

◆ GLsizei [1/5]

const void quint64 const GLchar QRhiGles2::GLsizei = nullptr

Definition at line 1111 of file qrhigles2_p.h.

◆ GLsizei [2/5]

const void quint64 QRhiGles2::GLsizei

Definition at line 1110 of file qrhigles2_p.h.

◆ GLsizei [3/5]

const GLvoid QRhiGles2::GLsizei = nullptr

Definition at line 1097 of file qrhigles2_p.h.

◆ GLsizei [4/5]

const void QRhiGles2::GLsizei = nullptr

Definition at line 1093 of file qrhigles2_p.h.

◆ GLsizei [5/5]

const void QRhiGles2::GLsizei = nullptr

Definition at line 1091 of file qrhigles2_p.h.

◆ GLsizeiptr

QRhiGles2::GLsizeiptr

Definition at line 1107 of file qrhigles2_p.h.

◆ GLuint [1/5]

const void QRhiGles2::GLuint = nullptr

Definition at line 1120 of file qrhigles2_p.h.

Referenced by create(), and executeCommandBuffer().

◆ GLuint [2/5]

const void quint64 const GLchar QRhiGles2::GLuint

Definition at line 1111 of file qrhigles2_p.h.

◆ GLuint [3/5]

const void quint64 QRhiGles2::GLuint

Definition at line 1110 of file qrhigles2_p.h.

Referenced by create().

◆ GLuint [4/5]

QRhiGles2::GLuint = nullptr

Definition at line 1104 of file qrhigles2_p.h.

Referenced by create().

◆ GLuint [5/5]

const void QRhiGles2::GLuint = nullptr

Definition at line 1102 of file qrhigles2_p.h.

◆ importedContext

bool QRhiGles2::importedContext = false

Definition at line 1083 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 1331 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 1325 of file qrhigles2_p.h.

◆ MAX_PUSH_CONSTANTS_SIZE

quint32 QRhiGles2::MAX_PUSH_CONSTANTS_SIZE = 128
staticconstexpr

Definition at line 933 of file qrhigles2_p.h.

◆ maybeShareContext

QOpenGLContext* QRhiGles2::maybeShareContext = nullptr

Definition at line 1087 of file qrhigles2_p.h.

◆ maybeWindow

QPointer<QWindow> QRhiGles2::maybeWindow = nullptr

Definition at line 1086 of file qrhigles2_p.h.

◆ nativeHandlesStruct

QRhiGles2NativeHandles QRhiGles2::nativeHandlesStruct

Definition at line 1279 of file qrhigles2_p.h.

◆ needsMakeCurrentDueToSwap

bool QRhiGles2::needsMakeCurrentDueToSwap = false
mutable

Definition at line 1088 of file qrhigles2_p.h.

Referenced by endFrame(), and ensureContext().

◆ ofr

struct QRhiGles2::OffscreenFrame QRhiGles2::ofr

◆ releaseQueue

QList<DeferredReleaseEntry> QRhiGles2::releaseQueue

Definition at line 1315 of file qrhigles2_p.h.

◆ requestedFormat

QSurfaceFormat QRhiGles2::requestedFormat

Definition at line 1084 of file qrhigles2_p.h.

◆ rhiFlags

QRhi::Flags QRhiGles2::rhiFlags

Definition at line 1081 of file qrhigles2_p.h.

◆ supportedCompressedFormats

QSet<GLint> QRhiGles2::supportedCompressedFormats

Definition at line 1277 of file qrhigles2_p.h.

◆ supportedSampleCountList

QList<int> QRhiGles2::supportedSampleCountList
mutable

Definition at line 1278 of file qrhigles2_p.h.

◆ vao

uint QRhiGles2::vao = 0

Definition at line 1122 of file qrhigles2_p.h.

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


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