![]() |
Qt 6.x
The Qt SDK
|
#include <qssgrhicontext_p.h>
Static Public Member Functions | |
static QRhiCommandBuffer::BeginPassFlags | commonPassFlags () |
static bool | shaderDebuggingEnabled () |
static bool | editorMode () |
Definition at line 922 of file qssgrhicontext_p.h.
Definition at line 852 of file qssgrhicontext.cpp.
References LightProbe, and Q_STATIC_ASSERT.
QSSGRhiContext::~QSSGRhiContext | ( | ) |
Definition at line 860 of file qssgrhicontext.cpp.
References qDeleteAll(), and releaseCachedResources().
void QSSGRhiContext::checkAndAdjustForNPoT | ( | QRhiTexture * | texture, |
QSSGRhiSamplerDescription * | samplerDescription | ||
) |
Definition at line 1052 of file qssgrhicontext.cpp.
References QRhiSampler::ClampToEdge, QSize::height(), QSSGRhiSamplerDescription::hTiling, QRhi::isFeatureSupported(), QSSGRhiSamplerDescription::mipmap, QRhiSampler::None, QRhi::NPOTTextureRepeat, qNextPowerOfTwo(), qWarning, QSSGRhiSamplerDescription::vTiling, QSize::width(), and QSSGRhiSamplerDescription::zTiling.
Referenced by RenderHelpers::rhiPrepareRenderable(), and QSSGCustomMaterialSystem::rhiPrepareRenderable().
void QSSGRhiContext::cleanupDrawCallData | ( | const QSSGRenderModel * | model | ) |
Definition at line 1109 of file qssgrhicontext.cpp.
References QHash< Key, T >::begin(), QHash< Key, T >::end(), QHash< Key, T >::erase(), it, model, and releaseDrawCallData().
|
inline |
Definition at line 937 of file qssgrhicontext_p.h.
Referenced by addOpaqueDepthPrePassBindings(), QSSGLayerRenderData::maybeBakeLightmap(), QSSGRhiCubeRenderer::prepareCube(), QSSGSubsetRenderable::prepareInstancing(), QSSGParticleRenderer::prepareParticlesForModel(), QSSGRhiQuadRenderer::prepareQuad(), QSSGRhiCubeRenderer::recordRenderCube(), QSSGDebugDrawSystem::recordRenderDebugObjects(), QSSGRhiQuadRenderer::recordRenderQuad(), QSSGRhiQuadRenderer::recordRenderQuadPass(), QQuick3DSceneRenderer::renderToRhiTexture(), RenderHelpers::rhiPrepareGrid(), QSSGCustomMaterialSystem::rhiPrepareRenderable(), QSSGParticleRenderer::rhiPrepareRenderable(), rhiPrepareResourcesForShadowMap(), RenderHelpers::rhiPrepareSkyBox(), RenderHelpers::rhiPrepareSkyBoxForReflectionMap(), RenderHelpers::rhiRenderAoTexture(), RenderHelpers::rhiRenderDepthPass(), RenderHelpers::rhiRenderReflectionMap(), RenderHelpers::rhiRenderRenderable(), QSSGParticleRenderer::rhiRenderRenderable(), QSSGCustomMaterialSystem::rhiRenderRenderable(), and RenderHelpers::rhiRenderShadowMap().
|
inlinestatic |
Definition at line 976 of file qssgrhicontext_p.h.
References QRhiCommandBuffer::DoNotTrackResourcesForCompute.
Referenced by QSSGRhiQuadRenderer::recordRenderQuadPass(), QSSGReflectionMapEntry::renderMips(), DepthMapPass::renderPass(), ScreenMapPass::renderPass(), renderToKTXFileInternal(), QQuick3DSceneRenderer::renderToRhiTexture(), RenderHelpers::rhiRenderReflectionMap(), and RenderHelpers::rhiRenderShadowMap().
QRhiComputePipeline * QSSGRhiContext::computePipeline | ( | const QSSGComputePipelineStateKey & | key, |
QRhiShaderResourceBindings * | srb | ||
) |
Definition at line 1009 of file qssgrhicontext.cpp.
References QRhiShaderStage::Compute, computePipeline(), QHash< Key, T >::constEnd(), QHash< Key, T >::constFind(), QRhiComputePipeline::create(), QHash< Key, T >::insert(), it, QRhi::newComputePipeline(), qWarning, QRhiComputePipeline::setShaderResourceBindings(), QRhiComputePipeline::setShaderStage(), and srb().
Referenced by computePipeline().
|
inline |
Definition at line 953 of file qssgrhicontext_p.h.
Referenced by QQuick3DSceneRenderer::renderToRhiTexture(), RenderHelpers::rhiPrepareDepthPass(), RenderHelpers::rhiPrepareGrid(), RenderHelpers::rhiPrepareRenderable(), QSSGCustomMaterialSystem::rhiPrepareRenderable(), QSSGParticleRenderer::rhiPrepareRenderable(), rhiPrepareResourcesForShadowMap(), RenderHelpers::rhiRenderAoTexture(), and RenderHelpers::rhiRenderShadowMap().
QRhiTexture * QSSGRhiContext::dummyTexture | ( | QRhiTexture::Flags | flags, |
QRhiResourceUpdateBatch * | rub, | ||
const QSize & | size = QSize(64, 64) , |
||
const QColor & | fillColor = Qt::black |
||
) |
Definition at line 1125 of file qssgrhicontext.cpp.
References QHash< Key, T >::constEnd(), QHash< Key, T >::constFind(), QImage::Format_RGBA8888, QHash< Key, T >::insert(), it, QRhi::newTexture(), qWarning, QRhiTexture::RGBA8, and QRhiResourceUpdateBatch::uploadTexture().
Referenced by addOpaqueDepthPrePassBindings(), QSSGCustomMaterialSystem::rhiPrepareRenderable(), QSSGParticleRenderer::rhiPrepareRenderable(), and rhiPrepareResourcesForShadowMap().
|
static |
Definition at line 1151 of file qssgrhicontext.cpp.
References qEnvironmentVariableIntValue().
Referenced by QSSGShaderCache::QSSGShaderCache(), QSSGShaderCache::compileForRhi(), QSSGShaderCache::loadBuiltinForRhi(), QSSGShaderCache::newPipelineFromPregenerated(), and QSSGShaderCache::tryNewPipelineFromPersistentCache().
Definition at line 910 of file qssgrhicontext.cpp.
References Q_ASSERT, and rhi().
|
inline |
Definition at line 991 of file qssgrhicontext_p.h.
References model.
|
inline |
Definition at line 986 of file qssgrhicontext_p.h.
Referenced by QSSGSubsetRenderable::prepareInstancing().
|
inline |
Definition at line 931 of file qssgrhicontext_p.h.
Referenced by QSSGRenderer::rhiPrepare(), and QQuick3DSceneRenderer::synchronize().
|
inline |
Definition at line 943 of file qssgrhicontext_p.h.
|
inline |
Definition at line 934 of file qssgrhicontext_p.h.
|
inline |
Definition at line 1003 of file qssgrhicontext_p.h.
References QRhi::MaxUniformBufferRange.
|
inline |
Definition at line 996 of file qssgrhicontext_p.h.
Referenced by QSSGParticleRenderer::prepareParticlesForModel(), releaseCachedResources(), and QSSGParticleRenderer::rhiPrepareRenderable().
QRhiGraphicsPipeline * QSSGRhiContext::pipeline | ( | const QSSGGraphicsPipelineStateKey & | key, |
QRhiRenderPassDescriptor * | rpDesc, | ||
QRhiShaderResourceBindings * | srb | ||
) |
Definition at line 945 of file qssgrhicontext.cpp.
References QVarLengthArray< T, Prealloc >::cbegin(), QVarLengthArray< T, Prealloc >::cend(), QRhiGraphicsPipeline::CompileShadersWithDebugInfo, QHash< Key, T >::constEnd(), QHash< Key, T >::constFind(), QRhiGraphicsPipeline::create(), QRhiGraphicsPipeline::TargetBlend::enable, i, QHash< Key, T >::insert(), it, QRhiGraphicsPipeline::Lines, QRhiGraphicsPipeline::LineStrip, QRhi::newGraphicsPipeline(), qEnvironmentVariableIntValue(), qWarning, QRhiGraphicsPipeline::setCullMode(), QRhiGraphicsPipeline::setDepthBias(), QRhiGraphicsPipeline::setDepthOp(), QRhiGraphicsPipeline::setDepthTest(), QRhiGraphicsPipeline::setDepthWrite(), QRhiGraphicsPipeline::setFlags(), QRhiGraphicsPipeline::setLineWidth(), QRhiGraphicsPipeline::setPolygonMode(), QRhiGraphicsPipeline::setRenderPassDescriptor(), QRhiGraphicsPipeline::setSampleCount(), QRhiGraphicsPipeline::setShaderResourceBindings(), QRhiGraphicsPipeline::setShaderStages(), QRhiGraphicsPipeline::setSlopeScaledDepthBias(), QRhiGraphicsPipeline::setStencilFront(), QRhiGraphicsPipeline::setStencilTest(), QRhiGraphicsPipeline::setStencilWriteMask(), QRhiGraphicsPipeline::setTargetBlends(), QRhiGraphicsPipeline::setTopology(), QRhiGraphicsPipeline::setVertexInputLayout(), srb(), QRhiGraphicsPipeline::UsesScissor, and QRhiGraphicsPipeline::UsesStencilRef.
Referenced by QSSGRhiCubeRenderer::recordRenderCube(), QSSGDebugDrawSystem::recordRenderDebugObjects(), QSSGRhiQuadRenderer::recordRenderQuad(), RenderHelpers::rhiPrepareDepthPass(), RenderHelpers::rhiPrepareRenderable(), QSSGCustomMaterialSystem::rhiPrepareRenderable(), QSSGParticleRenderer::rhiPrepareRenderable(), and rhiPrepareResourcesForShadowMap().
|
inline |
Definition at line 969 of file qssgrhicontext_p.h.
|
inline |
Definition at line 967 of file qssgrhicontext_p.h.
|
inline |
Definition at line 963 of file qssgrhicontext_p.h.
void QSSGRhiContext::registerMesh | ( | QSSGRenderMesh * | mesh | ) |
Definition at line 1093 of file qssgrhicontext.cpp.
References QSet< T >::insert().
void QSSGRhiContext::registerTexture | ( | QRhiTexture * | texture | ) |
Definition at line 1082 of file qssgrhicontext.cpp.
References QSet< T >::insert().
void QSSGRhiContext::releaseCachedResources | ( | ) |
Definition at line 868 of file qssgrhicontext.cpp.
References QHash< Key, T >::clear(), particleData(), qDeleteAll(), releaseDrawCallData(), and QSSGRhiParticleData::texture.
Referenced by ~QSSGRhiContext().
void QSSGRhiContext::releaseDrawCallData | ( | QSSGRhiDrawCallData & | dcd | ) |
Definition at line 934 of file qssgrhicontext.cpp.
References QSSGRhiDrawCallData::bindings, QSSGRhiDrawCallData::pipeline, QSSG_CHECK, QSSGRhiDrawCallData::srb, srb(), QHash< Key, T >::take(), and QSSGRhiDrawCallData::ubuf.
Referenced by cleanupDrawCallData(), and releaseCachedResources().
void QSSGRhiContext::releaseMesh | ( | QSSGRenderMesh * | mesh | ) |
Definition at line 1098 of file qssgrhicontext.cpp.
References QSSG_ASSERT, releaseTexture(), QSet< T >::remove(), and QSSGRenderMesh::subsets.
void QSSGRhiContext::releaseTexture | ( | QRhiTexture * | texture | ) |
Definition at line 1087 of file qssgrhicontext.cpp.
References QSet< T >::remove().
Referenced by releaseMesh().
|
inline |
Definition at line 940 of file qssgrhicontext_p.h.
|
inline |
Definition at line 930 of file qssgrhicontext_p.h.
Referenced by QSSGRhiBuffer::QSSGRhiBuffer(), addOpaqueDepthPrePassBindings(), QSSGRhiShaderPipeline::addStage(), QSSGShaderCache::compileForRhi(), QSSGRhiShaderPipeline::ensureCombinedMainLightsUniformBuffer(), QSSGRhiShaderPipeline::ensureUniformBuffer(), initialize(), QSSGRhiCubeRenderer::prepareCube(), QSSGSubsetRenderable::prepareInstancing(), QSSGParticleRenderer::prepareParticlesForModel(), QSSGRhiQuadRenderer::prepareQuad(), QQuick3DSceneRenderer::renderToRhiTexture(), QSSGRenderer::rhiPrepare(), RenderHelpers::rhiPrepareAoTexture(), RenderHelpers::rhiPrepareDepthTexture(), RenderHelpers::rhiPrepareGrid(), QSSGCustomMaterialSystem::rhiPrepareRenderable(), QSSGParticleRenderer::rhiPrepareRenderable(), rhiPrepareResourcesForShadowMap(), RenderHelpers::rhiPrepareScreenTexture(), RenderHelpers::rhiRenderAoTexture(), RenderHelpers::rhiRenderReflectionMap(), RenderHelpers::rhiRenderShadowMap(), QQuick3DRenderStats::setRhiContext(), QQuick3DSceneRenderer::synchronize(), QSSGCustomMaterialSystem::updateUniformsForCustomMaterial(), updateUniformsForDefaultMaterial(), and QSSGParticleRenderer::updateUniformsForParticles().
QRhiSampler * QSSGRhiContext::sampler | ( | const QSSGRhiSamplerDescription & | samplerDescription | ) |
Definition at line 1030 of file qssgrhicontext.cpp.
References QRhiSampler::create(), QSSGRhiSamplerDescription::hTiling, info, QSSGRhiSamplerDescription::magFilter, QSSGRhiSamplerDescription::minFilter, QSSGRhiSamplerDescription::mipmap, QRhi::newSampler(), qWarning, QSSGRhiSamplerDescription::vTiling, and QSSGRhiSamplerDescription::zTiling.
Referenced by addDepthTextureBindings(), addOpaqueDepthPrePassBindings(), QSSGParticleRenderer::prepareParticlesForModel(), QQuick3DSceneRenderer::renderToRhiTexture(), RenderHelpers::rhiPrepareRenderable(), QSSGCustomMaterialSystem::rhiPrepareRenderable(), QSSGParticleRenderer::rhiPrepareRenderable(), rhiPrepareResourcesForShadowMap(), RenderHelpers::rhiRenderAoTexture(), and RenderHelpers::rhiRenderShadowMap().
|
inline |
Definition at line 936 of file qssgrhicontext_p.h.
References cb.
Referenced by QQuick3DSceneRenderer::renderToRhiTexture().
|
inline |
Definition at line 942 of file qssgrhicontext_p.h.
Referenced by QQuick3DSceneRenderer::renderToRhiTexture().
|
inline |
Definition at line 933 of file qssgrhicontext_p.h.
Referenced by QQuick3DSceneRenderer::renderToRhiTexture().
|
inline |
Definition at line 939 of file qssgrhicontext_p.h.
Referenced by QQuick3DSceneRenderer::renderToRhiTexture().
|
static |
Definition at line 1145 of file qssgrhicontext.cpp.
References qEnvironmentVariableIntValue().
Referenced by QSSGShaderCache::QSSGShaderCache(), QSSGShaderCache::compileForRhi(), QSSGShaderCache::loadBuiltinForRhi(), QSSGShaderCache::newPipelineFromPregenerated(), QSSGShaderCustomMaterialAdapter::prepareCustomShader(), and QSSGShaderCache::tryNewPipelineFromPersistentCache().
QRhiShaderResourceBindings * QSSGRhiContext::srb | ( | const QSSGRhiShaderResourceBindingList & | bindings | ) |
Definition at line 916 of file qssgrhicontext.cpp.
References QHash< Key, T >::constEnd(), QHash< Key, T >::constFind(), QRhiShaderResourceBindings::create(), QHash< Key, T >::insert(), it, QRhi::newShaderResourceBindings(), QSSGRhiShaderResourceBindingList::p, qWarning, QRhiShaderResourceBindings::setBindings(), srb(), and QSSGRhiShaderResourceBindingList::v.
Referenced by computePipeline(), pipeline(), releaseDrawCallData(), QQuick3DSceneRenderer::renderToRhiTexture(), RenderHelpers::rhiPrepareDepthPass(), RenderHelpers::rhiPrepareGrid(), RenderHelpers::rhiPrepareRenderable(), QSSGCustomMaterialSystem::rhiPrepareRenderable(), QSSGParticleRenderer::rhiPrepareRenderable(), rhiPrepareResourcesForShadowMap(), RenderHelpers::rhiRenderAoTexture(), RenderHelpers::rhiRenderShadowMap(), and srb().
|
inline |
Definition at line 1001 of file qssgrhicontext_p.h.
Referenced by QQuick3DSceneRenderer::~QQuick3DSceneRenderer().