QMemoryBarrier Class
(Qt3DRender::QMemoryBarrier)Class to emplace a memory barrier 更多...
头文件: | #include <QMemoryBarrier> |
qmake: | QT += 3drender |
开始支持版本: | Qt 5.9 |
Instantiated By: | MemoryBarrier |
基类: | Qt3DRender::QFrameGraphNode |
公有类型
enum | Operation { None, ElementArray, Uniform, TextureFetch, ..., All } |
flags | Operations |
公有函数
QMemoryBarrier(Qt3DCore::QNode *parent = nullptr) | |
~QMemoryBarrier() | |
Operations | waitOperations() const |
- 1 个公有函数继承自 Qt3DRender::QFrameGraphNode
- 11 个公有函数继承自 Qt3DCore::QNode
- 32 个公有函数继承自 QObject
公有槽函数
void | setWaitOperations(QMemoryBarrier::Operations operations) |
- 3 个公有槽函数继承自 Qt3DCore::QNode
- 1 个公有槽函数继承自 QObject
信号
void | waitOperationsChanged(QMemoryBarrier::Operations barrierTypes) |
- 4 个信号继承自 Qt3DCore::QNode
- 2 个信号继承自 QObject
受保护的函数
QMemoryBarrier(QMemoryBarrierPrivate &dd, Qt3DCore::QNode *parent = nullptr) |
- 1 个受保护的函数继承自 Qt3DRender::QFrameGraphNode
- 2 个受保护的函数继承自 Qt3DCore::QNode
- 9 个受保护的函数继承自 QObject
其他继承的成员
- 3 个属性继承自 Qt3DCore::QNode
- 1 个属性继承自 QObject
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
Class to emplace a memory barrier
A Qt3DRender::QMemoryBarrier FrameGraph node is used to emplace a specific memory barrier at a specific time of the rendering. This is required to properly synchronize drawing and compute commands on the GPU.
The barrier defines the ordering of memory operations issued by a prior command. This means that if command1 is manipulating a buffer that is to be used as a vertex attribute buffer in a following command2, then the memory barrier should be placed after command1 and setting the appropriate barrier type for vertex attribute buffer.
When a QMemoryBarrier node is found in a FrameGraph branch, the barrier will be enforced prior to any draw or compute command even if these are defined deeper in the branch.
For OpenGL rendering, this page gives more info about the Memory Model
成员类型
enum QMemoryBarrier::Operation
flags QMemoryBarrier::Operations
This enum type describes types of buffer to be cleared.
Constant | Value |
---|---|
Qt3DRender::QMemoryBarrier::None | 0 |
Qt3DRender::QMemoryBarrier::ElementArray | ( 1<<1 ) |
Qt3DRender::QMemoryBarrier::Uniform | ( 1<<2 ) |
Qt3DRender::QMemoryBarrier::TextureFetch | ( 1<<3 ) |
Qt3DRender::QMemoryBarrier::ShaderImageAccess | ( 1<<4 ) |
Qt3DRender::QMemoryBarrier::Command | ( 1<<5 ) |
Qt3DRender::QMemoryBarrier::PixelBuffer | ( 1<<6 ) |
Qt3DRender::QMemoryBarrier::TextureUpdate | ( 1<<7 ) |
Qt3DRender::QMemoryBarrier::BufferUpdate | ( 1<<8 ) |
Qt3DRender::QMemoryBarrier::FrameBuffer | ( 1<<9 ) |
Qt3DRender::QMemoryBarrier::TransformFeedback | ( 1<<10 ) |
Qt3DRender::QMemoryBarrier::AtomicCounter | ( 1<<11 ) |
Qt3DRender::QMemoryBarrier::ShaderStorage | ( 1<<12 ) |
Qt3DRender::QMemoryBarrier::QueryBuffer | ( 1<<13 ) |
Qt3DRender::QMemoryBarrier::VertexAttributeArray | ( 1<<0 ) |
Qt3DRender::QMemoryBarrier::All | 0xFFFFFFFF |
The Operations type is a typedef for QFlags<Operation>. It stores an OR combination of Operation values.
成员函数
QMemoryBarrier::QMemoryBarrier(Qt3DCore::QNode *parent = nullptr)
Default constructs an instance of QMemoryBarrier.
[protected]
QMemoryBarrier::QMemoryBarrier(QMemoryBarrierPrivate &dd, Qt3DCore::QNode *parent = nullptr)
Copy constructor.
QMemoryBarrier::~QMemoryBarrier()
Destroys the instance of QMemoryBarrier.
[slot]
void QMemoryBarrier::setWaitOperations(QMemoryBarrier::Operations operations)
参见 waitOperations().
Operations QMemoryBarrier::waitOperations() const
参见 setWaitOperations().