Class to emplace a memory barrier 更多...
头: | #include <QMemoryBarrier> |
qmake: | QT += 3drender |
Since: | Qt 5.9 |
实例化: | MemoryBarrier |
继承: | Qt3DRender::QFrameGraphNode |
enum | Operation { None, ElementArray, Uniform, TextureFetch, ..., All } |
flags | Operations |
QMemoryBarrier (Qt3DCore::QNode * parent = nullptr) | |
~QMemoryBarrier () | |
操作 | waitOperations () const |
void | setWaitOperations (QMemoryBarrier::Operations operations ) |
void | waitOperationsChanged (QMemoryBarrier::Operations barrierTypes ) |
QMemoryBarrier (QMemoryBarrierPrivate & dd , Qt3DCore::QNode * parent = nullptr) |
Class to emplace a memory barrier
A Qt3DRender::QMemoryBarrier FrameGraph 节点用于在特定渲染时,安放特定内存屏障。这要求在 GPU 正确同步绘制和计算命令。
屏障定义由先前命令,发出的内存操作次序。这意味着,若 command1 正操纵将紧跟 command2 之后用作顶点属性缓冲的缓冲,那么内存屏障应放置在 command1 之后并为顶点属性缓冲设置合适屏障类型。
当 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.
对于 OpenGL 渲染,此页给出更多信息关于 内存模型
此枚举类型描述要清零的缓冲类型。
常量 | 值 |
---|---|
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
|
Operations 类型是 typedef 对于 QFlags <Operation>。它存储 Operation 值的 OR 组合。
Default constructs an instance of QMemoryBarrier.
[protected]
QMemoryBarrier::
QMemoryBarrier
(
QMemoryBarrierPrivate
&
dd
,
Qt3DCore::QNode
*
parent
= nullptr)
Copy constructor.
Destroys the instance of QMemoryBarrier.
[slot]
void
QMemoryBarrier::
setWaitOperations
(
QMemoryBarrier::Operations
operations
)
另请参阅 waitOperations ().
另请参阅 setWaitOperations ().
[signal]
void
QMemoryBarrier::
waitOperationsChanged
(
QMemoryBarrier::Operations
barrierTypes
)