ShaderStorageBufferShadow

Represents a shadow interface for managing a shader storage buffer. The shadow allows operations such as uploading, downloading, and releasing resources, as well as providing a means to obtain a writer for structured buffer data manipulation.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard
abstract fun destroy()
Link copied to clipboard
abstract fun download()

Downloads the data from the shader storage buffer to the host. This operation retrieves the current content of the buffer, making it accessible for local processing. Ensure any necessary synchronization is handled to maintain data integrity during the transfer.

Link copied to clipboard
abstract fun reader(): BufferReader

Provides a reader for structured reading of buffer data from the shader storage buffer.

Link copied to clipboard
abstract fun upload(offset: Int = 0, size: Int = shaderStorageBuffer.format.size)

Uploads data to the shader storage buffer. This method allows specifying the offset and size of the data to be uploaded.

Link copied to clipboard
open fun uploadElements(elementOffset: Int = 0, elementCount: Int = shaderStorageBuffer.format.elements.size)
Link copied to clipboard
abstract fun writer(): BufferWriter

Provides a writer for structured manipulation of buffer data in the shader storage buffer.