Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsgbatchrenderer.cpp File Reference

(b41e8dc8486a2fb312481d3675f04255bc8a1123)

#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)   for (QSGNode *child = NODE->firstChild(); child; child = child->nextSibling())
 
#define SHADOWNODE_TRAVERSE(NODE)   for (Node *child = NODE->firstChild(); child; child = child->sibling())
 
#define QSGNODE_DIRTY_PARENT
 

Functions

QT_BEGIN_NAMESPACE Q_QUICK_EXPORT bool qsg_test_and_clear_material_failure ()
 
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_is_valid (Batch *a, Batch *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)
 
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
 

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; }
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLenum variable
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
#define QT_STRINGIFY(x)

Definition at line 33 of file qsgbatchrenderer.cpp.

◆ QSGNODE_DIRTY_PARENT

#define QSGNODE_DIRTY_PARENT

◆ QSGNODE_TRAVERSE

#define QSGNODE_TRAVERSE ( NODE)    for (QSGNode *child = NODE->firstChild(); child; child = child->nextSibling())

Definition at line 47 of file qsgbatchrenderer.cpp.

◆ SHADOWNODE_TRAVERSE

Function Documentation

◆ qsg_test_and_clear_material_failure()

QT_BEGIN_NAMESPACE Q_QUICK_EXPORT bool qsg_test_and_clear_material_failure ( )

Definition at line 13 of file qsgmaterial.cpp.

References qsg_material_failure.

◆ qt_sg_envInt()

int qt_sg_envInt ( const char * name,
int defaultValue )

Definition at line 24 of file qsgrenderer.cpp.

References ok, Q_LIKELY, qEnvironmentVariableIntValue(), and qEnvironmentVariableIsSet().

Referenced by QSGRhiAtlasTexture::Atlas::Atlas(), QSGRhiAtlasTexture::Manager::Manager(), and QSGBatchRenderer::Renderer::Renderer().

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