CommandBuffer
- class lluvia.core.CommandBuffer
- begin()
Begin recording.
This method should be called before any record operation. Otherwise the behaviour is undefined.
- changeImageLayout()
Changes image layout.
The actual change in image layout is performed when this command buffer is submitted to execution. However, calling image.getLayout() right after this call will return the new layout value.
This is necessary to keep track of the current image layout of p image parameter after this call.
Parameters
- imgImage.
The image.
- newLayoutlluvia.ImageLayout.
The new layout. Its value must be one of the values defined in lluvia.ImageLayout:
Undefined
General
ShaderReadOnlyOptimal
TransferSrcOptimal
TransferDstOptimal
Preinitialized
- clearImage()
Clears the pixels of the image to zero.
- copyBuffer()
Copies src buffer to dst.
The parameters must satisfy dst.size >= src.size.
Parameters
- srcBuffer.
Source buffer.
- dstBuffer.
Destination buffer.
Raises
RuntimeError : if dst.size < src.size
- copyBufferToImage()
Copies the content of src Buffer to dst Image
No size check is currently being tested.
Parameters
- srcBuffer.
Source Buffer.
- dstImage.
Source Image.
- copyImageToBuffer()
Copies the content of src Image to dst Buffer.
Parameters
- srcImage.
Source image.
- dstBuffer.
Destination buffer.
- copyImageToImage()
Copies the content of src Image to dst Image.
The image parameters must be in the following layouts:
src: TransferSrcOptimal
dst: TransferDstOptimal
This method does not check if the images are in the correct layout. The results are undefined if the images are in any other layout.
Parameters
- srcImage.
Source image.
- dstImage.
Destination buffer.
- durationEnd()
Stops recording the elapsed time between two points.
Parameters
- dDuration.
The duration object.
- durationStart()
Starts recording the elapsed time between two points.
Parameters
- dDuration.
The duration object.
- end()
Ends recording.
Any following call to recording methods after this call have undefined behavior.
- memoryBarrier()
Inserts a memory barrier.
TODO: details.
- run()
Records running a compute or container node.
Parameters
- nodeComputeNode or ContainerNode.
The node to run.
- session