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>.
|
#include <qrhigles2_p.h>
Classes | |
struct | Caps |
struct | DeferredReleaseEntry |
struct | OffscreenFrame |
struct | PipelineCacheData |
Public Types | |
enum | ProgramCacheResult { ProgramCacheHit , ProgramCacheMiss , ProgramCacheError } |
Additional Inherited Members | |
Static Public Member Functions inherited from QRhiImplementation | |
static const QRhiShaderResourceBinding::Data * | shaderResourceBindingData (const QRhiShaderResourceBinding &binding) |
static QRhiShaderResourceBinding::Data * | shaderResourceBindingData (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 |
Definition at line 761 of file qrhigles2_p.h.
Enumerator | |
---|---|
ProgramCacheHit | |
ProgramCacheMiss | |
ProgramCacheError |
Definition at line 919 of file qrhigles2_p.h.
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().
|
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().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2048 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::Barrier, caps, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::ComputePass, QGles2CommandBuffer::computePassState, currentSwapChain, ensureContext(), executeCommandBuffer(), GL_ALL_BARRIER_BITS, GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER, GL_SHADER_STORAGE_BUFFER, ofr, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::resetCommands(), QGles2SwapChain::surface, and vao.
|
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.
|
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.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 4509 of file qrhigles2.cpp.
References cb, QGles2CommandBuffer::Command::Clear, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentTarget, QRhiCommandBuffer::DoNotTrackResourcesForCompute, enqueueBarriersForPass(), enqueueBindFramebuffer(), enqueueResourceUpdates(), QGles2CommandBuffer::NoPass, QGles2CommandBuffer::passNeedsResourceTracking, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::RenderPass, QGles2CommandBuffer::resetCachedState(), QRhiResource::resourceType(), and QRhiResource::TextureRenderTarget.
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().
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().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1210 of file qrhigles2.cpp.
bool QRhiGles2::compileShader | ( | GLuint | program, |
const QRhiShaderStage & | shaderStage, | ||
QShaderVersion * | shaderVersion ) |
Definition at line 4925 of file qrhigles2.cpp.
References QHash< Key, T >::clear(), QByteArray::constData(), QHash< Key, T >::constEnd(), QHash< Key, T >::constFind(), QByteArray::data(), GL_COMPILE_STATUS, GL_INFO_LOG_LENGTH, GLint, GLsizei, GLuint, QHash< Key, T >::insert(), m_shaderCache, QRhiImplementation::MAX_SHADER_CACHE_ENTRIES, qWarning, QByteArray::resize(), shaderSource(), QHash< Key, T >::size(), toGlShaderType(), and QRhiShaderStage::type().
|
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().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1183 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1718 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1708 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1681 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1695 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1713 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1178 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1688 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1702 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2006 of file qrhigles2.cpp.
References cb, QRhiImplementation::debugMarkers, and Q_UNUSED.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2015 of file qrhigles2.cpp.
References cb, QRhiImplementation::debugMarkers, and Q_UNUSED.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2023 of file qrhigles2.cpp.
References cb, QRhiImplementation::debugMarkers, and Q_UNUSED.
|
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.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 4763 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::Barrier, QRhiShaderResourceBinding::BufferLoad, QRhiShaderResourceBinding::BufferLoadStore, QRhiShaderResourceBinding::BufferStore, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::ComputePass, QGles2CommandBuffer::computePassState, QGles2CommandBuffer::currentComputeSrb, QGles2CommandBuffer::Command::Dispatch, GL_SHADER_IMAGE_ACCESS_BARRIER_BIT, GL_SHADER_STORAGE_BARRIER_BIT, GLbitfield(), GLuint, i, QRhiShaderResourceBinding::ImageLoad, QRhiShaderResourceBinding::ImageLoadStore, QRhiShaderResourceBinding::ImageStore, it, Q_ASSERT, QRHI_RES, qrhigl_accumulateComputeResource(), QGles2CommandBuffer::ComputePassState::Read, QGles2CommandBuffer::recordingPass, QRhiImplementation::shaderResourceBindingData(), and QRhiResource::Texture.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1975 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentGraphicsPipeline, QGles2CommandBuffer::Command::Draw, instanceCount, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, and QGles2CommandBuffer::RenderPass.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1990 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentGraphicsPipeline, QGles2CommandBuffer::Command::DrawIndexed, instanceCount, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, and QGles2CommandBuffer::RenderPass.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1512 of file qrhigles2.cpp.
References driverInfoStruct.
|
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.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2084 of file qrhigles2.cpp.
References addBoundaryCommand(), cb, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentPassResTrackerIndex, QGles2CommandBuffer::currentTarget, enqueueBarriersForPass(), enqueueBindFramebuffer(), QGles2CommandBuffer::NoPass, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::resetCachedState(), and QGles2CommandBuffer::Command::ResetFrame.
|
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.
|
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.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 4556 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BlitFromRenderbuffer, QGles2CommandBuffer::Command::BlitFromTexture, caps, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QRhiTexture::CubeMap, QGles2CommandBuffer::currentTarget, QRhiTextureRenderTarget::DoNotStoreDepthStencilContents, enqueueResourceUpdates(), GL_DEPTH_ATTACHMENT, GL_DEPTH_STENCIL_ATTACHMENT, GL_STENCIL_ATTACHMENT, GL_TEXTURE_CUBE_MAP_POSITIVE_X, QGles2CommandBuffer::Command::InvalidateFramebuffer, it, QRhiColorAttachment::layer(), QRhiColorAttachment::level(), QRhiColorAttachment::multiViewCount(), QGles2CommandBuffer::NoPass, Q_ASSERT, QRHI_RES, qWarning, QGles2CommandBuffer::recordingPass, QRhiColorAttachment::renderBuffer(), QGles2CommandBuffer::RenderPass, QRhiColorAttachment::resolveLayer(), QRhiColorAttachment::resolveLevel(), QRhiColorAttachment::resolveTexture(), QRhiResource::resourceType(), QRhiColorAttachment::texture(), QRhiTexture::TextureArray, QRhiResource::TextureRenderTarget, and QRhiTexture::ThreeDimensional.
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().
QGles2RenderTargetData * QRhiGles2::enqueueBindFramebuffer | ( | QRhiRenderTarget * | rt, |
QGles2CommandBuffer * | cbD, | ||
bool * | wantsColorClear = nullptr, | ||
bool * | wantsDsClear = nullptr ) |
Definition at line 4427 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::BindFramebuffer, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentPassResTrackerIndex, it, QGles2CommandBuffer::passNeedsResourceTracking, QGles2CommandBuffer::passResTrackers, QRhiTextureRenderTarget::PreserveColorContents, QRhiTextureRenderTarget::PreserveDepthStencilContents, qEnvironmentVariableIntValue(), QRHI_RES, QRhiColorAttachment::resolveTexture(), QRhiResource::resourceType(), QRhiResource::SwapChainRenderTarget, QRhiPassResourceTracker::TexColorOutput, QRhiPassResourceTracker::TexColorOutputStage, QRhiPassResourceTracker::TexDepthOutput, QRhiPassResourceTracker::TexDepthOutputStage, QRhiColorAttachment::texture(), QRhiResource::TextureRenderTarget, and trackedRegisterTexture().
Referenced by beginPass(), and endExternal().
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().
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().
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().
QSurface * QRhiGles2::evaluateFallbackSurface | ( | ) | const |
Definition at line 610 of file qrhigles2.cpp.
References fallbackSurface, and maybeWindow.
Referenced by ensureContext().
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().
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().
void QRhiGles2::executeDeferredReleases | ( | ) |
Definition at line 1138 of file qrhigles2.cpp.
References QRhiGles2::DeferredReleaseEntry::Buffer, QRhiGles2::DeferredReleaseEntry::buffer, i, QRhiGles2::DeferredReleaseEntry::Pipeline, QRhiGles2::DeferredReleaseEntry::pipeline, releaseQueue, QRhiGles2::DeferredReleaseEntry::RenderBuffer, QRhiGles2::DeferredReleaseEntry::renderbuffer, QRhiGles2::DeferredReleaseEntry::Texture, QRhiGles2::DeferredReleaseEntry::texture, QRhiGles2::DeferredReleaseEntry::TextureRenderTarget, QRhiGles2::DeferredReleaseEntry::textureRenderTarget, and QRhiGles2::DeferredReleaseEntry::type.
Referenced by beginFrame(), beginOffscreenFrame(), and destroy().
|
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.
void QRhiGles2::gatherGeneratedSamplers | ( | GLuint | program, |
const QShader::SeparateToCombinedImageSamplerMapping & | mapping, | ||
QGles2SamplerDescriptionVector * | dst ) |
Definition at line 5076 of file qrhigles2.cpp.
References QGles2SamplerDescription::glslLocation.
void QRhiGles2::gatherSamplers | ( | GLuint | program, |
const QShaderDescription::InOutVariable & | v, | ||
QGles2SamplerDescriptionVector * | dst ) |
Definition at line 5062 of file qrhigles2.cpp.
References QGles2SamplerDescription::glslLocation.
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.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1205 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1545 of file qrhigles2.cpp.
References contextLost.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1375 of file qrhigles2.cpp.
References QRhi::BaseInstance, QRhi::BaseVertex, caps, QRhi::Compute, QRhi::CustomInstanceStepRate, QRhi::DebugMarkers, QRhi::ElementIndexUint, QRhi::GeometryShader, QRhi::HalfAttributes, QRhi::ImageDataStride, QRhi::Instancing, QRhi::IntAttributes, QRhi::MultisampleRenderBuffer, QRhi::MultisampleTexture, QRhi::MultiView, QRhi::NonDynamicUniformBuffers, QRhi::NonFillPolygonMode, QRhi::NonFourAlignedEffectiveIndexBufferOffset, QRhi::NPOTTextureRepeat, QRhi::OneDimensionalTextureMipmaps, QRhi::OneDimensionalTextures, QRhi::PipelineCacheDataLoadSave, QRhi::PrimitiveRestart, QRhi::ReadBackAnyTextureFormat, QRhi::ReadBackNonBaseMipLevel, QRhi::ReadBackNonUniformBuffer, QRhi::RedOrAlpha8IsRed, QRhi::RenderBufferImport, QRhi::RenderTo3DTextureSlice, QRhi::RenderToNonBaseMipLevel, QRhi::RenderToOneDimensionalTexture, QRhi::ResolveDepthStencil, QRhi::ScreenSpaceDerivatives, QRhi::Tessellation, QRhi::TexelFetch, QRhi::TextureArrayRange, QRhi::TextureArrays, QRhi::TextureViewFormat, QRhi::ThreeDimensionalTextureMipmaps, QRhi::ThreeDimensionalTextures, QRhi::Timestamps, QRhi::TriangleFanTopology, QRhi::VertexShaderPointSize, and QRhi::WideLines.
Referenced by executeCommandBuffer().
bool QRhiGles2::isProgramBinaryDiskCacheEnabled | ( | ) | const |
Definition at line 5113 of file qrhigles2.cpp.
References QOpenGLProgramBinarySupportCheckWrapper::get(), and QOpenGLProgramBinarySupportCheck::isSupported().
Referenced by tryLoadFromDiskOrPipelineCache(), and trySaveToDiskCache().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1326 of file qrhigles2.cpp.
References QRhiTexture::BGRA8, caps, QSet< T >::contains(), QRhiTexture::D16, QRhiTexture::D24, QRhiTexture::D24S8, QRhiTexture::D32F, GLint, QRhiImplementation::isCompressedFormat(), QRhiTexture::R16, QRhiTexture::R16F, QRhiTexture::R32F, QRhiTexture::R8, QRhiTexture::RG16, QRhiTexture::RG8, QRhiTexture::RGB10A2, QRhiTexture::RGBA16F, QRhiTexture::RGBA32F, supportedCompressedFormats, and toGlCompressedTextureFormat().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1195 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1200 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2105 of file qrhigles2.cpp.
References cb, QGles2CommandBuffer::lastGpuTime, and QRHI_RES.
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().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1524 of file qrhigles2.cpp.
References currentSwapChain, ensureContext(), QRhiImplementation::inFrame, ofr, and QGles2SwapChain::surface.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1507 of file qrhigles2.cpp.
References nativeHandlesStruct.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2032 of file qrhigles2.cpp.
|
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.
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().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1532 of file qrhigles2.cpp.
References QHash< Key, T >::clear(), ensureContext(), m_pipelineCache, and m_shaderCache.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1469 of file qrhigles2.cpp.
References caps, QRhi::FramesInFlight, QRhi::MaxAsyncReadbackFrames, QRhi::MaxColorAttachments, QRhi::MaxThreadGroupsPerDimension, QRhi::MaxThreadGroupX, QRhi::MaxThreadGroupY, QRhi::MaxThreadGroupZ, QRhi::MaxThreadsPerThreadGroup, QRhi::MaxUniformBufferRange, QRhi::MaxVertexInputs, QRhi::MaxVertexOutputs, QRhi::TextureArraySizeMax, QRhi::TextureSizeMax, and QRhi::TextureSizeMin.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 4420 of file qrhigles2.cpp.
References cb, enqueueResourceUpdates(), QGles2CommandBuffer::NoPass, Q_ASSERT, and QRHI_RES.
void QRhiGles2::sanityCheckVertexFragmentInterface | ( | const QShaderDescription & | vsDesc, |
const QShaderDescription & | fsDesc ) |
Definition at line 5090 of file qrhigles2.cpp.
References qWarning.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1951 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BlendConstants, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, and QGles2CommandBuffer::RenderPass.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 4725 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BindComputePipeline, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::ComputePass, QGles2CommandBuffer::currentComputePipeline, QGles2CommandBuffer::currentGraphicsPipeline, QGles2CommandBuffer::currentPipelineGeneration, Q_ASSERT, QRHI_RES, and QGles2CommandBuffer::recordingPass.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1723 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BindGraphicsPipeline, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentComputePipeline, QGles2CommandBuffer::currentGraphicsPipeline, QGles2CommandBuffer::currentPipelineGeneration, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, and QGles2CommandBuffer::RenderPass.
|
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.
|
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.
|
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.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1964 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentGraphicsPipeline, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::RenderPass, and QGles2CommandBuffer::Command::StencilRef.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1869 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BindIndexBuffer, QGles2CommandBuffer::Command::BindVertexBuffer, QRhiPassResourceTracker::BufIndexRead, QRhiPassResourceTracker::BufVertexInput, QRhiPassResourceTracker::BufVertexInputStage, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentGraphicsPipeline, QGles2CommandBuffer::currentPassResTrackerIndex, i, QRhiBuffer::IndexBuffer, QRhiCommandBuffer::IndexUInt16, QGles2CommandBuffer::passNeedsResourceTracking, QGles2CommandBuffer::passResTrackers, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::RenderPass, trackedRegisterBuffer(), and QRhiBuffer::VertexBuffer.
|
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().
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().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1517 of file qrhigles2.cpp.
References QRhiStats::totalPipelineCreationTime, and QRhiImplementation::totalPipelineCreationTime().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1168 of file qrhigles2.cpp.
References QList< T >::append(), caps, i, QList< T >::isEmpty(), and supportedSampleCountList.
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().
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().
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().
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().
QRhiGles2::ProgramCacheResult QRhiGles2::tryLoadFromDiskOrPipelineCache | ( | const QRhiShaderStage * | stages, |
int | stageCount, | ||
GLuint | program, | ||
const QVector< QShaderDescription::InOutVariable > & | inputVars, | ||
QByteArray * | cacheKey ) |
Definition at line 5141 of file qrhigles2.cpp.
References QOpenGLProgramBinaryCache::ProgramDesc::cacheKey(), cacheKey(), caps, QSet< T >::cbegin(), GL_CONTEXT_LOST, GL_LINK_STATUS, GLenum, GLint, i, isProgramBinaryDiskCacheEnabled(), it, load(), m_pipelineCache, QByteArray::number(), ProgramCacheError, ProgramCacheHit, ProgramCacheMiss, Q_ASSERT, QByteArrayLiteral, qCDebug, QOpenGLProgramBinaryCache::ProgramDesc::shaders, shaderSource(), QSet< T >::size(), toShaderStage(), QRhiShaderStage::type(), var, and QRhiShaderStage::Vertex.
void QRhiGles2::trySaveToDiskCache | ( | GLuint | program, |
const QByteArray & | cacheKey ) |
Definition at line 5231 of file qrhigles2.cpp.
References cacheKey(), isProgramBinaryDiskCacheEnabled(), and qCDebug.
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.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1188 of file qrhigles2.cpp.
QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glCompressedTexImage1D | ) |
const GLvoid * QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glCompressedTexSubImage1D | ) |
const GLvoid * QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glCopyTexSubImage1D | ) |
const GLvoid const GLvoid * QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glFramebufferTexture1D | ) |
quint64 const GLchar * QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glFramebufferTexture2DMultisampleEXT | ) |
QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glFramebufferTextureMultisampleMultiviewOVR | ) |
QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glFramebufferTextureMultiviewOVR | ) |
QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glGetQueryObjectui64v | ) |
quint64 * QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glObjectLabel | ) |
QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glPolygonMode | ) |
QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glQueryCounter | ) |
QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glTexImage1D | ) |
const void * QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glTexStorage1D | ) |
QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glTexSubImage1D | ) |
struct QRhiGles2::Caps QRhiGles2::caps |
Referenced by beginExternal(), beginOffscreenFrame(), bindCombinedSampler(), create(), endPass(), enqueueSubresUpload(), executeCommandBuffer(), isFeatureSupported(), isTextureFormatSupported(), resourceLimit(), shaderSource(), supportedSampleCounts(), tryLoadFromDiskOrPipelineCache(), and trySaveToPipelineCache().
|
mutable |
Definition at line 1086 of file qrhigles2_p.h.
Referenced by beginFrame(), beginOffscreenFrame(), create(), endFrame(), endOffscreenFrame(), ensureContext(), finish(), and isDeviceLost().
QOpenGLContext* QRhiGles2::ctx = nullptr |
Definition at line 933 of file qrhigles2_p.h.
QGles2SwapChain* QRhiGles2::currentSwapChain = nullptr |
Definition at line 1081 of file qrhigles2_p.h.
Referenced by beginExternal(), beginFrame(), endFrame(), executeCommandBuffer(), finish(), and makeThreadLocalNativeContextCurrent().
QRhiDriverInfo QRhiGles2::driverInfoStruct |
Definition at line 1085 of file qrhigles2_p.h.
Referenced by create(), driverInfo(), pipelineCacheData(), and setPipelineCacheData().
QOpenGLExtensions* QRhiGles2::f = nullptr |
Definition at line 940 of file qrhigles2_p.h.
Definition at line 936 of file qrhigles2_p.h.
Referenced by QRhiGles2(), create(), and evaluateFallbackSurface().
Definition at line 941 of file qrhigles2_p.h.
Referenced by bindShaderResources(), create(), enqueueResourceUpdates(), enqueueSubresUpload(), executeBindGraphicsPipeline(), executeCommandBuffer(), tryLoadFromDiskOrPipelineCache(), and trySaveToPipelineCache().
const void QRhiGles2::GLenum |
Definition at line 944 of file qrhigles2_p.h.
const GLvoid QRhiGles2::GLenum |
Definition at line 951 of file qrhigles2_p.h.
const GLvoid const GLvoid QRhiGles2::GLenum |
Definition at line 953 of file qrhigles2_p.h.
Definition at line 960 of file qrhigles2_p.h.
const GLvoid QRhiGles2::GLint |
Definition at line 942 of file qrhigles2_p.h.
Referenced by bindCombinedSampler(), compileShader(), create(), executeCommandBuffer(), isTextureFormatSupported(), linkProgram(), tryLoadFromDiskOrPipelineCache(), and trySaveToPipelineCache().
const void QRhiGles2::GLint |
Definition at line 944 of file qrhigles2_p.h.
const GLvoid QRhiGles2::GLint |
Definition at line 947 of file qrhigles2_p.h.
const GLvoid const GLvoid QRhiGles2::GLint = nullptr |
Definition at line 954 of file qrhigles2_p.h.
Definition at line 960 of file qrhigles2_p.h.
const GLvoid QRhiGles2::GLsizei = nullptr |
Definition at line 942 of file qrhigles2_p.h.
Referenced by compileShader(), create(), executeCommandBuffer(), and linkProgram().
Definition at line 944 of file qrhigles2_p.h.
const GLvoid QRhiGles2::GLsizei = nullptr |
Definition at line 948 of file qrhigles2_p.h.
quint64 QRhiGles2::GLsizei |
Definition at line 959 of file qrhigles2_p.h.
Definition at line 960 of file qrhigles2_p.h.
const GLvoid const GLvoid QRhiGles2::GLuint |
Definition at line 953 of file qrhigles2_p.h.
Referenced by beginFrame(), bindShaderResources(), compileShader(), create(), dispatch(), endFrame(), executeBindGraphicsPipeline(), and executeCommandBuffer().
QRhiGles2::GLuint |
Definition at line 955 of file qrhigles2_p.h.
quint64 QRhiGles2::GLuint |
Definition at line 959 of file qrhigles2_p.h.
Definition at line 960 of file qrhigles2_p.h.
bool QRhiGles2::importedContext = false |
Definition at line 934 of file qrhigles2_p.h.
Referenced by QRhiGles2(), create(), and destroy().
QHash<QByteArray, PipelineCacheData> QRhiGles2::m_pipelineCache |
Definition at line 1132 of file qrhigles2_p.h.
Referenced by pipelineCacheData(), releaseCachedResources(), setPipelineCacheData(), tryLoadFromDiskOrPipelineCache(), and trySaveToPipelineCache().
QHash<QRhiShaderStage, uint> QRhiGles2::m_shaderCache |
Definition at line 1126 of file qrhigles2_p.h.
Referenced by compileShader(), destroy(), and releaseCachedResources().
QOpenGLContext* QRhiGles2::maybeShareContext = nullptr |
Definition at line 938 of file qrhigles2_p.h.
Referenced by QRhiGles2(), and create().
Definition at line 937 of file qrhigles2_p.h.
Referenced by QRhiGles2(), create(), and evaluateFallbackSurface().
QRhiGles2NativeHandles QRhiGles2::nativeHandlesStruct |
Definition at line 1084 of file qrhigles2_p.h.
Referenced by create(), and nativeHandles().
|
mutable |
Definition at line 939 of file qrhigles2_p.h.
Referenced by endFrame(), and ensureContext().
struct QRhiGles2::OffscreenFrame QRhiGles2::ofr |
Referenced by beginExternal(), beginOffscreenFrame(), destroy(), endOffscreenFrame(), finish(), and makeThreadLocalNativeContextCurrent().
QList<DeferredReleaseEntry> QRhiGles2::releaseQueue |
Definition at line 1117 of file qrhigles2_p.h.
Referenced by executeDeferredReleases().
QSurfaceFormat QRhiGles2::requestedFormat |
Definition at line 935 of file qrhigles2_p.h.
Referenced by QRhiGles2(), and create().
QRhi::Flags QRhiGles2::rhiFlags |
Definition at line 932 of file qrhigles2_p.h.
Referenced by beginOffscreenFrame(), and create().
Definition at line 1082 of file qrhigles2_p.h.
Referenced by create(), and isTextureFormatSupported().
|
mutable |
Definition at line 1083 of file qrhigles2_p.h.
Referenced by supportedSampleCounts().
uint QRhiGles2::vao = 0 |
Definition at line 962 of file qrhigles2_p.h.
Referenced by beginExternal(), destroy(), and executeCommandBuffer().