<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qmemorybarrier.cpp --> <title>QMemoryBarrier Class | Qt 3D 5.9</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.9</td><td ><a href="qt3d-index.html">Qt 3D</a></td><td ><a href="qt3d-cpp.html">C++ Classes</a></td><td >QMemoryBarrier</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#public-types">Public Types</a></li> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#public-slots">Public Slots</a></li> <li class="level1"><a href="#signals">Signals</a></li> <li class="level1"><a href="#protected-functions">Protected Functions</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">QMemoryBarrier Class</h1> <span class="small-subtitle">(<a href="qt3drender-qmemorybarrier.html">Qt3DRender::QMemoryBarrier</a>)<br/></span> <!-- $$$QMemoryBarrier-brief --> <p>Class to emplace a memory barrier <a href="#details">More...</a></p> <!-- @@@QMemoryBarrier --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QMemoryBarrier></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += 3drender</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.9</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiated By:</td><td class="memItemRight bottomAlign"> <a href="qml-qt3d-render-memorybarrier.html">MemoryBarrier</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qt3drender-qframegraphnode.html">Qt3DRender::QFrameGraphNode</a></td></tr></table></div><ul> <li><a href="qt3drender-qmemorybarrier-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-types"></a> <h2 id="public-types">Public Types</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qmemorybarrier.html#Operation-enum">Operation</a></b> { None, ElementArray, Uniform, TextureFetch, ..., All }</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qmemorybarrier.html#Operation-enum">Operations</a></b></td></tr> </table></div> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qmemorybarrier.html#QMemoryBarrier">QMemoryBarrier</a></b>(Qt3DCore::QNode *<i>parent</i> = nullptr)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qmemorybarrier.html#dtor.QMemoryBarrier">~QMemoryBarrier</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> Operations </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qmemorybarrier.html#waitOperations">waitOperations</a></b>() const</td></tr> </table></div> <ul> <li class="fn">1 public function inherited from <a href="qt3drender-qframegraphnode.html#public-functions">Qt3DRender::QFrameGraphNode</a></li> <li class="fn">11 public functions inherited from <a href="qt3dcore-qnode.html#public-functions">Qt3DCore::QNode</a></li> </ul> <a name="public-slots"></a> <h2 id="public-slots">Public Slots</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qmemorybarrier.html#setWaitOperations">setWaitOperations</a></b>(QMemoryBarrier::Operations <i>operations</i>)</td></tr> </table></div> <ul> <li class="fn">3 public slots inherited from <a href="qt3dcore-qnode.html#public-slots">Qt3DCore::QNode</a></li> </ul> <a name="signals"></a> <h2 id="signals">Signals</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qmemorybarrier.html#waitOperationsChanged">waitOperationsChanged</a></b>(QMemoryBarrier::Operations <i>barrierTypes</i>)</td></tr> </table></div> <ul> <li class="fn">4 signals inherited from <a href="qt3dcore-qnode.html#signals">Qt3DCore::QNode</a></li> </ul> <a name="protected-functions"></a> <h2 id="protected-functions">Protected Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qmemorybarrier.html#QMemoryBarrier-1">QMemoryBarrier</a></b>(QMemoryBarrierPrivate &<i>dd</i>, Qt3DCore::QNode *<i>parent</i> = nullptr)</td></tr> </table></div> <ul> <li class="fn">1 protected function inherited from <a href="qt3drender-qframegraphnode.html#protected-functions">Qt3DRender::QFrameGraphNode</a></li> <li class="fn">2 protected functions inherited from <a href="qt3dcore-qnode.html#protected-functions">Qt3DCore::QNode</a></li> </ul> <h3>Additional Inherited Members</h3> <ul> <li class="fn">3 properties inherited from <a href="qt3dcore-qnode.html#properties">Qt3DCore::QNode</a></li> </ul> <a name="details"></a> <!-- $$$QMemoryBarrier-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>Class to emplace a memory barrier</p> <p>A <a href="qt3drender-qmemorybarrier.html">Qt3DRender::QMemoryBarrier</a> 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.</p> <p>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.</p> <p>When a <a href="qt3drender-qmemorybarrier.html">QMemoryBarrier</a> 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.</p> <p>For OpenGL rendering, this page gives more info about the <a href="https://www.opengl.org/wiki/Memory_Model">Memory Model</a></p> </div> <!-- @@@QMemoryBarrier --> <div class="types"> <h2>Member Type Documentation</h2> <!-- $$$Operation$$$None$$$VertexAttributeArray$$$ElementArray$$$Uniform$$$TextureFetch$$$ShaderImageAccess$$$Command$$$PixelBuffer$$$TextureUpdate$$$BufferUpdate$$$FrameBuffer$$$TransformFeedback$$$AtomicCounter$$$ShaderStorage$$$QueryBuffer$$$All --> <h3 class="flags" id="Operation-enum"><a name="Operation-enum"></a>enum QMemoryBarrier::<span class="name">Operation</span><br/>flags QMemoryBarrier::<span class="name">Operations</span></h3> <p>This enum type describes types of buffer to be cleared.</p> <div class="table"><table class="valuelist"><tr><th class="tblConst">Constant</th><th class="tblVal">Value</th></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::None</code></td><td class="topAlign tblval"><code>0</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::ElementArray</code></td><td class="topAlign tblval"><code>( 1<<1 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::Uniform</code></td><td class="topAlign tblval"><code>( 1<<2 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::TextureFetch</code></td><td class="topAlign tblval"><code>( 1<<3 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::ShaderImageAccess</code></td><td class="topAlign tblval"><code>( 1<<4 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::Command</code></td><td class="topAlign tblval"><code>( 1<<5 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::PixelBuffer</code></td><td class="topAlign tblval"><code>( 1<<6 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::TextureUpdate</code></td><td class="topAlign tblval"><code>( 1<<7 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::BufferUpdate</code></td><td class="topAlign tblval"><code>( 1<<8 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::FrameBuffer</code></td><td class="topAlign tblval"><code>( 1<<9 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::TransformFeedback</code></td><td class="topAlign tblval"><code>( 1<<10 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::AtomicCounter</code></td><td class="topAlign tblval"><code>( 1<<11 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::ShaderStorage</code></td><td class="topAlign tblval"><code>( 1<<12 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::QueryBuffer</code></td><td class="topAlign tblval"><code>( 1<<13 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::VertexAttributeArray</code></td><td class="topAlign tblval"><code>( 1<<0 )</code></td></tr> <tr><td class="topAlign"><code>Qt3DRender::QMemoryBarrier::All</code></td><td class="topAlign tblval"><code>0xFFFFFFFF</code></td></tr> </table></div> <p>The Operations type is a typedef for <a href="">QFlags</a><Operation>. It stores an OR combination of Operation values.</p> <!-- @@@Operation --> </div> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QMemoryBarrier[overload1]$$$QMemoryBarrierQt3DCore::QNode* --> <h3 class="fn" id="QMemoryBarrier"><a name="QMemoryBarrier"></a>QMemoryBarrier::<span class="name">QMemoryBarrier</span>(<span class="type">Qt3DCore::QNode</span> *<i>parent</i> = nullptr)</h3> <p>Default constructs an instance of QMemoryBarrier.</p><!-- @@@QMemoryBarrier --> <!-- $$$QMemoryBarrier$$$QMemoryBarrierQMemoryBarrierPrivate&Qt3DCore::QNode* --> <h3 class="fn" id="QMemoryBarrier-1"><a name="QMemoryBarrier-1"></a><code>[protected] </code>QMemoryBarrier::<span class="name">QMemoryBarrier</span>(<span class="type">QMemoryBarrierPrivate</span> &<i>dd</i>, <span class="type">Qt3DCore::QNode</span> *<i>parent</i> = nullptr)</h3> <p>Copy constructor.</p><!-- @@@QMemoryBarrier --> <!-- $$$~QMemoryBarrier[overload1]$$$~QMemoryBarrier --> <h3 class="fn" id="dtor.QMemoryBarrier"><a name="dtor.QMemoryBarrier"></a>QMemoryBarrier::<span class="name">~QMemoryBarrier</span>()</h3> <p>Destroys the instance of QMemoryBarrier.</p><!-- @@@~QMemoryBarrier --> <!-- $$$setWaitOperations[overload1]$$$setWaitOperationsQMemoryBarrier::Operations --> <h3 class="fn" id="setWaitOperations"><a name="setWaitOperations"></a><code>[slot] </code><span class="type">void</span> QMemoryBarrier::<span class="name">setWaitOperations</span>(<span class="type"><a href="qt3drender-qmemorybarrier.html#Operation-enum">QMemoryBarrier::Operations</a></span> <i>operations</i>)</h3> <p><b>See also </b><a href="qt3drender-qmemorybarrier.html#waitOperations">waitOperations</a>().</p> <!-- @@@setWaitOperations --> <!-- $$$waitOperations[overload1]$$$waitOperations --> <h3 class="fn" id="waitOperations"><a name="waitOperations"></a><span class="type"><a href="qt3drender-qmemorybarrier.html#Operation-enum">Operations</a></span> QMemoryBarrier::<span class="name">waitOperations</span>() const</h3> <p><b>See also </b><a href="qt3drender-qmemorybarrier.html#setWaitOperations">setWaitOperations</a>().</p> <!-- @@@waitOperations --> <!-- $$$waitOperationsChanged[overload1]$$$waitOperationsChangedQMemoryBarrier::Operations --> <h3 class="fn" id="waitOperationsChanged"><a name="waitOperationsChanged"></a><code>[signal] </code><span class="type">void</span> QMemoryBarrier::<span class="name">waitOperationsChanged</span>(<span class="type"><a href="qt3drender-qmemorybarrier.html#Operation-enum">QMemoryBarrier::Operations</a></span> <i>barrierTypes</i>)</h3> <!-- @@@waitOperationsChanged --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. </p> </div> </body> </html>