QWaitFence¶
FrameGraphNode used to wait for a fence in the graphics command stream to become signaled. More…
New in version 5.13.
Synopsis¶
Functions¶
def
handle
()def
handleType
()def
setHandle
(handle)def
setHandleType
(type)def
setTimeout
(timeout)def
setWaitOnCPU
(waitOnCPU)def
timeout
()def
waitOnCPU
()
Signals¶
def
handleChanged
(handle)def
handleTypeChanged
(handleType)def
timeoutChanged
(timeoutChanged)def
waitOnCPUChanged
(waitOnCPU)
Detailed Description¶
Fence allow to synchronosize GPU and CPU workloads. GPU commands usually are non-blocking. When issued, commands are inserted in command buffers which will be read at a later time by the GPU. In some cases, you want to continue processing or issue specific command only when you are sure a command has been executed by the hardware. Fences are a way to do so. This is especially important when using 3rd party engines with Qt3D, Qt3D should only access shared resources when we know the other engine command are done modifying the resource.
QWaitFence
is a FrameGraph node that will force to wait for it to become signaled before subsequent commands are inserted into the command stream. It can then be used in conjunction withQSetFence
and contains properties to configure how long it should wait and whether it should block on the CPU side.Note
Qt 3D uploads GPU resources (Texture, Shaders, Buffers) before issuing draw calls.
- class PySide2.Qt3DRender.Qt3DRender.QWaitFence([parent=None])¶
- Parameters:
parent –
PySide2.Qt3DCore.Qt3DCore.QNode
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.HandleType¶
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.handle()¶
- Return type:
object
Holds the underlying fence handle wrapped in a
QVariant
.
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.handleChanged(handle)¶
- Parameters:
handle – object
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.handleType()¶
- Return type:
Specifies the type of handle being used. Currently only OpenGL Fence ids are supported.
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.handleTypeChanged(handleType)¶
- Parameters:
handleType –
HandleType
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.setHandle(handle)¶
- Parameters:
handle – object
Holds the underlying fence handle wrapped in a
QVariant
.
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.setHandleType(type)¶
- Parameters:
type –
HandleType
Specifies the type of handle being used. Currently only OpenGL Fence ids are supported.
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.setTimeout(timeout)¶
- Parameters:
timeout – int
Specifies the maximum amount of time in nanoseconds to wait for the fence to become signaled.
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.setWaitOnCPU(waitOnCPU)¶
- Parameters:
waitOnCPU – bool
Specifies whether the CPU should be block while waiting for the fence to become signaled. This is false by default.
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.timeout()¶
- Return type:
int
Specifies the maximum amount of time in nanoseconds to wait for the fence to become signaled.
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.timeoutChanged(timeoutChanged)¶
- Parameters:
timeoutChanged – int
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.waitOnCPU()¶
- Return type:
bool
Specifies whether the CPU should be block while waiting for the fence to become signaled. This is false by default.
- PySide2.Qt3DRender.Qt3DRender.QWaitFence.waitOnCPUChanged(waitOnCPU)¶
- Parameters:
waitOnCPU – bool
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. 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.