Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
 

Public Types

enum  ProgramCacheResult { ProgramCacheHit , ProgramCacheMiss , ProgramCacheError }
 

Public Member Functions

 QRhiGles2 (QRhiGles2InitParams *params, QRhiGles2NativeHandles *importDevice=nullptr)
 
bool create (QRhi::Flags flags) override
 
void destroy () override
 
QRhiGraphicsPipelinecreateGraphicsPipeline () override
 
QRhiComputePipelinecreateComputePipeline () override
 
QRhiShaderResourceBindingscreateShaderResourceBindings () override
 
QRhiBuffercreateBuffer (QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size) override
 
QRhiRenderBuffercreateRenderBuffer (QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) override
 
QRhiTexturecreateTexture (QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags) override
 
QRhiSamplercreateSampler (QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w) override
 
QRhiTextureRenderTargetcreateTextureRenderTarget (const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags) override
 
QRhiSwapChaincreateSwapChain () 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 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 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 QRhiNativeHandlesnativeHandles (QRhiCommandBuffer *cb) override
 
void beginExternal (QRhiCommandBuffer *cb) override
 
void endExternal (QRhiCommandBuffer *cb) override
 
double lastCompletedGpuTime (QRhiCommandBuffer *cb) override
 
QList< int > supportedSampleCounts () 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 QRhiNativeHandlesnativeHandles () override
 
QRhiDriverInfo driverInfo () const override
 
QRhiStats statistics () override
 
bool makeThreadLocalNativeContextCurrent () override
 
void releaseCachedResources () override
 
bool isDeviceLost () const override
 
QByteArray pipelineCacheData () override
 
void setPipelineCacheData (const QByteArray &data) override
 
bool ensureContext (QSurface *surface=nullptr) const
 
QSurfaceevaluateFallbackSurface () 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)
 
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)
 
QGles2RenderTargetDataenqueueBindFramebuffer (QRhiRenderTarget *rt, QGles2CommandBuffer *cbD, bool *wantsColorClear=nullptr, bool *wantsDsClear=nullptr)
 
void enqueueBarriersForPass (QGles2CommandBuffer *cbD)
 
QByteArray shaderSource (const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion)
 
bool compileShader (GLuint program, const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion)
 
bool linkProgram (GLuint program)
 
void registerUniformIfActive (const QShaderDescription::BlockVariable &var, const QByteArray &namePrefix, int binding, int baseOffset, GLuint program, QDuplicateTracker< int, 256 > *activeUniformLocations, QGles2UniformDescriptionVector *dst)
 
void gatherUniforms (GLuint program, const QShaderDescription::UniformBlock &ub, QDuplicateTracker< int, 256 > *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)
 
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 glGetQueryObjectui64v)(GLuint
 
quint64void (QOPENGLF_APIENTRYP glObjectLabel)(GLenum
 
quint64 const GLcharvoid (QOPENGLF_APIENTRYP glFramebufferTexture2DMultisampleEXT)(GLenum
 
 void (QOPENGLF_APIENTRYP glFramebufferTextureMultisampleMultiviewOVR)(GLenum
 
- Public Member Functions inherited from QRhiImplementation
virtual ~QRhiImplementation ()
 
void prepareForCreate (QRhi *rhi, QRhi::Implementation impl, QRhi::Flags flags)
 
bool isCompressedFormat (QRhiTexture::Format format) const
 
void compressedFormatInfo (QRhiTexture::Format format, const QSize &size, quint32 *bpl, quint32 *byteSize, QSize *blockDim) const
 
void 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)
 
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
 

Public Attributes

QRhi::Flags rhiFlags
 
QOpenGLContextctx = nullptr
 
bool importedContext = false
 
QSurfaceFormat requestedFormat
 
QSurfacefallbackSurface = nullptr
 
QPointer< QWindowmaybeWindow = nullptr
 
QOpenGLContextmaybeShareContext = nullptr
 
bool needsMakeCurrentDueToSwap = false
 
QOpenGLExtensionsf = 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
 
const GLvoid const GLvoid GLint = nullptr
 
 GLuint
 
quint64 GLuint
 
quint64 GLsizei
 
quint64 const GLchar GLenum
 
quint64 const GLchar GLuint
 
quint64 const GLchar GLint
 
quint64 const GLchar GLsizei = nullptr
 
uint vao = 0
 
struct QRhiGles2::Caps caps
 
QGles2SwapChaincurrentSwapChain = nullptr
 
QSet< GLintsupportedCompressedFormats
 
QList< int > supportedSampleCountList
 
QRhiGles2NativeHandles nativeHandlesStruct
 
QRhiDriverInfo driverInfoStruct
 
bool contextLost = false
 
QList< DeferredReleaseEntryreleaseQueue
 
struct QRhiGles2::OffscreenFrame ofr
 
QHash< QRhiShaderStage, uintm_shaderCache
 
QHash< QByteArray, PipelineCacheDatam_pipelineCache
 
- Public Attributes inherited from QRhiImplementation
QRhiq
 
bool debugMarkers = false
 
int currentFrameSlot = 0
 
bool inFrame = false
 

Additional Inherited Members

- Static Public Member Functions inherited from QRhiImplementation
static const QRhiShaderResourceBinding::DatashaderResourceBindingData (const QRhiShaderResourceBinding &binding)
 
static QRhiShaderResourceBinding::DatashaderResourceBindingData (QRhiShaderResourceBinding &binding)
 
static bool sortedBindingLessThan (const QRhiShaderResourceBinding &a, const QRhiShaderResourceBinding &b)
 
- Static Public Attributes inherited from QRhiImplementation
static const int MAX_SHADER_CACHE_ENTRIES = 128
 

Detailed Description

Definition at line 761 of file qrhigles2_p.h.

Member Enumeration Documentation

◆ ProgramCacheResult

Enumerator
ProgramCacheHit 
ProgramCacheMiss 
ProgramCacheError 

Definition at line 919 of file qrhigles2_p.h.

Constructor & Destructor Documentation

◆ QRhiGles2()

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

Definition at line 577 of file qrhigles2.cpp.

References fallbackSurface, importedContext, maybeShareContext, maybeWindow, qWarning, requestedFormat, and QOpenGLContext::shareContext().

+ Here is the call graph for this function:

Member Function Documentation

◆ beginComputePass()

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

Implements QRhiImplementation.

Definition at line 4697 of file qrhigles2.cpp.

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

+ Here is the call graph for this function:

◆ beginExternal()

◆ beginFrame()

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

Implements QRhiImplementation.

Definition at line 2111 of file qrhigles2.cpp.

References addBoundaryCommand(), QGles2CommandBuffer::Command::BeginFrame, contextLost, currentSwapChain, ensureContext(), executeDeferredReleases(), QRhi::FrameOpDeviceLost, QRhi::FrameOpError, QRhi::FrameOpSuccess, GLuint, and QRHI_RES.

+ Here is the call graph for this function:

◆ beginOffscreenFrame()

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

Implements QRhiImplementation.

Definition at line 2174 of file qrhigles2.cpp.

References addBoundaryCommand(), QGles2CommandBuffer::Command::BeginFrame, caps, cb, contextLost, QRhi::EnableTimestamps, ensureContext(), executeDeferredReleases(), QRhi::FrameOpDeviceLost, QRhi::FrameOpError, QRhi::FrameOpSuccess, ofr, and rhiFlags.

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

Definition at line 3981 of file qrhigles2.cpp.

References caps, GL_COMPARE_REF_TO_TEXTURE, GL_TEXTURE0, GL_TEXTURE_COMPARE_FUNC, GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_WRAP_R, GLint, and QGles2CommandBuffer::textureUnitState.

Referenced by bindShaderResources().

+ Here is the caller graph for this function:

◆ bindShaderResources()

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

Definition at line 4034 of file qrhigles2.cpp.

References bindCombinedSampler(), QShaderDescription::Bool, QShaderDescription::Bool2, QShaderDescription::Bool3, QShaderDescription::Bool4, QRhiShaderResourceBinding::BufferLoad, QRhiShaderResourceBinding::BufferLoadStore, QRhiShaderResourceBinding::BufferStore, QRhiTexture::CubeMap, QShaderDescription::Float, GL_READ_ONLY, GL_READ_WRITE, GL_SHADER_STORAGE_BUFFER, GL_TEXTURE0, GL_WRITE_ONLY, GLenum, GLuint, i, QRhiShaderResourceBinding::ImageLoad, QRhiShaderResourceBinding::ImageLoadStore, QRhiShaderResourceBinding::ImageStore, QShaderDescription::Int, QShaderDescription::Int2, QShaderDescription::Int3, QShaderDescription::Int4, j, QShaderDescription::Mat2, QShaderDescription::Mat3, QShaderDescription::Mat4, QGles2UniformState::MAX_TRACKED_LOCATION, Q_ASSERT, qMax(), QRHI_RES, qrhi_std140_to_packed(), qWarning, QRhiShaderResourceBinding::SampledTexture, QRhiShaderResourceBinding::Sampler, QRhiImplementation::shaderResourceBindingData(), QRhiBuffer::StorageBuffer, QRhiShaderResourceBinding::Texture, QShaderDescription::Uint, QShaderDescription::Uint2, QShaderDescription::Uint3, QShaderDescription::Uint4, QRhiShaderResourceBinding::UniformBuffer, QRhiTexture::UsedWithLoadStore, QShaderDescription::Vec2, QShaderDescription::Vec3, and QShaderDescription::Vec4.

Referenced by executeCommandBuffer().

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

◆ clipSpaceCorrMatrix()

QMatrix4x4 QRhiGles2::clipSpaceCorrMatrix ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1210 of file qrhigles2.cpp.

◆ compileShader()

bool QRhiGles2::compileShader ( GLuint program,
const QRhiShaderStage & shaderStage,
QShaderVersion * shaderVersion )

◆ create()

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

Implements QRhiImplementation.

Definition at line 705 of file qrhigles2.cpp.

References QRhiTexture::ASTC_10x10, QRhiTexture::ASTC_10x5, QRhiTexture::ASTC_10x8, QRhiTexture::ASTC_12x10, QRhiTexture::ASTC_12x12, QRhiTexture::ASTC_4x4, QRhiTexture::ASTC_5x4, QRhiTexture::ASTC_5x5, QRhiTexture::ASTC_6x5, QRhiTexture::ASTC_6x6, QRhiTexture::ASTC_8x5, QRhiTexture::ASTC_8x6, QRhiTexture::ASTC_8x8, QOpenGLExtensions::ASTCTextureCompression, QRhiTexture::BC1, QRhiTexture::BC2, QRhiTexture::BC3, QOpenGLExtensions::BGRATextureFormat, caps, contextLost, QSurfaceFormat::CoreProfile, ctx, QOpenGLExtensions::DDSTextureCompression, QOpenGLExtensions::Depth24, QRhiDriverInfo::deviceName, driverInfoStruct, QOpenGLExtensions::ElementIndexUint, ensureContext(), QRhiTexture::ETC2_RGB8, QRhiTexture::ETC2_RGB8A1, QRhiTexture::ETC2_RGBA8, QOpenGLExtensions::ETC2TextureCompression, fallbackSurface, QOpenGLExtensions::FramebufferBlit, QOpenGLExtensions::FramebufferMultisample, GL_COMPRESSED_TEXTURE_FORMATS, GL_MAX_ARRAY_TEXTURE_LAYERS, GL_MAX_COMPUTE_WORK_GROUP_COUNT, GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS, GL_MAX_COMPUTE_WORK_GROUP_SIZE, GL_MAX_DRAW_BUFFERS, GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, GL_MAX_FRAGMENT_UNIFORM_VECTORS, GL_MAX_SAMPLES, GL_MAX_VARYING_COMPONENTS, GL_MAX_VARYING_FLOATS, GL_MAX_VARYING_VECTORS, GL_MAX_VERTEX_ATTRIBS, GL_MAX_VERTEX_OUTPUT_COMPONENTS, GL_MAX_VERTEX_UNIFORM_COMPONENTS, GL_MAX_VERTEX_UNIFORM_VECTORS, GL_NUM_COMPRESSED_TEXTURE_FORMATS, GL_NUM_PROGRAM_BINARY_FORMATS, GL_POINT_SPRITE, GL_PRIMITIVE_RESTART_FIXED_INDEX, GL_TEXTURE_CUBE_MAP_SEAMLESS, GL_VERTEX_PROGRAM_POINT_SIZE, GLenum, GLint, GLsizei, GLuint, QOpenGLExtensions::HalfFloatVertex, importedContext, QSet< T >::insert(), QOpenGLExtensions::MapBufferRange, maybeShareContext, maybeWindow, QOpenGLExtensions::MultiView, QOpenGLExtensions::MultiViewExtended, nativeHandlesStruct, QOpenGLFunctions::NPOTTextureRepeat, QOpenGLFunctions::NPOTTextures, QSurfaceFormat::OpenGLES, QOpenGLExtensions::PackedDepthStencil, Q_ASSERT, QByteArray(), QByteArrayLiteral, qCDebug, qMax(), qMin(), QOPENGLF_APIENTRYP, qt_gl_global_share_context(), qWarning, renderer, requestedFormat, rhiFlags, QOpenGLContext::screen(), QOpenGLContext::setFormat(), QOpenGLExtensions::Sized16Formats, QOpenGLExtensions::Sized8Formats, QRhiTexture::sRGB, QOpenGLExtensions::StandardDerivatives, supportedCompressedFormats, QOpenGLFunctions::TextureRGFormats, and toGlCompressedTextureFormat().

+ 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 1183 of file qrhigles2.cpp.

◆ createComputePipeline()

QRhiComputePipeline * QRhiGles2::createComputePipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1718 of file qrhigles2.cpp.

◆ createGraphicsPipeline()

QRhiGraphicsPipeline * QRhiGles2::createGraphicsPipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1708 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 1681 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 1695 of file qrhigles2.cpp.

◆ createShaderResourceBindings()

QRhiShaderResourceBindings * QRhiGles2::createShaderResourceBindings ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1713 of file qrhigles2.cpp.

◆ createSwapChain()

QRhiSwapChain * QRhiGles2::createSwapChain ( )
overridevirtual

Implements QRhiImplementation.

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

◆ createTextureRenderTarget()

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

Implements QRhiImplementation.

Definition at line 1702 of file qrhigles2.cpp.

◆ debugMarkBegin()

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

Implements QRhiImplementation.

Definition at line 2006 of file qrhigles2.cpp.

References cb, QRhiImplementation::debugMarkers, and Q_UNUSED.

◆ debugMarkEnd()

void QRhiGles2::debugMarkEnd ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2015 of file qrhigles2.cpp.

References cb, QRhiImplementation::debugMarkers, and Q_UNUSED.

◆ debugMarkMsg()

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

Implements QRhiImplementation.

Definition at line 2023 of file qrhigles2.cpp.

References cb, QRhiImplementation::debugMarkers, and Q_UNUSED.

◆ destroy()

void QRhiGles2::destroy ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1108 of file qrhigles2.cpp.

References QHash< Key, T >::clear(), ctx, ensureContext(), executeDeferredReleases(), importedContext, m_shaderCache, ofr, and vao.

+ Here is the call graph for this function:

◆ dispatch()

◆ draw()

◆ drawIndexed()

◆ driverInfo()

QRhiDriverInfo QRhiGles2::driverInfo ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1512 of file qrhigles2.cpp.

References driverInfoStruct.

◆ endComputePass()

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

Implements QRhiImplementation.

Definition at line 4714 of file qrhigles2.cpp.

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

+ Here is the call graph for this function:

◆ endExternal()

void QRhiGles2::endExternal ( QRhiCommandBuffer * cb)
overridevirtual

◆ endFrame()

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

Implements QRhiImplementation.

Definition at line 2139 of file qrhigles2.cpp.

References addBoundaryCommand(), contextLost, currentSwapChain, QGles2CommandBuffer::Command::EndFrame, ensureContext(), executeCommandBuffer(), QRhi::FrameOpDeviceLost, QRhi::FrameOpError, QRhi::FrameOpSuccess, GLuint, needsMakeCurrentDueToSwap, Q_ASSERT, QRHI_RES, QRhi::SkipPresent, 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 2195 of file qrhigles2.cpp.

References addBoundaryCommand(), contextLost, QGles2CommandBuffer::Command::EndFrame, ensureContext(), executeCommandBuffer(), QRhi::FrameOpDeviceLost, QRhi::FrameOpError, QRhi::FrameOpSuccess, GL_QUERY_RESULT, ofr, Q_ASSERT, and Q_UNUSED.

+ Here is the call graph for this function:

◆ endPass()

◆ enqueueBarriersForPass()

void QRhiGles2::enqueueBarriersForPass ( QGles2CommandBuffer * cbD)

Definition at line 4500 of file qrhigles2.cpp.

References QVarLengthArray< T, Prealloc >::append(), QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BarriersForPass, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentPassResTrackerIndex, QGles2CommandBuffer::passResTrackers, and QVLABaseBase::size().

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

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

◆ enqueueBindFramebuffer()

◆ enqueueResourceUpdates()

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

Definition at line 2466 of file qrhigles2.cpp.

References QGles2Texture::AccessFramebuffer, QGles2Texture::AccessRead, QGles2Buffer::AccessUpdate, QGles2Texture::AccessUpdate, QGles2CommandBuffer::Command::args, QRhiResourceUpdateBatchPrivate::BufferOp::buf, QGles2CommandBuffer::Command::BufferSubData, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QRhiReadbackResult::completed, QRhiBufferData::constData(), QRhiResourceUpdateBatchPrivate::TextureOp::Copy, QGles2CommandBuffer::Command::CopyTex, QRhiTexture::CubeMap, QByteArray::data(), QRhiReadbackResult::data, QRhiResourceUpdateBatchPrivate::BufferOp::data, QRhiResourceUpdateBatchPrivate::TextureOp::desc, QRhiTextureCopyDescription::destinationLayer(), QRhiTextureCopyDescription::destinationLevel(), QRhiTextureCopyDescription::destinationTopLeft(), QRhiResourceUpdateBatchPrivate::TextureOp::dst, QRhiBuffer::Dynamic, QRhiResourceUpdateBatchPrivate::BufferOp::DynamicUpdate, enqueueSubresUpload(), QGles2CommandBuffer::Command::GenMip, QRhiResourceUpdateBatchPrivate::TextureOp::GenMips, QRhiResourceUpdateBatchPrivate::get(), QGles2CommandBuffer::Command::GetBufferSubData, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GLenum, QSize::isEmpty(), QRhiReadbackDescription::layer(), QRhiReadbackDescription::level(), QRhi::MAX_MIP_LEVELS, QRhiResourceUpdateBatchPrivate::BufferOp::offset, QRhiTexture::OneDimensional, QRhiTextureCopyDescription::pixelSize(), Q_ASSERT, QRHI_RES, QRhiResourceUpdateBatchPrivate::TextureOp::rb, QRhiResourceUpdateBatchPrivate::BufferOp::Read, QRhiResourceUpdateBatchPrivate::TextureOp::Read, QGles2CommandBuffer::Command::ReadPixels, QRhiResourceUpdateBatchPrivate::BufferOp::readSize, QByteArray::resize(), QRhiResourceUpdateBatchPrivate::BufferOp::result, QRhiResourceUpdateBatchPrivate::TextureOp::result, QGles2CommandBuffer::retainBufferData(), QRhiBufferData::size(), QVLABaseBase::size(), QRhiTextureCopyDescription::sourceLayer(), QRhiTextureCopyDescription::sourceLevel(), QRhiTextureCopyDescription::sourceTopLeft(), sp, QRhiResourceUpdateBatchPrivate::TextureOp::src, QRhiResourceUpdateBatchPrivate::BufferOp::StaticUpload, QRhiResourceUpdateBatchPrivate::TextureOp::subresDesc, QRhiReadbackDescription::texture(), QRhiTexture::TextureArray, QRhiTexture::ThreeDimensional, trackedBufferBarrier(), trackedImageBarrier(), QRhiResourceUpdateBatchPrivate::BufferOp::type, QRhiResourceUpdateBatchPrivate::TextureOp::type, QRhiBuffer::UniformBuffer, 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 2330 of file qrhigles2.cpp.

References QGles2Texture::AccessUpdate, QGles2CommandBuffer::Command::args, caps, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QRhiImplementation::compressedFormatInfo(), QGles2CommandBuffer::Command::CompressedImage, QGles2CommandBuffer::Command::CompressedSubImage, QRhiTexture::CubeMap, QRhiTextureSubresourceUploadDescription::data(), QRhiTextureSubresourceUploadDescription::dataStride(), QRhiTextureSubresourceUploadDescription::destinationTopLeft(), GL_TEXTURE_CUBE_MAP_POSITIVE_X, GLenum, QRhiTextureSubresourceUploadDescription::image(), QRhiImplementation::isCompressedFormat(), isCubeMap(), QByteArray::isEmpty(), QSize::isEmpty(), QImage::isNull(), QPoint::isNull(), QRhiTexture::OneDimensional, qMax(), qWarning, QGles2CommandBuffer::retainData(), QGles2CommandBuffer::retainImage(), QByteArray::size(), QRhiTextureSubresourceUploadDescription::sourceSize(), QRhiTextureSubresourceUploadDescription::sourceTopLeft(), sp, QGles2CommandBuffer::Command::SubImage, QRhiTexture::TextureArray, QRhiImplementation::textureFormatInfo(), QRhiTexture::ThreeDimensional, trackedImageBarrier(), and QRhiTexture::UsedAsCompressedAtlas.

Referenced by enqueueResourceUpdates().

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

◆ ensureContext()

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

Definition at line 622 of file qrhigles2.cpp.

References contextLost, currentSurfaceForCurrentContext(), evaluateFallbackSurface(), needsMakeCurrentDueToSwap, qWarning, QSurface::surfaceClass(), QSurface::surfaceHandle(), and QSurface::Window.

Referenced by beginExternal(), beginFrame(), beginOffscreenFrame(), create(), destroy(), endFrame(), endOffscreenFrame(), finish(), makeThreadLocalNativeContextCurrent(), and releaseCachedResources().

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

◆ evaluateFallbackSurface()

QSurface * QRhiGles2::evaluateFallbackSurface ( ) const

Definition at line 610 of file qrhigles2.cpp.

References fallbackSurface, and maybeWindow.

Referenced by ensureContext().

+ Here is the caller graph for this function:

◆ executeBindGraphicsPipeline()

void QRhiGles2::executeBindGraphicsPipeline ( QGles2CommandBuffer * cbD,
QGles2GraphicsPipeline * psD )

Definition at line 3779 of file qrhigles2.cpp.

References QRhiGraphicsPipeline::A, QGles2CommandBuffer::GraphicsPassState::ColorMask::a, QRhiGraphicsPipeline::B, QGles2CommandBuffer::GraphicsPassState::ColorMask::b, QRhiGraphicsPipeline::TargetBlend::colorWrite, QRhiGraphicsPipeline::TargetBlend::dstAlpha, QGles2CommandBuffer::GraphicsPassState::Blend::dstAlpha, QRhiGraphicsPipeline::TargetBlend::dstColor, QGles2CommandBuffer::GraphicsPassState::Blend::dstColor, QRhiGraphicsPipeline::TargetBlend::enable, QGles2CommandBuffer::GraphicsPassState::StencilFace::failOp, forceUpdate(), QGles2CommandBuffer::GraphicsPassState::StencilFace::func, QRhiGraphicsPipeline::G, QGles2CommandBuffer::GraphicsPassState::ColorMask::g, GL_PATCH_VERTICES, GLenum, GLuint, QGles2CommandBuffer::graphicsPassState, QRhiGraphicsPipeline::Lines, QRhiGraphicsPipeline::LineStrip, QRhiGraphicsPipeline::None, QRhiGraphicsPipeline::TargetBlend::opAlpha, QGles2CommandBuffer::GraphicsPassState::Blend::opAlpha, QRhiGraphicsPipeline::TargetBlend::opColor, QGles2CommandBuffer::GraphicsPassState::Blend::opColor, QRhiGraphicsPipeline::Patches, qFuzzyIsNull(), qMax(), QRhiGraphicsPipeline::R, QGles2CommandBuffer::GraphicsPassState::ColorMask::r, QRhiGraphicsPipeline::TargetBlend::srcAlpha, QGles2CommandBuffer::GraphicsPassState::Blend::srcAlpha, QRhiGraphicsPipeline::TargetBlend::srcColor, QGles2CommandBuffer::GraphicsPassState::Blend::srcColor, state, toGlBlendFactor(), toGlBlendOp(), toGlCompareOp(), toGlCullMode(), toGlFrontFace(), toGlPolygonMode(), toGlStencilOp(), QRhiGraphicsPipeline::UsesScissor, QGles2CommandBuffer::GraphicsPassState::StencilFace::zfailOp, and QGles2CommandBuffer::GraphicsPassState::StencilFace::zpassOp.

Referenced by executeCommandBuffer().

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

◆ executeCommandBuffer()

void QRhiGles2::executeCommandBuffer ( QRhiCommandBuffer * cb)

Definition at line 2970 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::Barrier, barriersForBuffer(), QGles2CommandBuffer::Command::BarriersForPass, barriersForTexture(), QGles2CommandBuffer::Command::BeginFrame, QGles2CommandBuffer::Command::BindComputePipeline, QGles2CommandBuffer::Command::BindFramebuffer, QGles2CommandBuffer::Command::BindGraphicsPipeline, QGles2CommandBuffer::Command::BindIndexBuffer, QGles2CommandBuffer::Command::BindShaderResources, bindShaderResources(), QGles2CommandBuffer::Command::BindVertexBuffer, bindVertexIndexBufferWithStateReset(), QGles2CommandBuffer::Command::BlendConstants, QGles2CommandBuffer::Command::BlitFromRenderbuffer, QGles2CommandBuffer::Command::BlitFromTexture, bufferAccessIsWrite(), QGles2CommandBuffer::Command::BufferSubData, caps, cb, QGles2CommandBuffer::Command::Clear, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::Command::CompressedImage, QGles2CommandBuffer::Command::CompressedSubImage, QGles2CommandBuffer::Command::CopyTex, currentSwapChain, QGles2CommandBuffer::Command::Dispatch, QGles2CommandBuffer::Command::Draw, QGles2CommandBuffer::Command::DrawIndexed, QGles2CommandBuffer::Command::EndFrame, executeBindGraphicsPipeline(), QRhiVertexInputAttribute::Float, QRhiVertexInputAttribute::Float2, QRhiVertexInputAttribute::Float3, QRhiVertexInputAttribute::Float4, QGles2CommandBuffer::Command::GenMip, QGles2CommandBuffer::Command::GetBufferSubData, GL_ARRAY_BUFFER, GL_BACK_LEFT, GL_BACK_RIGHT, GL_COLOR_ATTACHMENT0, GL_DEPTH_ATTACHMENT, GL_DRAW_FRAMEBUFFER, GL_ELEMENT_ARRAY_BUFFER, GL_FLOAT, GL_FRAMEBUFFER, GL_FRAMEBUFFER_SRGB, GL_HALF_FLOAT, GL_MAP_READ_BIT, GL_READ_FRAMEBUFFER, GL_RED, GL_RENDERBUFFER, GL_RGBA, GL_STENCIL_ATTACHMENT, GL_TEXTURE_1D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_2D_ARRAY, GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_3D, GL_TIMESTAMP, GL_UNPACK_ROW_LENGTH, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT_2_10_10_10_REV, GLbitfield(), GLenum, GLint, GLsizei, GLuint, QGles2CommandBuffer::graphicsPassState, QRhiVertexInputAttribute::Half, QRhiVertexInputAttribute::Half2, QRhiVertexInputAttribute::Half3, QRhiVertexInputAttribute::Half4, i, QGles2CommandBuffer::Command::InvalidateFramebuffer, isFeatureSupported(), it, normalize(), QGles2CommandBuffer::passResTrackers, QRhiVertexInputBinding::PerInstance, QGles2SwapChain::pixelSize, Q_LIKELY, Q_UNLIKELY, qMax(), QRHI_RES, qWarning, QRhiTexture::R16F, QRhiTexture::R32F, QRhiTexture::R8, QGles2CommandBuffer::Command::ReadPixels, QRhiTexture::RED_OR_ALPHA8, QRhi::RedOrAlpha8IsRed, QGles2CommandBuffer::Command::ResetFrame, QByteArray::resize(), QRhiTexture::RGB10A2, QRhiTexture::RGBA16F, QRhiTexture::RGBA32F, QRhiTexture::RGBA8, QRhiSwapChain::RightBuffer, QGles2CommandBuffer::Command::Scissor, QRhiVertexInputAttribute::SInt, QRhiVertexInputAttribute::SInt2, QRhiVertexInputAttribute::SInt3, QRhiVertexInputAttribute::SInt4, QRhiVertexInputAttribute::SShort, QRhiVertexInputAttribute::SShort2, QRhiVertexInputAttribute::SShort3, QRhiVertexInputAttribute::SShort4, state, QGles2CommandBuffer::Command::StencilRef, QGles2CommandBuffer::Command::SubImage, textureAccessIsWrite(), toGlCompareOp(), CommandBufferExecTrackedState::TRACKED_ATTRIB_COUNT, QRhiVertexInputAttribute::UInt, QRhiVertexInputAttribute::UInt2, QRhiVertexInputAttribute::UInt3, QRhiVertexInputAttribute::UInt4, QRhiVertexInputAttribute::UNormByte, QRhiVertexInputAttribute::UNormByte2, QRhiVertexInputAttribute::UNormByte4, QRhiVertexInputAttribute::UShort, QRhiVertexInputAttribute::UShort2, QRhiVertexInputAttribute::UShort3, QRhiVertexInputAttribute::UShort4, vao, QGles2CommandBuffer::Command::Viewport, and QSize::width().

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

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

◆ executeDeferredReleases()

◆ finish()

QRhi::FrameOpResult QRhiGles2::finish ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2227 of file qrhigles2.cpp.

References QGles2SwapChain::cb, contextLost, currentSwapChain, ensureContext(), executeCommandBuffer(), QRhi::FrameOpDeviceLost, QRhi::FrameOpError, QRhi::FrameOpSuccess, QRhiImplementation::inFrame, QGles2CommandBuffer::NoPass, ofr, Q_ASSERT, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::resetCommands(), and QGles2SwapChain::surface.

+ Here is the call graph for this function:

◆ gatherGeneratedSamplers()

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

Definition at line 5076 of file qrhigles2.cpp.

References QGles2SamplerDescription::glslLocation.

◆ gatherSamplers()

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

Definition at line 5062 of file qrhigles2.cpp.

References QGles2SamplerDescription::glslLocation.

◆ gatherUniforms()

void QRhiGles2::gatherUniforms ( GLuint program,
const QShaderDescription::UniformBlock & ub,
QDuplicateTracker< int, 256 > * activeUniformLocations,
QGles2UniformDescriptionVector * dst )

Definition at line 5025 of file qrhigles2.cpp.

References QByteArray::number(), qWarning, registerUniformIfActive(), and QShaderDescription::Struct.

+ Here is the call graph for this function:

◆ isClipDepthZeroToOne()

bool QRhiGles2::isClipDepthZeroToOne ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1205 of file qrhigles2.cpp.

◆ isDeviceLost()

bool QRhiGles2::isDeviceLost ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1545 of file qrhigles2.cpp.

References contextLost.

◆ isFeatureSupported()

◆ isProgramBinaryDiskCacheEnabled()

bool QRhiGles2::isProgramBinaryDiskCacheEnabled ( ) const

Definition at line 5113 of file qrhigles2.cpp.

References QOpenGLProgramBinarySupportCheckWrapper::get(), and QOpenGLProgramBinarySupportCheck::isSupported().

Referenced by tryLoadFromDiskOrPipelineCache(), and trySaveToDiskCache().

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

◆ isTextureFormatSupported()

bool QRhiGles2::isTextureFormatSupported ( QRhiTexture::Format format,
QRhiTexture::Flags flags ) const
overridevirtual

◆ isYUpInFramebuffer()

bool QRhiGles2::isYUpInFramebuffer ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1195 of file qrhigles2.cpp.

◆ isYUpInNDC()

bool QRhiGles2::isYUpInNDC ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1200 of file qrhigles2.cpp.

◆ lastCompletedGpuTime()

double QRhiGles2::lastCompletedGpuTime ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2105 of file qrhigles2.cpp.

References cb, QGles2CommandBuffer::lastGpuTime, and QRHI_RES.

◆ linkProgram()

bool QRhiGles2::linkProgram ( GLuint program)

Definition at line 4969 of file qrhigles2.cpp.

References QByteArray::constData(), QByteArray::data(), GL_INFO_LOG_LENGTH, GL_LINK_STATUS, GLint, GLsizei, qWarning, and QByteArray::resize().

+ Here is the call graph for this function:

◆ makeThreadLocalNativeContextCurrent()

bool QRhiGles2::makeThreadLocalNativeContextCurrent ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1524 of file qrhigles2.cpp.

References currentSwapChain, ensureContext(), QRhiImplementation::inFrame, ofr, and QGles2SwapChain::surface.

+ Here is the call graph for this function:

◆ nativeHandles() [1/2]

const QRhiNativeHandles * QRhiGles2::nativeHandles ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1507 of file qrhigles2.cpp.

References nativeHandlesStruct.

◆ nativeHandles() [2/2]

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

Implements QRhiImplementation.

Definition at line 2032 of file qrhigles2.cpp.

References cb, and Q_UNUSED.

◆ pipelineCacheData()

QByteArray QRhiGles2::pipelineCacheData ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1559 of file qrhigles2.cpp.

References QByteArray::constData(), QRhiDriverInfo::deviceName, driverInfoStruct, header(), i, it, m_pipelineCache, QRhiImplementation::pipelineCacheRhiId(), Q_ASSERT, Q_STATIC_ASSERT, QByteArray(), qMin(), QSet< T >::size(), QByteArray::size(), and Qt::Uninitialized.

+ Here is the call graph for this function:

◆ registerUniformIfActive()

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

Definition at line 4989 of file qrhigles2.cpp.

References QVariant::constData(), qWarning, QShaderDescription::Struct, QGles2UniformDescription::type, and var.

Referenced by gatherUniforms().

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

◆ releaseCachedResources()

void QRhiGles2::releaseCachedResources ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1532 of file qrhigles2.cpp.

References QHash< Key, T >::clear(), ensureContext(), m_pipelineCache, and m_shaderCache.

+ Here is the call graph for this function:

◆ resourceLimit()

◆ resourceUpdate()

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

Implements QRhiImplementation.

Definition at line 4420 of file qrhigles2.cpp.

References cb, enqueueResourceUpdates(), QGles2CommandBuffer::NoPass, Q_ASSERT, and QRHI_RES.

+ Here is the call graph for this function:

◆ sanityCheckVertexFragmentInterface()

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

Definition at line 5090 of file qrhigles2.cpp.

References qWarning.

◆ setBlendConstants()

◆ setComputePipeline()

◆ setGraphicsPipeline()

◆ setPipelineCacheData()

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

Implements QRhiImplementation.

Definition at line 1614 of file qrhigles2.cpp.

References QByteArray::constData(), QRhiDriverInfo::deviceName, driverInfoStruct, header(), headerSize, i, m_pipelineCache, QRhiImplementation::pipelineCacheRhiId(), qCDebug, qMin(), QByteArray::size(), and Qt::Uninitialized.

+ Here is the call graph for this function:

◆ setScissor()

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

Implements QRhiImplementation.

Definition at line 1933 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::args, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::RenderPass, QRhiScissor::scissor(), and QGles2CommandBuffer::Command::Scissor.

+ Here is the call graph for this function:

◆ setShaderResources()

void QRhiGles2::setShaderResources ( QRhiCommandBuffer * cb,
QRhiShaderResourceBindings * srb,
int dynamicOffsetCount,
const QRhiCommandBuffer::DynamicOffset * dynamicOffsets )
overridevirtual

Implements QRhiImplementation.

Definition at line 1741 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BindShaderResources, QRhiShaderResourceBinding::BufferLoad, QRhiShaderResourceBinding::BufferLoadStore, QRhiShaderResourceBinding::BufferStore, QRhiPassResourceTracker::BufStorageLoad, QRhiPassResourceTracker::BufStorageLoadStore, QRhiPassResourceTracker::BufStorageStore, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentComputePipeline, QGles2CommandBuffer::currentComputeSrb, QGles2CommandBuffer::currentGraphicsPipeline, QGles2CommandBuffer::currentGraphicsSrb, QGles2CommandBuffer::currentPassResTrackerIndex, QGles2CommandBuffer::currentSrbGeneration, i, QRhiShaderResourceBinding::ImageLoad, QRhiShaderResourceBinding::ImageLoadStore, QRhiShaderResourceBinding::ImageStore, QGles2CommandBuffer::MAX_DYNAMIC_OFFSET_COUNT, QGles2CommandBuffer::NoPass, QGles2CommandBuffer::passNeedsResourceTracking, QGles2CommandBuffer::passResTrackers, Q_ASSERT, QRHI_RES, qWarning, QGles2CommandBuffer::recordingPass, QRhiShaderResourceBinding::SampledTexture, QRhiImplementation::shaderResourceBindingData(), QRhiPassResourceTracker::TexSample, QRhiPassResourceTracker::TexStorageLoad, QRhiPassResourceTracker::TexStorageLoadStore, QRhiPassResourceTracker::TexStorageStore, QRhiShaderResourceBinding::Texture, QRhiPassResourceTracker::toPassTrackerBufferStage(), QRhiPassResourceTracker::toPassTrackerTextureStage(), trackedRegisterBuffer(), trackedRegisterTexture(), and QRhiShaderResourceBinding::UniformBuffer.

+ Here is the call graph for this function:

◆ setStencilRef()

◆ setVertexInput()

◆ setViewport()

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

Implements QRhiImplementation.

Definition at line 1913 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::args, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::RenderPass, QGles2CommandBuffer::Command::Viewport, and viewport().

+ Here is the call graph for this function:

◆ shaderSource()

QByteArray QRhiGles2::shaderSource ( const QRhiShaderStage & shaderStage,
QShaderVersion * shaderVersion )

Definition at line 4859 of file qrhigles2.cpp.

References caps, QShaderVersion::GlslEs, QShader::GlslShader, qWarning, QRhiShaderStage::shader(), and QRhiShaderStage::shaderVariant().

Referenced by compileShader(), and tryLoadFromDiskOrPipelineCache().

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

◆ statistics()

QRhiStats QRhiGles2::statistics ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1517 of file qrhigles2.cpp.

References QRhiStats::totalPipelineCreationTime, and QRhiImplementation::totalPipelineCreationTime().

+ Here is the call graph for this function:

◆ supportedSampleCounts()

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

Implements QRhiImplementation.

Definition at line 1168 of file qrhigles2.cpp.

References QList< T >::append(), caps, i, QList< T >::isEmpty(), and supportedSampleCountList.

+ Here is the call graph for this function:

◆ trackedBufferBarrier()

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

Definition at line 2288 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::Barrier, barriersForBuffer(), bufferAccessIsWrite(), QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::NoPass, Q_ASSERT, QGles2CommandBuffer::recordingPass, and QRhiBuffer::StorageBuffer.

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 2311 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::Barrier, barriersForTexture(), QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::NoPass, Q_ASSERT, QGles2CommandBuffer::recordingPass, textureAccessIsWrite(), and QRhiTexture::UsedWithLoadStore.

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 2916 of file qrhigles2.cpp.

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

Referenced by 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 2926 of file qrhigles2.cpp.

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

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

◆ trySaveToDiskCache()

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

Definition at line 5231 of file qrhigles2.cpp.

References cacheKey(), isProgramBinaryDiskCacheEnabled(), and qCDebug.

+ Here is the call graph for this function:

◆ trySaveToPipelineCache()

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

Definition at line 5243 of file qrhigles2.cpp.

References cacheKey(), caps, QByteArray::data(), GL_PROGRAM_BINARY_LENGTH, GLenum, GLint, m_pipelineCache, and Qt::Uninitialized.

+ Here is the call graph for this function:

◆ ubufAlignment()

int QRhiGles2::ubufAlignment ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 1188 of file qrhigles2.cpp.

◆ void() [1/14]

QRhiGles2::void ( QOPENGLF_APIENTRYP glCompressedTexImage1D)

◆ void() [2/14]

const GLvoid * QRhiGles2::void ( QOPENGLF_APIENTRYP glCompressedTexSubImage1D)

◆ void() [3/14]

const GLvoid * QRhiGles2::void ( QOPENGLF_APIENTRYP glCopyTexSubImage1D)

◆ void() [4/14]

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

◆ void() [5/14]

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

◆ void() [6/14]

QRhiGles2::void ( QOPENGLF_APIENTRYP glFramebufferTextureMultisampleMultiviewOVR)

◆ void() [7/14]

QRhiGles2::void ( QOPENGLF_APIENTRYP glFramebufferTextureMultiviewOVR)

◆ void() [8/14]

QRhiGles2::void ( QOPENGLF_APIENTRYP glGetQueryObjectui64v)

◆ void() [9/14]

quint64 * QRhiGles2::void ( QOPENGLF_APIENTRYP glObjectLabel)

◆ void() [10/14]

QRhiGles2::void ( QOPENGLF_APIENTRYP glPolygonMode)

◆ void() [11/14]

QRhiGles2::void ( QOPENGLF_APIENTRYP glQueryCounter)

◆ void() [12/14]

QRhiGles2::void ( QOPENGLF_APIENTRYP glTexImage1D)

◆ void() [13/14]

const void * QRhiGles2::void ( QOPENGLF_APIENTRYP glTexStorage1D)

◆ void() [14/14]

QRhiGles2::void ( QOPENGLF_APIENTRYP glTexSubImage1D)

Member Data Documentation

◆ caps

◆ contextLost

bool QRhiGles2::contextLost = false
mutable

◆ ctx

QOpenGLContext* QRhiGles2::ctx = nullptr

Definition at line 933 of file qrhigles2_p.h.

Referenced by create(), and destroy().

◆ currentSwapChain

◆ driverInfoStruct

QRhiDriverInfo QRhiGles2::driverInfoStruct

Definition at line 1085 of file qrhigles2_p.h.

Referenced by create(), driverInfo(), pipelineCacheData(), and setPipelineCacheData().

◆ f

QOpenGLExtensions* QRhiGles2::f = nullptr

Definition at line 940 of file qrhigles2_p.h.

◆ fallbackSurface

QSurface* QRhiGles2::fallbackSurface = nullptr

Definition at line 936 of file qrhigles2_p.h.

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

◆ GLenum [1/5]

◆ GLenum [2/5]

const void QRhiGles2::GLenum

Definition at line 944 of file qrhigles2_p.h.

◆ GLenum [3/5]

const GLvoid QRhiGles2::GLenum

Definition at line 951 of file qrhigles2_p.h.

◆ GLenum [4/5]

const GLvoid const GLvoid QRhiGles2::GLenum

Definition at line 953 of file qrhigles2_p.h.

◆ GLenum [5/5]

quint64 const GLchar QRhiGles2::GLenum

Definition at line 960 of file qrhigles2_p.h.

◆ GLint [1/5]

◆ GLint [2/5]

const void QRhiGles2::GLint

Definition at line 944 of file qrhigles2_p.h.

◆ GLint [3/5]

const GLvoid QRhiGles2::GLint

Definition at line 947 of file qrhigles2_p.h.

◆ GLint [4/5]

const GLvoid const GLvoid QRhiGles2::GLint = nullptr

Definition at line 954 of file qrhigles2_p.h.

◆ GLint [5/5]

quint64 const GLchar QRhiGles2::GLint

Definition at line 960 of file qrhigles2_p.h.

◆ GLsizei [1/5]

const GLvoid QRhiGles2::GLsizei = nullptr

Definition at line 942 of file qrhigles2_p.h.

Referenced by compileShader(), create(), executeCommandBuffer(), and linkProgram().

◆ GLsizei [2/5]

const void QRhiGles2::GLsizei = nullptr

Definition at line 944 of file qrhigles2_p.h.

◆ GLsizei [3/5]

const GLvoid QRhiGles2::GLsizei = nullptr

Definition at line 948 of file qrhigles2_p.h.

◆ GLsizei [4/5]

quint64 QRhiGles2::GLsizei

Definition at line 959 of file qrhigles2_p.h.

◆ GLsizei [5/5]

quint64 const GLchar QRhiGles2::GLsizei = nullptr

Definition at line 960 of file qrhigles2_p.h.

◆ GLuint [1/4]

const GLvoid const GLvoid QRhiGles2::GLuint

◆ GLuint [2/4]

QRhiGles2::GLuint

Definition at line 955 of file qrhigles2_p.h.

◆ GLuint [3/4]

quint64 QRhiGles2::GLuint

Definition at line 959 of file qrhigles2_p.h.

◆ GLuint [4/4]

quint64 const GLchar QRhiGles2::GLuint

Definition at line 960 of file qrhigles2_p.h.

◆ importedContext

bool QRhiGles2::importedContext = false

Definition at line 934 of file qrhigles2_p.h.

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

◆ m_pipelineCache

◆ m_shaderCache

QHash<QRhiShaderStage, uint> QRhiGles2::m_shaderCache

Definition at line 1126 of file qrhigles2_p.h.

Referenced by compileShader(), destroy(), and releaseCachedResources().

◆ maybeShareContext

QOpenGLContext* QRhiGles2::maybeShareContext = nullptr

Definition at line 938 of file qrhigles2_p.h.

Referenced by QRhiGles2(), and create().

◆ maybeWindow

QPointer<QWindow> QRhiGles2::maybeWindow = nullptr

Definition at line 937 of file qrhigles2_p.h.

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

◆ nativeHandlesStruct

QRhiGles2NativeHandles QRhiGles2::nativeHandlesStruct

Definition at line 1084 of file qrhigles2_p.h.

Referenced by create(), and nativeHandles().

◆ needsMakeCurrentDueToSwap

bool QRhiGles2::needsMakeCurrentDueToSwap = false
mutable

Definition at line 939 of file qrhigles2_p.h.

Referenced by endFrame(), and ensureContext().

◆ ofr

◆ releaseQueue

QList<DeferredReleaseEntry> QRhiGles2::releaseQueue

Definition at line 1117 of file qrhigles2_p.h.

Referenced by executeDeferredReleases().

◆ requestedFormat

QSurfaceFormat QRhiGles2::requestedFormat

Definition at line 935 of file qrhigles2_p.h.

Referenced by QRhiGles2(), and create().

◆ rhiFlags

QRhi::Flags QRhiGles2::rhiFlags

Definition at line 932 of file qrhigles2_p.h.

Referenced by beginOffscreenFrame(), and create().

◆ supportedCompressedFormats

QSet<GLint> QRhiGles2::supportedCompressedFormats

Definition at line 1082 of file qrhigles2_p.h.

Referenced by create(), and isTextureFormatSupported().

◆ supportedSampleCountList

QList<int> QRhiGles2::supportedSampleCountList
mutable

Definition at line 1083 of file qrhigles2_p.h.

Referenced by supportedSampleCounts().

◆ vao

uint QRhiGles2::vao = 0

Definition at line 962 of file qrhigles2_p.h.

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


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