Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsgbatchrenderer.cpp File Reference

(df8e4cdbcd6f5bc5e5bb81d59d561b67ebf1b100)

#include "qsgbatchrenderer_p.h"
#include <qmath.h>
#include <QtCore/QElapsedTimer>
#include <QtCore/QtNumeric>
#include <QtGui/QGuiApplication>
#include <private/qnumeric_p.h>
#include "qsgmaterialshader_p.h"
#include "qsgrhivisualizer_p.h"
#include <algorithm>
#include "moc_qsgbatchrenderer_p.cpp"
Include dependency graph for qsgbatchrenderer.cpp:

Go to the source code of this file.

Classes

struct  QSGBatchRenderer::RenderNodeState

Namespaces

namespace  QSGBatchRenderer

Macros

#define DECLARE_DEBUG_VAR(variable)
#define QSGNODE_TRAVERSE(NODE)
#define SHADOWNODE_TRAVERSE(NODE)
#define QSGNODE_DIRTY_PARENT

Functions

QT_BEGIN_NAMESPACE int qt_sg_envInt (const char *name, int defaultValue)
static int QSGBatchRenderer::size_of_type (int type)
bool QSGBatchRenderer::qsg_sort_element_increasing_order (Element *a, Element *b)
bool QSGBatchRenderer::qsg_sort_element_decreasing_order (Element *a, Element *b)
bool QSGBatchRenderer::qsg_sort_batch_increasing_order (Batch *a, Batch *b)
bool QSGBatchRenderer::qsg_sort_batch_decreasing_order (Batch *a, Batch *b)
static bool QSGBatchRenderer::isTranslate (const QMatrix4x4 &m)
static bool QSGBatchRenderer::isScale (const QMatrix4x4 &m)
static bool QSGBatchRenderer::is2DSafe (const QMatrix4x4 &m)
template<class Int>
Int QSGBatchRenderer::aligned (Int v, Int byteAlign)
QRhiVertexInputAttribute::Format QSGBatchRenderer::qsg_vertexInputFormat (const QSGGeometry::Attribute &a)
static QRhiVertexInputLayout QSGBatchRenderer::calculateVertexInputLayout (const QSGMaterialShader *s, const QSGGeometry *geometry, bool batchable)
QRhiCommandBuffer::IndexFormat QSGBatchRenderer::qsg_indexFormat (const QSGGeometry *geometry)
QRhiGraphicsPipeline::Topology QSGBatchRenderer::qsg_topology (int geomDrawMode, QRhi *rhi)
void QSGBatchRenderer::qsg_setMultiViewFlagsOnMaterial (QSGMaterial *material, int multiViewCount)
void QSGBatchRenderer::qsg_dumpShadowRoots (BatchRootInfo *i, int indent)
void QSGBatchRenderer::qsg_dumpShadowRoots (Node *n)
int QSGBatchRenderer::qsg_positionAttribute (QSGGeometry *g)
static int QSGBatchRenderer::qsg_countNodesInBatch (const Batch *batch)
static int QSGBatchRenderer::qsg_countNodesInBatches (const QDataBuffer< Batch * > &batches)
static void QSGBatchRenderer::qsg_wipeBuffer (Buffer *buffer)
static void QSGBatchRenderer::qsg_wipeBatch (Batch *batch)
static void QSGBatchRenderer::qsg_addOrphanedElements (QDataBuffer< Element * > &orphans, const QDataBuffer< Element * > &renderList)
static void QSGBatchRenderer::qsg_addBackOrphanedElements (QDataBuffer< Element * > &orphans, QDataBuffer< Element * > &renderList)
static int QSGBatchRenderer::qsg_fixIndexCount (int iCount, int drawMode)
static float QSGBatchRenderer::calculateElementZOrder (const Element *e, qreal zRange)
QMatrix4x4 QSGBatchRenderer::qsg_matrixForRoot (Node *node)
static bool QSGBatchRenderer::needsBlendConstant (QRhiGraphicsPipeline::BlendFactor f)
static QRhiSamplerQSGBatchRenderer::newSampler (QRhi *rhi, const QSGSamplerDescription &desc)
static void QSGBatchRenderer::rendererToMaterialGraphicsState (QSGMaterialShader::GraphicsPipelineState *dst, GraphicsState *src)
static void QSGBatchRenderer::materialToRendererGraphicsState (GraphicsState *dst, QSGMaterialShader::GraphicsPipelineState *src)
bool QSGBatchRenderer::operator== (const GraphicsState &a, const GraphicsState &b) noexcept
bool QSGBatchRenderer::operator!= (const GraphicsState &a, const GraphicsState &b) noexcept
size_t QSGBatchRenderer::qHash (const GraphicsState &s, size_t seed) noexcept
bool QSGBatchRenderer::operator== (const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) noexcept
bool QSGBatchRenderer::operator!= (const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) noexcept
size_t QSGBatchRenderer::qHash (const GraphicsPipelineStateKey &k, size_t seed) noexcept
bool QSGBatchRenderer::operator== (const ShaderKey &a, const ShaderKey &b) noexcept
bool QSGBatchRenderer::operator!= (const ShaderKey &a, const ShaderKey &b) noexcept
size_t QSGBatchRenderer::qHash (const ShaderKey &k, size_t seed) noexcept

Variables

QSGMaterial::Flag QSGBatchRenderer::QSGMaterial_FullMatrix = (QSGMaterial::Flag) (QSGMaterial::RequiresFullMatrix & ~QSGMaterial::RequiresFullMatrixExceptTranslate)
const float QSGBatchRenderer::OPAQUE_LIMIT = 0.999f
const uint QSGBatchRenderer::DYNAMIC_VERTEX_INDEX_BUFFER_THRESHOLD = 4
const int QSGBatchRenderer::VERTEX_BUFFER_BINDING = 0
const int QSGBatchRenderer::ZORDER_BUFFER_BINDING = VERTEX_BUFFER_BINDING + 1
const float QSGBatchRenderer::VIEWPORT_MIN_DEPTH = 0.0f
const float QSGBatchRenderer::VIEWPORT_MAX_DEPTH = 1.0f
const quint32 QSGBatchRenderer::DEFAULT_BUFFER_POOL_SIZE_LIMIT = 2 * 1024 * 1024

Macro Definition Documentation

◆ DECLARE_DEBUG_VAR

#define DECLARE_DEBUG_VAR ( variable)
Value:
static bool debug_ ## variable() \
{ static bool value = qgetenv("QSG_RENDERER_DEBUG").contains(QT_STRINGIFY(variable)); return value; }
bool contains(char c) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qbytearray.h:689
EGLOutputLayerEXT EGLint EGLAttrib value
[3]
GLenum GLenum variable
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
#define QT_STRINGIFY(x)

Definition at line 29 of file qsgbatchrenderer.cpp.

◆ QSGNODE_DIRTY_PARENT

#define QSGNODE_DIRTY_PARENT

◆ QSGNODE_TRAVERSE

#define QSGNODE_TRAVERSE ( NODE)
Value:
for (QSGNode *child = NODE->firstChild(); child; child = child->nextSibling())
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
Definition qsgnode.h:37
QLayoutItem * child
[0]

Definition at line 44 of file qsgbatchrenderer.cpp.

◆ SHADOWNODE_TRAVERSE

#define SHADOWNODE_TRAVERSE ( NODE)
Value:
for (Node *child = NODE->firstChild(); child; child = child->sibling())
The Node class is the base class for all the nodes in QDoc's parse tree.

Definition at line 45 of file qsgbatchrenderer.cpp.

Function Documentation

◆ qt_sg_envInt()

QT_BEGIN_NAMESPACE int qt_sg_envInt ( const char * name,
int defaultValue )

Definition at line 24 of file qsgrenderer.cpp.

Referenced by QSGRhiAtlasTexture::Atlas::Atlas().

Here is the caller graph for this function: