![]() |
Qt 6.x
The Qt SDK
|
#include <qrhigles2_p.h>
Classes | |
struct | Caps |
struct | DeferredReleaseEntry |
struct | OffscreenFrame |
struct | PipelineCacheData |
Public Types | |
enum | ProgramCacheResult { ProgramCacheHit , ProgramCacheMiss , ProgramCacheError } |
Additional Inherited Members | |
![]() | |
static const QRhiShaderResourceBinding::Data * | shaderResourceBindingData (const QRhiShaderResourceBinding &binding) |
static QRhiShaderResourceBinding::Data * | shaderResourceBindingData (QRhiShaderResourceBinding &binding) |
static bool | sortedBindingLessThan (const QRhiShaderResourceBinding &a, const QRhiShaderResourceBinding &b) |
![]() | |
static const int | MAX_SHADER_CACHE_ENTRIES = 128 |
Definition at line 730 of file qrhigles2_p.h.
Enumerator | |
---|---|
ProgramCacheHit | |
ProgramCacheMiss | |
ProgramCacheError |
Definition at line 889 of file qrhigles2_p.h.
QRhiGles2::QRhiGles2 | ( | QRhiGles2InitParams * | params, |
QRhiGles2NativeHandles * | importDevice = nullptr |
||
) |
Definition at line 556 of file qrhigles2.cpp.
References fallbackSurface, importedContext, maybeShareContext, maybeWindow, qWarning, requestedFormat, and QOpenGLContext::shareContext().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 4414 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 1973 of file qrhigles2.cpp.
References QRhiGles2::OffscreenFrame::active, QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::Barrier, QGles2CommandBuffer::Command::Args::barrier, QGles2CommandBuffer::Command::Args::barriers, caps, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QRhiGles2::Caps::compute, QGles2CommandBuffer::ComputePass, QGles2CommandBuffer::computePassState, currentSwapChain, ensureContext(), executeCommandBuffer(), GL_ALL_BARRIER_BITS, GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER, GL_SHADER_STORAGE_BUFFER, QHash< Key, T >::isEmpty(), ofr, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::resetCommands(), QGles2SwapChain::surface, vao, and QGles2CommandBuffer::ComputePassState::writtenResources.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2036 of file qrhigles2.cpp.
References addBoundaryCommand(), QGles2CommandBuffer::Command::BeginFrame, QGles2SwapChain::cb, contextLost, currentSwapChain, ensureContext(), executeDeferredReleases(), QRhi::FrameOpDeviceLost, QRhi::FrameOpError, QRhi::FrameOpSuccess, QRHI_RES, QGles2CommandBuffer::resetState(), and QGles2SwapChain::surface.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2081 of file qrhigles2.cpp.
References QRhiGles2::OffscreenFrame::active, addBoundaryCommand(), QGles2CommandBuffer::Command::BeginFrame, cb, QRhiGles2::OffscreenFrame::cbWrapper, contextLost, ensureContext(), executeDeferredReleases(), QRhi::FrameOpDeviceLost, QRhi::FrameOpError, QRhi::FrameOpSuccess, ofr, and QGles2CommandBuffer::resetState().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 4286 of file qrhigles2.cpp.
References QColor::alphaF(), QGles2CommandBuffer::Command::args, QColor::blueF(), QGles2CommandBuffer::Command::Args::c, cb, QGles2CommandBuffer::Command::Clear, QGles2CommandBuffer::Command::Args::clear, QGles2CommandBuffer::Command::cmd, QGles2RenderTargetData::colorAttCount, QGles2CommandBuffer::commands, QGles2TextureRenderTarget::create(), QGles2RenderTargetData::currentResIdList, QGles2CommandBuffer::currentTarget, QGles2TextureRenderTarget::d, QGles2CommandBuffer::Command::Args::d, QRhiDepthStencilClearValue::depthClearValue(), QRhiTextureRenderTarget::description(), QRhiCommandBuffer::DoNotTrackResourcesForCompute, QGles2RenderTargetData::dsAttCount, enqueueBarriersForPass(), enqueueBindFramebuffer(), enqueueResourceUpdates(), QColor::greenF(), QGles2CommandBuffer::Command::Args::mask, QGles2CommandBuffer::NoPass, QGles2CommandBuffer::passNeedsResourceTracking, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QColor::redF(), QGles2CommandBuffer::RenderPass, QGles2CommandBuffer::resetCachedState(), QRhiResource::resourceType(), QGles2CommandBuffer::Command::Args::s, QRhiDepthStencilClearValue::stencilClearValue(), 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 3758 of file qrhigles2.cpp.
References caps, QGles2Sampler::d, GL_COMPARE_REF_TO_TEXTURE, GL_TEXTURE0, GL_TEXTURE_COMPARE_FUNC, GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_WRAP_R, GLint, QGles2SamplerData::glmagfilter, QGles2SamplerData::glminfilter, QGles2SamplerData::gltexcomparefunc, QGles2SamplerData::glwrapr, QGles2SamplerData::glwraps, QGles2SamplerData::glwrapt, QGles2CommandBuffer::TextureUnitState::ps, QGles2CommandBuffer::TextureUnitState::psGeneration, QGles2Texture::samplerState, QGles2Texture::target, QGles2Texture::texture, QGles2CommandBuffer::TextureUnitState::texture, QRhiGles2::Caps::texture3D, QRhiGles2::Caps::textureCompareMode, 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 3811 of file qrhigles2.cpp.
References QVarLengthArray< T, Prealloc >::append(), QVarLengthArray< T, Prealloc >::at(), bindCombinedSampler(), QShaderDescription::Bool, QShaderDescription::Bool2, QShaderDescription::Bool3, QShaderDescription::Bool4, QGles2Buffer::buffer, QRhiShaderResourceBinding::BufferLoad, QRhiShaderResourceBinding::BufferLoadStore, QRhiShaderResourceBinding::BufferStore, QGles2UniformState::componentCount, QVarLengthArray< T, Prealloc >::constData(), QByteArray::constData(), QRhiTexture::CubeMap, QVarLengthArray< T, Prealloc >::data(), QGles2Buffer::data, QShaderDescription::Float, GL_READ_ONLY, GL_READ_WRITE, GL_SHADER_STORAGE_BUFFER, GL_TEXTURE0, GL_WRITE_ONLY, GLenum, QGles2Texture::glsizedintformat, GLuint, i, QRhiShaderResourceBinding::ImageLoad, QRhiShaderResourceBinding::ImageLoadStore, QRhiShaderResourceBinding::ImageStore, QShaderDescription::Int, QShaderDescription::Int2, QShaderDescription::Int3, QShaderDescription::Int4, QVarLengthArray< T, Prealloc >::isEmpty(), j, QRhiShaderResourceBindings::m_bindings, QRhiTexture::m_flags, QRhiBuffer::m_size, QRhiBuffer::m_usage, QShaderDescription::Mat2, QShaderDescription::Mat3, QShaderDescription::Mat4, QGles2UniformState::MAX_TRACKED_LOCATION, Q_ASSERT, qMax(), QRHI_RES, qrhi_std140_to_packed(), qWarning, QVarLengthArray< T, Prealloc >::resize(), QRhiShaderResourceBinding::SampledTexture, QRhiShaderResourceBinding::Sampler, QRhiImplementation::shaderResourceBindingData(), QVLABaseBase::size(), QRhiBuffer::StorageBuffer, QRhiShaderResourceBinding::Texture, QGles2Texture::texture, QShaderDescription::Uint, QShaderDescription::Uint2, QShaderDescription::Uint3, QShaderDescription::Uint4, QRhiShaderResourceBinding::UniformBuffer, QRhiTexture::UsedWithLoadStore, QGles2UniformState::v, QShaderDescription::Vec2, QShaderDescription::Vec3, and QShaderDescription::Vec4.
Referenced by executeCommandBuffer().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1143 of file qrhigles2.cpp.
bool QRhiGles2::compileShader | ( | GLuint | program, |
const QRhiShaderStage & | shaderStage, | ||
QShaderVersion * | shaderVersion | ||
) |
Definition at line 4642 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 684 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, QRhiGles2::Caps::baseVertex, QRhiTexture::BC1, QRhiTexture::BC2, QRhiTexture::BC3, QRhiGles2::Caps::bgraExternalFormat, QRhiGles2::Caps::bgraInternalFormat, QOpenGLExtensions::BGRATextureFormat, caps, QRhiGles2::Caps::compute, contextLost, QSurfaceFormat::CoreProfile, QRhiGles2::Caps::coreProfile, ctx, QRhiGles2::Caps::ctxMajor, QRhiGles2::Caps::ctxMinor, QVarLengthArray< T, Prealloc >::data(), QOpenGLExtensions::DDSTextureCompression, QOpenGLExtensions::Depth24, QRhiGles2::Caps::depth24, QRhiGles2::Caps::depthTexture, QRhiDriverInfo::deviceName, driverInfoStruct, QOpenGLExtensions::ElementIndexUint, QRhiGles2::Caps::elementIndexUint, ensureContext(), QRhiTexture::ETC2_RGB8, QRhiTexture::ETC2_RGB8A1, QRhiTexture::ETC2_RGBA8, QOpenGLExtensions::ETC2TextureCompression, fallbackSurface, QRhiGles2::Caps::fixedIndexPrimitiveRestart, QRhiGles2::Caps::floatFormats, QOpenGLExtensions::FramebufferBlit, QOpenGLExtensions::FramebufferMultisample, QRhiGles2::Caps::geometryShader, 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, QRhiGles2::Caps::gles, GLint, GLsizei, GLuint, QRhiGles2::Caps::halfAttributes, QOpenGLExtensions::HalfFloatVertex, QRhiGles2::Caps::hasDrawBuffersFunc, importedContext, QSet< T >::insert(), QRhiGles2::Caps::instancing, QRhiGles2::Caps::intAttributes, QSurfaceFormat::majorVersion(), QOpenGLExtensions::MapBufferRange, QRhiGles2::Caps::maxDrawBuffers, QRhiGles2::Caps::maxSamples, QRhiGles2::Caps::maxTextureArraySize, QRhiGles2::Caps::maxTextureSize, QRhiGles2::Caps::maxThreadGroupsPerDimension, QRhiGles2::Caps::maxThreadGroupsX, QRhiGles2::Caps::maxThreadGroupsY, QRhiGles2::Caps::maxThreadGroupsZ, QRhiGles2::Caps::maxThreadsPerThreadGroup, QRhiGles2::Caps::maxUniformVectors, QRhiGles2::Caps::maxVertexInputs, QRhiGles2::Caps::maxVertexOutputs, maybeShareContext, maybeWindow, QSurfaceFormat::minorVersion(), QRhiGles2::Caps::msaaRenderBuffer, QRhiGles2::Caps::multisampledTexture, QOpenGLExtensions::MultiView, QRhiGles2::Caps::multiView, QOpenGLExtensions::MultiViewExtended, nativeHandlesStruct, QRhiGles2::Caps::needsDepthStencilCombinedAttach, QRhiGles2::Caps::nonBaseLevelFramebufferTexture, QRhiGles2::Caps::npotTextureFull, QOpenGLFunctions::NPOTTextureRepeat, QOpenGLFunctions::NPOTTextures, QSurfaceFormat::OpenGLES, QOpenGLExtensions::PackedDepthStencil, QRhiGles2::Caps::packedDepthStencil, QSurfaceFormat::profile(), QRhiGles2::Caps::programBinary, QRhiGles2::Caps::properMapBuffer, Q_ASSERT, QByteArrayLiteral, qCDebug, qMax(), qMin(), QOPENGLF_APIENTRYP, qt_gl_global_share_context(), qWarning, QRhiGles2::Caps::r16Format, QRhiGles2::Caps::r8Format, QSurfaceFormat::renderableType(), renderer, requestedFormat, QRhiGles2::Caps::rgb10Formats, QRhiGles2::Caps::rgba8Format, rhiFlags, QOpenGLContext::screen(), QRhiGles2::Caps::screenSpaceDerivatives, QOpenGLContext::setFormat(), QOpenGLExtensions::Sized16Formats, QOpenGLExtensions::Sized8Formats, QRhiTexture::sRGB, QRhiGles2::Caps::srgbCapableDefaultFramebuffer, QOpenGLExtensions::SRGBFrameBuffer, QOpenGLExtensions::StandardDerivatives, supportedCompressedFormats, QRhiGles2::Caps::tessellation, QRhiGles2::Caps::texelFetch, QRhiGles2::Caps::texture1D, QRhiGles2::Caps::texture3D, QRhiGles2::Caps::textureCompareMode, QOpenGLFunctions::TextureRGFormats, toGlCompressedTextureFormat(), and QRhiGles2::Caps::uniformBuffers.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1116 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1647 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1637 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1610 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1624 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1642 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1111 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1617 of file qrhigles2.cpp.
|
overridevirtual |
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1935 of file qrhigles2.cpp.
References cb, QRhiImplementation::debugMarkers, and Q_UNUSED.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1944 of file qrhigles2.cpp.
References cb, QRhiImplementation::debugMarkers, and Q_UNUSED.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1952 of file qrhigles2.cpp.
References cb, QRhiImplementation::debugMarkers, and Q_UNUSED.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1036 of file qrhigles2.cpp.
References QHash< Key, T >::clear(), ctx, ensureContext(), executeDeferredReleases(), importedContext, m_shaderCache, and vao.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 4480 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QVarLengthArray< T, Prealloc >::at(), QGles2CommandBuffer::Command::Barrier, QGles2CommandBuffer::Command::Args::barrier, QGles2CommandBuffer::Command::Args::barriers, QHash< Key, T >::begin(), QRhiShaderResourceBinding::BufferLoad, QRhiShaderResourceBinding::BufferLoadStore, QRhiShaderResourceBinding::BufferStore, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::ComputePass, QGles2CommandBuffer::computePassState, QGles2CommandBuffer::currentComputeSrb, QGles2CommandBuffer::Command::Dispatch, QGles2CommandBuffer::Command::Args::dispatch, QHash< Key, T >::end(), QHash< Key, T >::erase(), GL_SHADER_IMAGE_ACCESS_BARRIER_BIT, GL_SHADER_STORAGE_BARRIER_BIT, GLbitfield(), GLuint, i, QRhiShaderResourceBinding::ImageLoad, QRhiShaderResourceBinding::ImageLoadStore, QRhiShaderResourceBinding::ImageStore, it, QRhiShaderResourceBindings::m_bindings, Q_ASSERT, QRHI_RES, qrhigl_accumulateComputeResource(), QGles2CommandBuffer::ComputePassState::Read, QGles2CommandBuffer::recordingPass, QRhiImplementation::shaderResourceBindingData(), QVLABaseBase::size(), QRhiResource::Texture, QGles2CommandBuffer::ComputePassState::writtenResources, QGles2CommandBuffer::Command::Args::x, QGles2CommandBuffer::Command::Args::y, and QGles2CommandBuffer::Command::Args::z.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1904 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::Args::baseInstance, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentGraphicsPipeline, QGles2CommandBuffer::Command::Draw, QGles2CommandBuffer::Command::Args::draw, QGles2CommandBuffer::Command::Args::firstVertex, instanceCount, QGles2CommandBuffer::Command::Args::instanceCount, QGles2CommandBuffer::Command::Args::ps, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::RenderPass, and QGles2CommandBuffer::Command::Args::vertexCount.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1919 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::Args::baseInstance, QGles2CommandBuffer::Command::Args::baseVertex, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentGraphicsPipeline, QGles2CommandBuffer::Command::DrawIndexed, QGles2CommandBuffer::Command::Args::drawIndexed, QGles2CommandBuffer::Command::Args::firstIndex, QGles2CommandBuffer::Command::Args::indexCount, instanceCount, QGles2CommandBuffer::Command::Args::instanceCount, QGles2CommandBuffer::Command::Args::ps, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, and QGles2CommandBuffer::RenderPass.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1441 of file qrhigles2.cpp.
References driverInfoStruct.
int QRhiGles2::effectiveSampleCount | ( | int | sampleCount | ) | const |
Definition at line 1100 of file qrhigles2.cpp.
References contains(), qBound(), qWarning, and supportedSampleCounts().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 4431 of file qrhigles2.cpp.
References cb, QGles2CommandBuffer::ComputePass, enqueueResourceUpdates(), QGles2CommandBuffer::NoPass, Q_ASSERT, QRHI_RES, and QGles2CommandBuffer::recordingPass.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2009 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 2054 of file qrhigles2.cpp.
References addBoundaryCommand(), QGles2SwapChain::cb, contextLost, currentSwapChain, QGles2CommandBuffer::Command::EndFrame, ensureContext(), executeCommandBuffer(), QGles2SwapChain::frameCount, QRhi::FrameOpDeviceLost, QRhi::FrameOpError, QRhi::FrameOpSuccess, needsMakeCurrentDueToSwap, Q_ASSERT, QRHI_RES, QRhi::SkipPresent, and QGles2SwapChain::surface.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2097 of file qrhigles2.cpp.
References QRhiGles2::OffscreenFrame::active, addBoundaryCommand(), QRhiGles2::OffscreenFrame::cbWrapper, contextLost, QGles2CommandBuffer::Command::EndFrame, ensureContext(), executeCommandBuffer(), QRhi::FrameOpDeviceLost, QRhi::FrameOpError, QRhi::FrameOpSuccess, ofr, Q_ASSERT, and Q_UNUSED.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 4333 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BlitFromRenderbuffer, QGles2CommandBuffer::Command::Args::blitFromRenderbuffer, QGles2CommandBuffer::Command::BlitFromTexture, QGles2CommandBuffer::Command::Args::blitFromTexture, cb, QRhiTextureRenderTargetDescription::cbeginColorAttachments(), QRhiTextureRenderTargetDescription::cendColorAttachments(), QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QRhiTexture::CubeMap, QGles2CommandBuffer::currentTarget, QGles2CommandBuffer::Command::Args::dstLayer, QGles2CommandBuffer::Command::Args::dstLevel, QGles2CommandBuffer::Command::Args::dstTarget, QGles2CommandBuffer::Command::Args::dstTexture, enqueueResourceUpdates(), GL_TEXTURE_CUBE_MAP_POSITIVE_X, QGles2CommandBuffer::Command::Args::h, QSize::height(), it, QRhiColorAttachment::layer(), QRhiColorAttachment::level(), QRhiTextureRenderTarget::m_desc, QRhiTexture::m_flags, QRhiColorAttachment::multiViewCount(), QGles2CommandBuffer::NoPass, QRhiTexture::pixelSize(), QRhiRenderBuffer::pixelSize(), Q_ASSERT, QRHI_RES, qWarning, QGles2CommandBuffer::recordingPass, QRhiColorAttachment::renderBuffer(), QGles2RenderBuffer::renderbuffer, QGles2CommandBuffer::Command::Args::renderbuffer, QGles2CommandBuffer::RenderPass, QRhiColorAttachment::resolveLayer(), QRhiColorAttachment::resolveLevel(), QRhiColorAttachment::resolveTexture(), QRhiResource::resourceType(), QGles2CommandBuffer::Command::Args::srcLayer, QGles2CommandBuffer::Command::Args::srcLevel, QGles2CommandBuffer::Command::Args::srcTarget, QGles2CommandBuffer::Command::Args::srcTexture, QGles2Texture::target, QGles2CommandBuffer::Command::Args::target, QRhiColorAttachment::texture(), QGles2Texture::texture, QRhiTexture::TextureArray, QRhiResource::TextureRenderTarget, QRhiTexture::ThreeDimensional, QGles2CommandBuffer::Command::Args::w, and QSize::width().
void QRhiGles2::enqueueBarriersForPass | ( | QGles2CommandBuffer * | cbD | ) |
Definition at line 4277 of file qrhigles2.cpp.
References QVarLengthArray< T, Prealloc >::append(), QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BarriersForPass, QGles2CommandBuffer::Command::Args::barriersForPass, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentPassResTrackerIndex, QGles2CommandBuffer::passResTrackers, QVLABaseBase::size(), and QGles2CommandBuffer::Command::Args::trackerIndex.
Referenced by beginComputePass(), beginPass(), and endExternal().
QGles2RenderTargetData * QRhiGles2::enqueueBindFramebuffer | ( | QRhiRenderTarget * | rt, |
QGles2CommandBuffer * | cbD, | ||
bool * | wantsColorClear = nullptr , |
||
bool * | wantsDsClear = nullptr |
||
) |
Definition at line 4204 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BindFramebuffer, QGles2CommandBuffer::Command::Args::bindFramebuffer, QRhiTextureRenderTargetDescription::cbeginColorAttachments(), QRhiTextureRenderTargetDescription::cendColorAttachments(), QGles2CommandBuffer::Command::cmd, QGles2RenderTargetData::colorAttCount, QGles2CommandBuffer::Command::Args::colorAttCount, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentPassResTrackerIndex, QGles2TextureRenderTarget::d, QRhiTextureRenderTargetDescription::depthTexture(), QGles2CommandBuffer::Command::Args::fbo, QGles2TextureRenderTarget::framebuffer, it, QRhiTextureRenderTarget::m_desc, QRhiTextureRenderTarget::m_flags, QGles2CommandBuffer::passNeedsResourceTracking, QGles2CommandBuffer::passResTrackers, QRhiTextureRenderTarget::PreserveColorContents, QRhiTextureRenderTarget::PreserveDepthStencilContents, qEnvironmentVariableIntValue(), QRHI_RES, QRhiColorAttachment::resolveTexture(), QRhiResource::resourceType(), QGles2CommandBuffer::Command::Args::srgb, QGles2RenderTargetData::srgbUpdateAndBlend, QGles2CommandBuffer::Command::Args::stereo, QGles2RenderTargetData::stereoTarget, QGles2CommandBuffer::Command::Args::stereoTarget, 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 2357 of file qrhigles2.cpp.
References QGles2Texture::AccessFramebuffer, QGles2Texture::AccessRead, QGles2Buffer::AccessUpdate, QGles2Texture::AccessUpdate, QRhiResourceUpdateBatchPrivate::activeBufferOpCount, QRhiResourceUpdateBatchPrivate::activeTextureOpCount, QGles2CommandBuffer::Command::args, QRhiResourceUpdateBatchPrivate::BufferOp::buf, QGles2Buffer::buffer, QGles2CommandBuffer::Command::Args::buffer, QRhiResourceUpdateBatchPrivate::bufferOps, QGles2CommandBuffer::Command::BufferSubData, QGles2CommandBuffer::Command::Args::bufferSubData, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QRhiReadbackResult::completed, QRhiBufferData::constData(), QByteArray::constData(), QRhiResourceUpdateBatchPrivate::TextureOp::Copy, QGles2CommandBuffer::Command::CopyTex, QGles2CommandBuffer::Command::Args::copyTex, QRhiTexture::CubeMap, QByteArray::data(), QRhiReadbackResult::data, QRhiResourceUpdateBatchPrivate::BufferOp::data, QGles2Buffer::data, QGles2CommandBuffer::Command::Args::data, QRhiResourceUpdateBatchPrivate::TextureOp::desc, QRhiTextureCopyDescription::destinationLayer(), QRhiTextureCopyDescription::destinationLevel(), QRhiTextureCopyDescription::destinationTopLeft(), QRhiResourceUpdateBatchPrivate::TextureOp::dst, QGles2CommandBuffer::Command::Args::dstFaceTarget, QGles2CommandBuffer::Command::Args::dstLevel, QGles2CommandBuffer::Command::Args::dstTarget, QGles2CommandBuffer::Command::Args::dstTexture, QGles2CommandBuffer::Command::Args::dstX, QGles2CommandBuffer::Command::Args::dstY, QGles2CommandBuffer::Command::Args::dstZ, QRhiBuffer::Dynamic, QRhiResourceUpdateBatchPrivate::BufferOp::DynamicUpdate, enqueueSubresUpload(), QGles2CommandBuffer::Command::Args::format, QRhiResourceUpdateBatchPrivate::free(), QGles2CommandBuffer::Command::GenMip, QGles2CommandBuffer::Command::Args::genMip, QRhiResourceUpdateBatchPrivate::TextureOp::GenMips, QRhiResourceUpdateBatchPrivate::get(), QGles2CommandBuffer::Command::GetBufferSubData, QGles2CommandBuffer::Command::Args::getBufferSubData, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GLenum, QGles2CommandBuffer::Command::Args::h, QSize::height(), QSize::isEmpty(), QRhiReadbackDescription::layer(), QRhiReadbackDescription::level(), QGles2CommandBuffer::Command::Args::level, QRhiTexture::m_flags, QRhiTexture::m_format, QRhiTexture::m_pixelSize, QRhiBuffer::m_size, QRhiBuffer::m_type, QRhiBuffer::m_usage, QRhi::MAX_MIP_LEVELS, QRhiResourceUpdateBatchPrivate::BufferOp::offset, QGles2CommandBuffer::Command::Args::offset, QRhiTexture::OneDimensional, QRhiTextureCopyDescription::pixelSize(), Q_ASSERT, QRHI_RES, QRhiResourceUpdateBatchPrivate::TextureOp::rb, QRhiResourceUpdateBatchPrivate::BufferOp::Read, QRhiResourceUpdateBatchPrivate::TextureOp::Read, QGles2CommandBuffer::Command::ReadPixels, QGles2CommandBuffer::Command::Args::readPixels, QRhiResourceUpdateBatchPrivate::BufferOp::readSize, QGles2CommandBuffer::Command::Args::readTarget, QByteArray::resize(), QRhiResourceUpdateBatchPrivate::BufferOp::result, QRhiResourceUpdateBatchPrivate::TextureOp::result, QGles2CommandBuffer::Command::Args::result, QGles2CommandBuffer::retainBufferData(), QRhiBufferData::size(), QVLABaseBase::size(), QGles2CommandBuffer::Command::Args::size, QGles2CommandBuffer::Command::Args::slice3D, QRhiTextureCopyDescription::sourceLayer(), QRhiTextureCopyDescription::sourceLevel(), QRhiTextureCopyDescription::sourceTopLeft(), sp, QGles2Texture::specified, QRhiResourceUpdateBatchPrivate::TextureOp::src, QGles2CommandBuffer::Command::Args::srcFaceTarget, QGles2CommandBuffer::Command::Args::srcLevel, QGles2CommandBuffer::Command::Args::srcTarget, QGles2CommandBuffer::Command::Args::srcTexture, QGles2CommandBuffer::Command::Args::srcX, QGles2CommandBuffer::Command::Args::srcY, QGles2CommandBuffer::Command::Args::srcZ, QRhiResourceUpdateBatchPrivate::BufferOp::StaticUpload, QRhiResourceUpdateBatchPrivate::TextureOp::subresDesc, QGles2Texture::target, QGles2CommandBuffer::Command::Args::target, QGles2Buffer::targetForDataOps, QRhiReadbackDescription::texture(), QGles2Texture::texture, QGles2CommandBuffer::Command::Args::texture, QRhiTexture::TextureArray, QRhiResourceUpdateBatchPrivate::textureOps, QRhiTexture::ThreeDimensional, trackedBufferBarrier(), trackedImageBarrier(), QRhiResourceUpdateBatchPrivate::BufferOp::type, QRhiResourceUpdateBatchPrivate::TextureOp::type, QRhiBuffer::UniformBuffer, QRhiResourceUpdateBatchPrivate::TextureOp::Upload, QGles2CommandBuffer::Command::Args::w, QSize::width(), QPoint::x(), and QPoint::y().
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 2222 of file qrhigles2.cpp.
References QGles2Texture::AccessUpdate, QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QRhiImplementation::compressedFormatInfo(), QGles2CommandBuffer::Command::CompressedImage, QGles2CommandBuffer::Command::Args::compressedImage, QGles2CommandBuffer::Command::CompressedSubImage, QGles2CommandBuffer::Command::Args::compressedSubImage, QRhiTexture::CubeMap, QRhiTextureSubresourceUploadDescription::data(), QGles2CommandBuffer::Command::Args::data, QRhiTextureSubresourceUploadDescription::dataStride(), QGles2CommandBuffer::Command::Args::depth, QRhiTextureSubresourceUploadDescription::destinationTopLeft(), QGles2CommandBuffer::Command::Args::dx, QGles2CommandBuffer::Command::Args::dy, QGles2CommandBuffer::Command::Args::dz, QGles2CommandBuffer::Command::Args::faceTarget, QRhiTexture::flags(), GL_TEXTURE_CUBE_MAP_POSITIVE_X, GLenum, QGles2Texture::glformat, QGles2CommandBuffer::Command::Args::glformat, QGles2Texture::glintformat, QGles2CommandBuffer::Command::Args::glintformat, QGles2Texture::gltype, QGles2CommandBuffer::Command::Args::gltype, QGles2CommandBuffer::Command::Args::h, QSize::height(), QRhiTextureSubresourceUploadDescription::image(), QRhiImplementation::isCompressedFormat(), isCubeMap(), QByteArray::isEmpty(), QSize::isEmpty(), QImage::isNull(), QPoint::isNull(), QGles2CommandBuffer::Command::Args::level, QRhiTexture::m_arraySize, QRhiTexture::m_depth, QRhiTexture::m_flags, QRhiTexture::m_format, QRhiTexture::m_pixelSize, QRhiTexture::OneDimensional, qMax(), qWarning, QGles2CommandBuffer::retainData(), QGles2CommandBuffer::retainImage(), QGles2CommandBuffer::Command::Args::rowLength, QGles2CommandBuffer::Command::Args::rowStartAlign, QByteArray::size(), QGles2CommandBuffer::Command::Args::size, QRhiTextureSubresourceUploadDescription::sourceSize(), QRhiTextureSubresourceUploadDescription::sourceTopLeft(), sp, QGles2Texture::specified, QGles2CommandBuffer::Command::SubImage, QGles2CommandBuffer::Command::Args::subImage, QGles2Texture::target, QGles2CommandBuffer::Command::Args::target, QGles2Texture::texture, QGles2CommandBuffer::Command::Args::texture, QRhiTexture::TextureArray, QRhiImplementation::textureFormatInfo(), QRhiTexture::ThreeDimensional, trackedImageBarrier(), QRhiTexture::UsedAsCompressedAtlas, QGles2CommandBuffer::Command::Args::w, QSize::width(), and QGles2Texture::zeroInitialized.
Referenced by enqueueResourceUpdates().
Definition at line 601 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 589 of file qrhigles2.cpp.
References fallbackSurface, and maybeWindow.
Referenced by ensureContext().
void QRhiGles2::executeBindGraphicsPipeline | ( | QGles2CommandBuffer * | cbD, |
QGles2GraphicsPipeline * | psD | ||
) |
Definition at line 3556 of file qrhigles2.cpp.
References QRhiGraphicsPipeline::A, QGles2CommandBuffer::GraphicsPassState::ColorMask::a, QRhiGraphicsPipeline::B, QGles2CommandBuffer::GraphicsPassState::ColorMask::b, QRhiGraphicsPipeline::TargetBlend::colorWrite, QRhiGraphicsPipeline::StencilOpState::compareOp, QRhiGraphicsPipeline::StencilOpState::depthFailOp, QRhiGraphicsPipeline::TargetBlend::dstAlpha, QGles2CommandBuffer::GraphicsPassState::Blend::dstAlpha, QRhiGraphicsPipeline::TargetBlend::dstColor, QGles2CommandBuffer::GraphicsPassState::Blend::dstColor, QRhiGraphicsPipeline::TargetBlend::enable, QRhiGraphicsPipeline::StencilOpState::failOp, 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::m_cullMode, QRhiGraphicsPipeline::m_depthBias, QRhiGraphicsPipeline::m_depthOp, QRhiGraphicsPipeline::m_depthTest, QRhiGraphicsPipeline::m_depthWrite, QRhiGraphicsPipeline::m_flags, QRhiGraphicsPipeline::m_frontFace, QRhiGraphicsPipeline::m_lineWidth, QRhiGraphicsPipeline::m_patchControlPointCount, QRhiGraphicsPipeline::m_polygonMode, QRhiGraphicsPipeline::m_slopeScaledDepthBias, QRhiGraphicsPipeline::m_stencilBack, QRhiGraphicsPipeline::m_stencilFront, QRhiGraphicsPipeline::m_stencilReadMask, QRhiGraphicsPipeline::m_stencilTest, QRhiGraphicsPipeline::m_stencilWriteMask, QRhiGraphicsPipeline::m_targetBlends, QRhiGraphicsPipeline::m_topology, QRhiGraphicsPipeline::None, QRhiGraphicsPipeline::TargetBlend::opAlpha, QGles2CommandBuffer::GraphicsPassState::Blend::opAlpha, QRhiGraphicsPipeline::TargetBlend::opColor, QGles2CommandBuffer::GraphicsPassState::Blend::opColor, QRhiGraphicsPipeline::StencilOpState::passOp, QRhiGraphicsPipeline::Patches, QGles2GraphicsPipeline::program, 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 2861 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::Args::a, QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::Args::b, QGles2CommandBuffer::Command::Barrier, QGles2CommandBuffer::Command::Args::barrier, QGles2CommandBuffer::Command::Args::barriers, barriersForBuffer(), QGles2CommandBuffer::Command::BarriersForPass, QGles2CommandBuffer::Command::Args::barriersForPass, barriersForTexture(), QGles2CommandBuffer::Command::Args::baseVertex, QRhiGles2::Caps::baseVertex, QGles2CommandBuffer::Command::BeginFrame, QGles2CommandBuffer::Command::BindComputePipeline, QGles2CommandBuffer::Command::Args::bindComputePipeline, QGles2CommandBuffer::Command::BindFramebuffer, QGles2CommandBuffer::Command::Args::bindFramebuffer, QGles2CommandBuffer::Command::BindGraphicsPipeline, QGles2CommandBuffer::Command::Args::bindGraphicsPipeline, QGles2CommandBuffer::Command::BindIndexBuffer, QGles2CommandBuffer::Command::Args::bindIndexBuffer, QGles2CommandBuffer::Command::Args::binding, QRhiVertexInputLayout::bindingAt(), QGles2CommandBuffer::Command::BindShaderResources, QGles2CommandBuffer::Command::Args::bindShaderResources, bindShaderResources(), QGles2CommandBuffer::Command::BindVertexBuffer, QGles2CommandBuffer::Command::Args::bindVertexBuffer, bindVertexIndexBufferWithStateReset(), QGles2CommandBuffer::Command::BlendConstants, QGles2CommandBuffer::Command::Args::blendConstants, QGles2CommandBuffer::Command::BlitFromRenderbuffer, QGles2CommandBuffer::Command::Args::blitFromRenderbuffer, QGles2CommandBuffer::Command::BlitFromTexture, QGles2CommandBuffer::Command::Args::blitFromTexture, QGles2CommandBuffer::Command::Args::buffer, bufferAccessIsWrite(), QGles2CommandBuffer::Command::BufferSubData, QGles2CommandBuffer::Command::Args::bufferSubData, QGles2CommandBuffer::Command::Args::c, caps, cb, QRhiVertexInputLayout::cbeginAttributes(), QRhiPassResourceTracker::cbeginBuffers(), QRhiPassResourceTracker::cbeginTextures(), QRhiVertexInputLayout::cendAttributes(), QRhiPassResourceTracker::cendBuffers(), QRhiPassResourceTracker::cendTextures(), QRhiVertexInputBinding::classification(), QGles2CommandBuffer::Command::Clear, QGles2CommandBuffer::Command::Args::clear, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::Command::Args::colorAttCount, QGles2CommandBuffer::commands, QRhiGraphicsPipeline::StencilOpState::compareOp, QGles2CommandBuffer::Command::CompressedImage, QGles2CommandBuffer::Command::Args::compressedImage, QGles2CommandBuffer::Command::CompressedSubImage, QGles2CommandBuffer::Command::Args::compressedSubImage, QRhiGles2::Caps::compute, QByteArray::constData(), QGles2CommandBuffer::Command::CopyTex, QGles2CommandBuffer::Command::Args::copyTex, QRhiGles2::Caps::coreProfile, currentSwapChain, QGles2CommandBuffer::Command::Args::d, QGles2CommandBuffer::Command::Args::d0, QGles2CommandBuffer::Command::Args::d1, QByteArray::data(), QGles2CommandBuffer::Command::Args::data, QGles2CommandBuffer::Command::Args::depth, QGles2CommandBuffer::Command::Dispatch, QGles2CommandBuffer::Command::Args::dispatch, QGles2CommandBuffer::Command::Draw, QGles2CommandBuffer::Command::Args::draw, QGles2CommandBuffer::Command::DrawIndexed, QGles2CommandBuffer::Command::Args::drawIndexed, QGles2GraphicsPipeline::drawMode, QGles2CommandBuffer::Command::Args::dstFaceTarget, QGles2CommandBuffer::Command::Args::dstLayer, QGles2CommandBuffer::Command::Args::dstLevel, QGles2CommandBuffer::Command::Args::dstTarget, QGles2CommandBuffer::Command::Args::dstTexture, QGles2CommandBuffer::Command::Args::dstX, QGles2CommandBuffer::Command::Args::dstY, QGles2CommandBuffer::Command::Args::dstZ, QGles2CommandBuffer::Command::Args::dx, QGles2CommandBuffer::Command::Args::dy, QGles2CommandBuffer::GraphicsPassState::dynamic, QGles2CommandBuffer::Command::Args::dynamicOffsetCount, QGles2CommandBuffer::Command::Args::dynamicOffsetPairs, QGles2CommandBuffer::Command::Args::dz, QGles2CommandBuffer::Command::EndFrame, executeBindGraphicsPipeline(), QGles2CommandBuffer::Command::Args::faceTarget, QGles2CommandBuffer::Command::Args::fbo, QGles2CommandBuffer::Command::Args::firstIndex, QGles2CommandBuffer::Command::Args::firstVertex, QRhiVertexInputAttribute::Float, QRhiVertexInputAttribute::Float2, QRhiVertexInputAttribute::Float3, QRhiVertexInputAttribute::Float4, QGles2CommandBuffer::Command::Args::format, QGles2CommandBuffer::Command::Args::g, QGles2CommandBuffer::Command::GenMip, QGles2CommandBuffer::Command::Args::genMip, QGles2CommandBuffer::Command::GetBufferSubData, QGles2CommandBuffer::Command::Args::getBufferSubData, GL_ARRAY_BUFFER, GL_BACK_LEFT, GL_BACK_RIGHT, GL_COLOR_ATTACHMENT0, 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_RENDERBUFFER, GL_RGBA, GL_TEXTURE_1D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_2D_ARRAY, GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_3D, GL_UNPACK_ROW_LENGTH, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT_2_10_10_10_REV, GLbitfield(), GLenum, QRhiGles2::Caps::gles, QGles2CommandBuffer::Command::Args::glformat, GLint, QGles2CommandBuffer::Command::Args::glintformat, GLsizei, QGles2CommandBuffer::Command::Args::gltype, GLuint, QGles2CommandBuffer::graphicsPassState, QGles2CommandBuffer::Command::Args::h, QRhiVertexInputAttribute::Half, QRhiVertexInputAttribute::Half2, QRhiVertexInputAttribute::Half3, QRhiVertexInputAttribute::Half4, QRhiGles2::Caps::hasDrawBuffersFunc, i, QGles2CommandBuffer::Command::Args::indexCount, QGles2CommandBuffer::Command::Args::instanceCount, QRhiVertexInputBinding::instanceStepRate(), QRhiGles2::Caps::instancing, QRhiGles2::Caps::intAttributes, isFeatureSupported(), it, QGles2CommandBuffer::Command::Args::level, QRhiGraphicsPipeline::m_stencilBack, QRhiGraphicsPipeline::m_stencilFront, QRhiGraphicsPipeline::m_stencilReadMask, QRhiGraphicsPipeline::m_vertexInputLayout, QGles2CommandBuffer::Command::Args::mask, QRhiGles2::Caps::maxDrawBuffers, QGles2CommandBuffer::Command::Args::maybeComputePs, QGles2CommandBuffer::Command::Args::maybeGraphicsPs, QRhiGles2::Caps::nonBaseLevelFramebufferTexture, normalize(), QGles2CommandBuffer::Command::Args::offset, QGles2CommandBuffer::passResTrackers, QRhiVertexInputBinding::PerInstance, QGles2SwapChain::pixelSize, QGles2ComputePipeline::program, QRhiGles2::Caps::properMapBuffer, QGles2CommandBuffer::Command::Args::ps, Q_LIKELY, Q_UNLIKELY, qMax(), QRHI_RES, qWarning, QGles2CommandBuffer::Command::Args::r, QRhiTexture::R8, QGles2CommandBuffer::Command::ReadPixels, QGles2CommandBuffer::Command::Args::readPixels, QGles2CommandBuffer::Command::Args::readTarget, QRhiTexture::RED_OR_ALPHA8, QRhi::RedOrAlpha8IsRed, QGles2CommandBuffer::Command::Args::ref, QGles2CommandBuffer::Command::Args::renderbuffer, QGles2CommandBuffer::GraphicsPassState::reset(), QGles2CommandBuffer::Command::ResetFrame, QByteArray::resize(), QGles2CommandBuffer::Command::Args::result, QRhiTexture::RGB10A2, QRhiTexture::RGBA16F, QRhiTexture::RGBA32F, QRhiTexture::RGBA8, QRhiSwapChain::RightBuffer, QGles2CommandBuffer::Command::Args::rowLength, QGles2CommandBuffer::Command::Args::rowStartAlign, QGles2CommandBuffer::Command::Args::s, QGles2CommandBuffer::Command::Scissor, QGles2CommandBuffer::Command::Args::scissor, QRhiVertexInputAttribute::SInt, QRhiVertexInputAttribute::SInt2, QRhiVertexInputAttribute::SInt3, QRhiVertexInputAttribute::SInt4, QGles2CommandBuffer::Command::Args::size, QGles2CommandBuffer::Command::Args::slice3D, QGles2CommandBuffer::Command::Args::srb, QGles2CommandBuffer::Command::Args::srcFaceTarget, QGles2CommandBuffer::Command::Args::srcLayer, QGles2CommandBuffer::Command::Args::srcLevel, QGles2CommandBuffer::Command::Args::srcTarget, QGles2CommandBuffer::Command::Args::srcTexture, QGles2CommandBuffer::Command::Args::srcX, QGles2CommandBuffer::Command::Args::srcY, QGles2CommandBuffer::Command::Args::srcZ, QGles2CommandBuffer::Command::Args::srgb, QRhiGles2::Caps::srgbCapableDefaultFramebuffer, state, QGles2CommandBuffer::Command::StencilRef, QGles2CommandBuffer::Command::Args::stencilRef, QGles2CommandBuffer::GraphicsPassState::stencilRef, QGles2CommandBuffer::Command::Args::stereo, QGles2CommandBuffer::Command::Args::stereoTarget, QRhiVertexInputBinding::stride(), QGles2CommandBuffer::Command::SubImage, QGles2CommandBuffer::Command::Args::subImage, QGles2CommandBuffer::Command::Args::target, QGles2CommandBuffer::Command::Args::texture, textureAccessIsWrite(), toGlCompareOp(), CommandBufferExecTrackedState::TRACKED_ATTRIB_COUNT, QGles2CommandBuffer::Command::Args::trackerIndex, QGles2CommandBuffer::Command::Args::type, QRhiVertexInputAttribute::UInt, QRhiVertexInputAttribute::UInt2, QRhiVertexInputAttribute::UInt3, QRhiVertexInputAttribute::UInt4, QRhiVertexInputAttribute::UNormByte, QRhiVertexInputAttribute::UNormByte2, QRhiVertexInputAttribute::UNormByte4, vao, QGles2CommandBuffer::Command::Args::vertexCount, QGles2CommandBuffer::Command::Viewport, QGles2CommandBuffer::Command::Args::viewport, QGles2CommandBuffer::Command::Args::w, QGles2CommandBuffer::Command::Args::x, QGles2CommandBuffer::Command::Args::y, and QGles2CommandBuffer::Command::Args::z.
Referenced by beginExternal(), endFrame(), endOffscreenFrame(), and finish().
void QRhiGles2::executeDeferredReleases | ( | ) |
Definition at line 1061 of file qrhigles2.cpp.
References QRhiGles2::DeferredReleaseEntry::Buffer, e, i, QRhiGles2::DeferredReleaseEntry::Pipeline, releaseQueue, QRhiGles2::DeferredReleaseEntry::RenderBuffer, QRhiGles2::DeferredReleaseEntry::Texture, and QRhiGles2::DeferredReleaseEntry::TextureRenderTarget.
Referenced by beginFrame(), beginOffscreenFrame(), and destroy().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2119 of file qrhigles2.cpp.
References QRhiGles2::OffscreenFrame::active, QGles2SwapChain::cb, QRhiGles2::OffscreenFrame::cbWrapper, 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 4793 of file qrhigles2.cpp.
void QRhiGles2::gatherSamplers | ( | GLuint | program, |
const QShaderDescription::InOutVariable & | v, | ||
QGles2SamplerDescriptionVector * | dst | ||
) |
Definition at line 4779 of file qrhigles2.cpp.
void QRhiGles2::gatherUniforms | ( | GLuint | program, |
const QShaderDescription::UniformBlock & | ub, | ||
QDuplicateTracker< int, 256 > * | activeUniformLocations, | ||
QGles2UniformDescriptionVector * | dst | ||
) |
Definition at line 4742 of file qrhigles2.cpp.
References QShaderDescription::UniformBlock::binding, QShaderDescription::UniformBlock::members, QByteArray::number(), qWarning, registerUniformIfActive(), QShaderDescription::Struct, and QShaderDescription::UniformBlock::structName.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1138 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1474 of file qrhigles2.cpp.
References contextLost.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1308 of file qrhigles2.cpp.
References QRhi::BaseInstance, QRhi::BaseVertex, QRhiGles2::Caps::baseVertex, caps, QRhi::Compute, QRhiGles2::Caps::compute, QRhiGles2::Caps::coreProfile, QRhiGles2::Caps::ctxMajor, QRhi::CustomInstanceStepRate, QRhi::DebugMarkers, QRhi::ElementIndexUint, QRhiGles2::Caps::elementIndexUint, QRhiGles2::Caps::fixedIndexPrimitiveRestart, QRhi::GeometryShader, QRhiGles2::Caps::geometryShader, QRhiGles2::Caps::gles, QRhi::HalfAttributes, QRhiGles2::Caps::halfAttributes, QRhi::ImageDataStride, QRhi::Instancing, QRhiGles2::Caps::instancing, QRhi::IntAttributes, QRhiGles2::Caps::intAttributes, QRhiGles2::Caps::maxTextureArraySize, QRhiGles2::Caps::msaaRenderBuffer, QRhiGles2::Caps::multisampledTexture, QRhi::MultisampleRenderBuffer, QRhi::MultisampleTexture, QRhi::MultiView, QRhiGles2::Caps::multiView, QRhiGles2::Caps::nonBaseLevelFramebufferTexture, QRhi::NonDynamicUniformBuffers, QRhi::NonFillPolygonMode, QRhi::NonFourAlignedEffectiveIndexBufferOffset, QRhiGles2::Caps::npotTextureFull, QRhi::NPOTTextureRepeat, QRhi::OneDimensionalTextureMipmaps, QRhi::OneDimensionalTextures, QRhi::PipelineCacheDataLoadSave, QRhi::PrimitiveRestart, QRhiGles2::Caps::programBinary, QRhiGles2::Caps::properMapBuffer, QRhi::ReadBackAnyTextureFormat, QRhi::ReadBackNonBaseMipLevel, QRhi::ReadBackNonUniformBuffer, QRhi::RedOrAlpha8IsRed, QRhi::RenderBufferImport, QRhi::RenderTo3DTextureSlice, QRhi::RenderToNonBaseMipLevel, QRhi::RenderToOneDimensionalTexture, QRhi::ScreenSpaceDerivatives, QRhiGles2::Caps::screenSpaceDerivatives, QRhi::Tessellation, QRhiGles2::Caps::tessellation, QRhi::TexelFetch, QRhiGles2::Caps::texelFetch, QRhiGles2::Caps::texture1D, QRhiGles2::Caps::texture3D, QRhi::TextureArrayRange, QRhi::TextureArrays, QRhi::ThreeDimensionalTextureMipmaps, QRhi::ThreeDimensionalTextures, QRhi::Timestamps, QRhi::TriangleFanTopology, QRhi::VertexShaderPointSize, and QRhi::WideLines.
Referenced by executeCommandBuffer().
bool QRhiGles2::isProgramBinaryDiskCacheEnabled | ( | ) | const |
Definition at line 4830 of file qrhigles2.cpp.
References QOpenGLProgramBinarySupportCheckWrapper::get(), and QOpenGLProgramBinarySupportCheck::isSupported().
Referenced by tryLoadFromDiskOrPipelineCache(), and trySaveToDiskCache().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1259 of file qrhigles2.cpp.
References QRhiTexture::BGRA8, QRhiGles2::Caps::bgraExternalFormat, caps, QSet< T >::contains(), QRhiTexture::D16, QRhiTexture::D24, QRhiTexture::D24S8, QRhiTexture::D32F, QRhiGles2::Caps::depth24, QRhiGles2::Caps::depthTexture, QRhiGles2::Caps::floatFormats, GLint, QRhiImplementation::isCompressedFormat(), QRhiGles2::Caps::packedDepthStencil, QRhiTexture::R16, QRhiTexture::R16F, QRhiGles2::Caps::r16Format, QRhiTexture::R32F, QRhiTexture::R8, QRhiGles2::Caps::r8Format, QRhiTexture::RG16, QRhiTexture::RG8, QRhiTexture::RGB10A2, QRhiGles2::Caps::rgb10Formats, QRhiTexture::RGBA16F, QRhiTexture::RGBA32F, supportedCompressedFormats, and toGlCompressedTextureFormat().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1128 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1133 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 2030 of file qrhigles2.cpp.
bool QRhiGles2::linkProgram | ( | GLuint | program | ) |
Definition at line 4686 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 1453 of file qrhigles2.cpp.
References QRhiGles2::OffscreenFrame::active, currentSwapChain, ensureContext(), QRhiImplementation::inFrame, ofr, and QGles2SwapChain::surface.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1436 of file qrhigles2.cpp.
References nativeHandlesStruct.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1961 of file qrhigles2.cpp.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1488 of file qrhigles2.cpp.
References QByteArray::constData(), QRhiDriverInfo::deviceName, driverInfoStruct, header(), i, it, m_pipelineCache, QRhiImplementation::pipelineCacheRhiId(), Q_ASSERT, Q_STATIC_ASSERT, 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 4706 of file qrhigles2.cpp.
References QGles2UniformDescription::arrayDim, QGles2UniformDescription::binding, QVariant::constData(), QGles2UniformDescription::glslLocation, QDuplicateTracker< T, Prealloc >::hasSeen(), QGles2UniformDescription::offset, qWarning, QGles2UniformDescription::size, QShaderDescription::Struct, QGles2UniformDescription::type, and var.
Referenced by gatherUniforms().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1461 of file qrhigles2.cpp.
References QHash< Key, T >::clear(), ensureContext(), m_pipelineCache, and m_shaderCache.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1398 of file qrhigles2.cpp.
References caps, QRhi::FramesInFlight, QRhi::MaxAsyncReadbackFrames, QRhi::MaxColorAttachments, QRhiGles2::Caps::maxDrawBuffers, QRhiGles2::Caps::maxTextureSize, QRhi::MaxThreadGroupsPerDimension, QRhiGles2::Caps::maxThreadGroupsPerDimension, QRhiGles2::Caps::maxThreadGroupsX, QRhiGles2::Caps::maxThreadGroupsY, QRhiGles2::Caps::maxThreadGroupsZ, QRhi::MaxThreadGroupX, QRhi::MaxThreadGroupY, QRhi::MaxThreadGroupZ, QRhi::MaxThreadsPerThreadGroup, QRhiGles2::Caps::maxThreadsPerThreadGroup, QRhi::MaxUniformBufferRange, QRhiGles2::Caps::maxUniformVectors, QRhi::MaxVertexInputs, QRhiGles2::Caps::maxVertexInputs, QRhi::MaxVertexOutputs, QRhiGles2::Caps::maxVertexOutputs, QRhi::TextureArraySizeMax, QRhi::TextureSizeMax, and QRhi::TextureSizeMin.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 4197 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 4807 of file qrhigles2.cpp.
References QShaderDescription::inputVariables(), QShaderDescription::isValid(), QShaderDescription::outputVariables(), and qWarning.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1880 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::Args::a, QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::Args::b, QGles2CommandBuffer::Command::BlendConstants, QGles2CommandBuffer::Command::Args::blendConstants, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::Command::Args::g, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::Command::Args::r, QGles2CommandBuffer::recordingPass, and QGles2CommandBuffer::RenderPass.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 4442 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BindComputePipeline, QGles2CommandBuffer::Command::Args::bindComputePipeline, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::ComputePass, QGles2CommandBuffer::currentComputePipeline, QGles2CommandBuffer::currentGraphicsPipeline, QGles2CommandBuffer::currentPipelineGeneration, QGles2ComputePipeline::generation, QGles2CommandBuffer::Command::Args::ps, Q_ASSERT, QRHI_RES, and QGles2CommandBuffer::recordingPass.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1652 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BindGraphicsPipeline, QGles2CommandBuffer::Command::Args::bindGraphicsPipeline, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentComputePipeline, QGles2CommandBuffer::currentGraphicsPipeline, QGles2CommandBuffer::currentPipelineGeneration, QGles2GraphicsPipeline::generation, QGles2CommandBuffer::Command::Args::ps, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, and QGles2CommandBuffer::RenderPass.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1543 of file qrhigles2.cpp.
References QString::constData(), 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 1862 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::Command::Args::h, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::RenderPass, QRhiScissor::scissor(), QGles2CommandBuffer::Command::Scissor, QGles2CommandBuffer::Command::Args::scissor, QGles2CommandBuffer::Command::Args::w, QGles2CommandBuffer::Command::Args::x, and QGles2CommandBuffer::Command::Args::y.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1670 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QVarLengthArray< T, Prealloc >::at(), QGles2CommandBuffer::Command::BindShaderResources, QGles2CommandBuffer::Command::Args::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, QGles2GraphicsPipeline::currentSrb, QGles2ComputePipeline::currentSrb, QGles2GraphicsPipeline::currentSrbGeneration, QGles2ComputePipeline::currentSrbGeneration, QGles2CommandBuffer::currentSrbGeneration, QGles2CommandBuffer::Command::Args::dynamicOffsetCount, QGles2CommandBuffer::Command::Args::dynamicOffsetPairs, QGles2ShaderResourceBindings::generation, QGles2ShaderResourceBindings::hasDynamicOffset, i, QRhiShaderResourceBinding::ImageLoad, QRhiShaderResourceBinding::ImageLoadStore, QRhiShaderResourceBinding::ImageStore, QRhiShaderResourceBindings::m_bindings, QRhiGraphicsPipeline::m_shaderResourceBindings, QRhiComputePipeline::m_shaderResourceBindings, QGles2CommandBuffer::MAX_DYNAMIC_OFFSET_COUNT, QGles2CommandBuffer::Command::Args::maybeComputePs, QGles2CommandBuffer::Command::Args::maybeGraphicsPs, QGles2CommandBuffer::NoPass, QGles2CommandBuffer::passNeedsResourceTracking, QGles2CommandBuffer::passResTrackers, Q_ASSERT, QRHI_RES, qWarning, QGles2CommandBuffer::recordingPass, QRhiShaderResourceBinding::SampledTexture, QRhiImplementation::shaderResourceBindingData(), QVLABaseBase::size(), QGles2CommandBuffer::Command::Args::srb, 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 1893 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentGraphicsPipeline, QGles2CommandBuffer::Command::Args::ps, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::Command::Args::ref, QGles2CommandBuffer::RenderPass, QGles2CommandBuffer::Command::StencilRef, and QGles2CommandBuffer::Command::Args::stencilRef.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1798 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BindIndexBuffer, QGles2CommandBuffer::Command::Args::bindIndexBuffer, QGles2CommandBuffer::Command::Args::binding, QGles2CommandBuffer::Command::BindVertexBuffer, QGles2CommandBuffer::Command::Args::bindVertexBuffer, QGles2Buffer::buffer, QGles2CommandBuffer::Command::Args::buffer, QRhiPassResourceTracker::BufIndexRead, QRhiPassResourceTracker::BufVertexInput, QRhiPassResourceTracker::BufVertexInputStage, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::currentGraphicsPipeline, QGles2CommandBuffer::currentPassResTrackerIndex, i, QRhiBuffer::IndexBuffer, QRhiCommandBuffer::IndexUInt16, QRhiBuffer::m_usage, QGles2CommandBuffer::Command::Args::offset, QGles2CommandBuffer::passNeedsResourceTracking, QGles2CommandBuffer::passResTrackers, QGles2CommandBuffer::Command::Args::ps, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::RenderPass, trackedRegisterBuffer(), QGles2CommandBuffer::Command::Args::type, and QRhiBuffer::VertexBuffer.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1842 of file qrhigles2.cpp.
References QGles2CommandBuffer::Command::args, cb, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QGles2CommandBuffer::Command::Args::d0, QGles2CommandBuffer::Command::Args::d1, QGles2CommandBuffer::Command::Args::h, Q_ASSERT, QRHI_RES, QGles2CommandBuffer::recordingPass, QGles2CommandBuffer::RenderPass, QGles2CommandBuffer::Command::Viewport, QGles2CommandBuffer::Command::Args::viewport, viewport(), QGles2CommandBuffer::Command::Args::w, QGles2CommandBuffer::Command::Args::x, and QGles2CommandBuffer::Command::Args::y.
QByteArray QRhiGles2::shaderSource | ( | const QRhiShaderStage & | shaderStage, |
QShaderVersion * | shaderVersion | ||
) |
Definition at line 4576 of file qrhigles2.cpp.
References caps, QRhiGles2::Caps::coreProfile, QRhiGles2::Caps::ctxMajor, QRhiGles2::Caps::ctxMinor, QRhiGles2::Caps::gles, QShaderVersion::GlslEs, QShader::GlslShader, qWarning, QRhiShaderStage::shader(), QShader::shader(), and QRhiShaderStage::shaderVariant().
Referenced by compileShader(), and tryLoadFromDiskOrPipelineCache().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1446 of file qrhigles2.cpp.
References QRhiImplementation::totalPipelineCreationTime().
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1090 of file qrhigles2.cpp.
References QList< T >::append(), caps, i, QList< T >::isEmpty(), QRhiGles2::Caps::maxSamples, and supportedSampleCountList.
Referenced by effectiveSampleCount().
void QRhiGles2::trackedBufferBarrier | ( | QGles2CommandBuffer * | cbD, |
QGles2Buffer * | bufD, | ||
QGles2Buffer::Access | access | ||
) |
Definition at line 2180 of file qrhigles2.cpp.
References QGles2Buffer::UsageState::access, QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::Barrier, QGles2CommandBuffer::Command::Args::barrier, QGles2CommandBuffer::Command::Args::barriers, barriersForBuffer(), bufferAccessIsWrite(), QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QRhiBuffer::m_usage, QGles2CommandBuffer::NoPass, Q_ASSERT, QGles2CommandBuffer::recordingPass, QRhiBuffer::StorageBuffer, and QGles2Buffer::usageState.
Referenced by enqueueResourceUpdates().
void QRhiGles2::trackedImageBarrier | ( | QGles2CommandBuffer * | cbD, |
QGles2Texture * | texD, | ||
QGles2Texture::Access | access | ||
) |
Definition at line 2203 of file qrhigles2.cpp.
References QGles2Texture::UsageState::access, QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::Barrier, QGles2CommandBuffer::Command::Args::barrier, QGles2CommandBuffer::Command::Args::barriers, barriersForTexture(), QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, QRhiTexture::m_flags, QGles2CommandBuffer::NoPass, Q_ASSERT, QGles2CommandBuffer::recordingPass, textureAccessIsWrite(), QGles2Texture::usageState, and QRhiTexture::UsedWithLoadStore.
Referenced by enqueueResourceUpdates(), and enqueueSubresUpload().
void QRhiGles2::trackedRegisterBuffer | ( | QRhiPassResourceTracker * | passResTracker, |
QGles2Buffer * | bufD, | ||
QRhiPassResourceTracker::BufferAccess | access, | ||
QRhiPassResourceTracker::BufferStage | stage | ||
) |
Definition at line 2807 of file qrhigles2.cpp.
References QGles2Buffer::UsageState::access, QRhiPassResourceTracker::registerBuffer(), toGlAccess(), toPassTrackerUsageState(), and QGles2Buffer::usageState.
Referenced by setShaderResources(), and setVertexInput().
void QRhiGles2::trackedRegisterTexture | ( | QRhiPassResourceTracker * | passResTracker, |
QGles2Texture * | texD, | ||
QRhiPassResourceTracker::TextureAccess | access, | ||
QRhiPassResourceTracker::TextureStage | stage | ||
) |
Definition at line 2817 of file qrhigles2.cpp.
References QGles2Texture::UsageState::access, QRhiPassResourceTracker::registerTexture(), toGlAccess(), toPassTrackerUsageState(), and QGles2Texture::usageState.
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 4858 of file qrhigles2.cpp.
References QOpenGLProgramBinaryCache::ProgramDesc::cacheKey(), caps, QMap< Key, T >::cbegin(), QMap< Key, T >::cend(), QByteArray::constData(), GL_CONTEXT_LOST, GL_LINK_STATUS, GLenum, GLint, i, QMap< Key, T >::insert(), isProgramBinaryDiskCacheEnabled(), it, load(), m_pipelineCache, QByteArray::number(), QRhiGles2::Caps::programBinary, 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 4948 of file qrhigles2.cpp.
References QByteArray::constData(), isProgramBinaryDiskCacheEnabled(), and qCDebug.
void QRhiGles2::trySaveToPipelineCache | ( | GLuint | program, |
const QByteArray & | cacheKey, | ||
bool | force = false |
||
) |
Definition at line 4960 of file qrhigles2.cpp.
References caps, QByteArray::data(), GL_PROGRAM_BINARY_LENGTH, GLenum, GLint, m_pipelineCache, QRhiGles2::Caps::programBinary, and Qt::Uninitialized.
|
overridevirtual |
Implements QRhiImplementation.
Definition at line 1121 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 | ) |
QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glFramebufferTextureMultiviewOVR | ) |
QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glPolygonMode | ) |
QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glTexImage1D | ) |
const void * QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glTexStorage1D | ) |
QRhiGles2::void | ( | QOPENGLF_APIENTRYP | glTexSubImage1D | ) |
struct QRhiGles2::Caps QRhiGles2::caps |
|
mutable |
Definition at line 1042 of file qrhigles2_p.h.
Referenced by beginFrame(), beginOffscreenFrame(), create(), endFrame(), endOffscreenFrame(), ensureContext(), finish(), and isDeviceLost().
QOpenGLContext* QRhiGles2::ctx = nullptr |
Definition at line 903 of file qrhigles2_p.h.
QGles2SwapChain* QRhiGles2::currentSwapChain = nullptr |
Definition at line 1037 of file qrhigles2_p.h.
Referenced by beginExternal(), beginFrame(), endFrame(), executeCommandBuffer(), finish(), and makeThreadLocalNativeContextCurrent().
QRhiDriverInfo QRhiGles2::driverInfoStruct |
Definition at line 1041 of file qrhigles2_p.h.
Referenced by create(), driverInfo(), pipelineCacheData(), and setPipelineCacheData().
QOpenGLExtensions* QRhiGles2::f = nullptr |
Definition at line 910 of file qrhigles2_p.h.
Definition at line 906 of file qrhigles2_p.h.
Referenced by QRhiGles2(), create(), and evaluateFallbackSurface().
const GLvoid const GLvoid QRhiGles2::GLenum = nullptr |
Definition at line 911 of file qrhigles2_p.h.
Referenced by bindShaderResources(), create(), enqueueResourceUpdates(), enqueueSubresUpload(), executeBindGraphicsPipeline(), executeCommandBuffer(), tryLoadFromDiskOrPipelineCache(), and trySaveToPipelineCache().
const void QRhiGles2::GLenum |
Definition at line 914 of file qrhigles2_p.h.
const GLvoid QRhiGles2::GLenum |
Definition at line 921 of file qrhigles2_p.h.
const GLvoid const GLvoid QRhiGles2::GLenum |
Definition at line 923 of file qrhigles2_p.h.
const GLvoid QRhiGles2::GLint |
Definition at line 912 of file qrhigles2_p.h.
Referenced by bindCombinedSampler(), compileShader(), create(), executeCommandBuffer(), isTextureFormatSupported(), linkProgram(), tryLoadFromDiskOrPipelineCache(), and trySaveToPipelineCache().
const void QRhiGles2::GLint |
Definition at line 914 of file qrhigles2_p.h.
const GLvoid QRhiGles2::GLint |
Definition at line 917 of file qrhigles2_p.h.
const GLvoid const GLvoid QRhiGles2::GLint = nullptr |
Definition at line 924 of file qrhigles2_p.h.
const GLvoid QRhiGles2::GLsizei = nullptr |
Definition at line 912 of file qrhigles2_p.h.
Referenced by compileShader(), create(), executeCommandBuffer(), and linkProgram().
Definition at line 914 of file qrhigles2_p.h.
const GLvoid QRhiGles2::GLsizei = nullptr |
Definition at line 918 of file qrhigles2_p.h.
const GLvoid const GLvoid QRhiGles2::GLuint |
Definition at line 923 of file qrhigles2_p.h.
Referenced by bindShaderResources(), compileShader(), create(), dispatch(), executeBindGraphicsPipeline(), and executeCommandBuffer().
QRhiGles2::GLuint |
Definition at line 925 of file qrhigles2_p.h.
bool QRhiGles2::importedContext = false |
Definition at line 904 of file qrhigles2_p.h.
Referenced by QRhiGles2(), create(), and destroy().
QHash<QByteArray, PipelineCacheData> QRhiGles2::m_pipelineCache |
Definition at line 1086 of file qrhigles2_p.h.
Referenced by pipelineCacheData(), releaseCachedResources(), setPipelineCacheData(), tryLoadFromDiskOrPipelineCache(), and trySaveToPipelineCache().
QHash<QRhiShaderStage, uint> QRhiGles2::m_shaderCache |
Definition at line 1080 of file qrhigles2_p.h.
Referenced by compileShader(), destroy(), and releaseCachedResources().
QOpenGLContext* QRhiGles2::maybeShareContext = nullptr |
Definition at line 908 of file qrhigles2_p.h.
Referenced by QRhiGles2(), and create().
Definition at line 907 of file qrhigles2_p.h.
Referenced by QRhiGles2(), create(), and evaluateFallbackSurface().
QRhiGles2NativeHandles QRhiGles2::nativeHandlesStruct |
Definition at line 1040 of file qrhigles2_p.h.
Referenced by create(), and nativeHandles().
|
mutable |
Definition at line 909 of file qrhigles2_p.h.
Referenced by endFrame(), and ensureContext().
struct QRhiGles2::OffscreenFrame QRhiGles2::ofr |
Referenced by beginExternal(), beginOffscreenFrame(), endOffscreenFrame(), finish(), and makeThreadLocalNativeContextCurrent().
QList<DeferredReleaseEntry> QRhiGles2::releaseQueue |
Definition at line 1072 of file qrhigles2_p.h.
Referenced by executeDeferredReleases().
QSurfaceFormat QRhiGles2::requestedFormat |
Definition at line 905 of file qrhigles2_p.h.
Referenced by QRhiGles2(), and create().
QRhi::Flags QRhiGles2::rhiFlags |
Definition at line 902 of file qrhigles2_p.h.
Referenced by create().
Definition at line 1038 of file qrhigles2_p.h.
Referenced by create(), and isTextureFormatSupported().
|
mutable |
Definition at line 1039 of file qrhigles2_p.h.
Referenced by supportedSampleCounts().
uint QRhiGles2::vao = 0 |
Definition at line 928 of file qrhigles2_p.h.
Referenced by beginExternal(), destroy(), and executeCommandBuffer().