Defines of a graphics library backend. More...
#include <kanzi/gfx/abstract_backend.hpp>
Defines of a graphics library backend.
Implement this interface to create a custom graphics backend. All methods on this interface, except for initialization and shutdown, must be thread-safe with other methods.
|
default |
Constructor.
|
virtualdefault |
Destructor.
|
delete |
|
deletenoexcept |
|
delete |
|
deletenoexcept |
|
pure virtual |
Initializes the backend.
Must be called before any other call to the backend.
| info | The graphics common initialization information. |
Implemented in kanzi::gfx::BackendLayer.
Prepares for backend shutdown.
Kanzi calls prepareForShutdown() at the beginning of gfx::shutdown() to give an opportunity to prepare the backend for the shutdown operation. For example, ensuring that any resources used by the backend are not in current use.
Implemented in kanzi::gfx::BackendLayer.
Shuts down the backend and frees any resources.
Implemented in kanzi::gfx::BackendLayer.
Cleans up thread specific resources for threads that do not call shutdown().
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets the current backend information.
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Returns whether a shader format is supported by the current backend and device.
| format | The shader format. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Returns whether a native handle type for texture is supported by the current backend.
| handle | The native texture handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets the AttachmentDescriptionSet for the requested FrameBuffer.
| handle | The FrameBuffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Updates the Surface dimensions.
Notifies the backend that a resize has occurred.
| handle | the FrameBuffer handle. |
| dimensions | The dimensions. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Waits for a GPU fence to be signaled.
| handle | The GPU fence handle. |
| timeout | The time in nanoseconds to wait before timing out. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Resets the signal state of a GPU fence.
| handle | The GPU fence handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Maps a buffer into CPU-accessible memory.
A buffer can have only one mapping at a time.
| handle | The buffer handle. |
| offset | An offset to the subregion to map. |
| size | The size of the subregion to map. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Unmaps a previously mapped buffer.
| handle | The buffer handle. |
| updatedRanges | The ranges of the buffer that were updated. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets the device address of a buffer for use with shader buffer device address.
Returns 0 if unsupported.
| handle | The buffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets a device property value.
| property | The DevicePropertyId to query. |
Implemented in kanzi::gfx::BackendLayer.
Returns whether a graphics feature is enabled on the current device.
| feature | The FeatureId to query. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets device feature flags for a format.
| format | The image format. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Allocates memory from the end of a command buffer.
| buffer | The command buffer handle. |
| size | The size in bytes to allocate. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Peeks at the currently allocated memory inside a command buffer.
| handle | The command buffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Processes the commands in the command buffer.
When the processing completes, calls the callback function. This is an asynchronous operation and can be incomplete when this function returns.
| commands | The command buffer handle. |
| callback | The backend calls this callback when command processing is complete. The callback must be callable from any thread. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets the status of a shader object.
| handle | The shader handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets the status of a render pipeline object.
| handle | The render pipeline handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Reads query results from a pool.
External synchronization is required to ensure results are ready.
| handle | Query pool handle. |
| first | First query to read. |
| results | Reserved space for read data. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a buffer object.
| createInfo | Creation parameters for the buffer object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates an image object.
| createInfo | Creation parameters for the image object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a frame buffer object.
| createInfo | Creation parameters for the frame buffer object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a vertex input state object.
| createInfo | Creation parameters for the vertex input state object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a depth stencil state object.
| createInfo | Creation parameters for the depth stencil state object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a blend state object.
| createInfo | Creation parameters for the blend state object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a raster state object.
| createInfo | Creation parameters for the raster state object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a render resource set object.
| createInfo | Creation parameters for the render resource set object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a compute resource set object.
| createInfo | Creation parameters for the compute resource set object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a sampler object.
| createInfo | Creation parameters for the sampler object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a shader object.
| createInfo | Creation parameters for the shader object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a compute pipeline object.
| createInfo | Creation parameters for the compute pipeline object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a render pipeline object.
| createInfo | Creation parameters for the render pipeline object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a render pass object.
| createInfo | Creation parameters for the render pass object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a command buffer object.
| createInfo | Creation parameters for the command buffer object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a GPU fence object.
| createInfo | Creation parameters for the GPU fence object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a GPU query pool object.
| createInfo | Creation parameters for the GPU query pool object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a top level acceleration structure object.
| createInfo | Creation parameters for the top level acceleration structure object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a bottom level acceleration structure object.
| createInfo | Creation parameters for the bottom level acceleration structure object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a gpu scene object.
| createInfo | Creation parameters for the gpu scene object. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a buffer handle.
| handle | The buffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from an image handle.
| handle | The image handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a frame buffer handle.
| handle | The frame buffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a vertex input state handle.
| handle | The vertex input state handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a depth stencil state handle.
| handle | The depth stencil state handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a blend state handle.
| handle | The blend state handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a raster state handle.
| handle | The raster state handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a render resource set handle.
| handle | The render resource set handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a compute resource set handle.
| handle | The compute resource set handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a sampler handle.
| handle | The sampler handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a shader handle.
| handle | The shader handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a compute pipeline handle.
| handle | The compile pipeline handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a render pipeline handle.
| handle | The render pipeline handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a render pass handle.
| handle | The render pass handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a command buffer handle.
| handle | The command buffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a GPU fence handle.
| handle | The GPU fence handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a GPU query pool handle.
| handle | The GPU query pool handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a top level acceleration structure handle.
| handle | The top level acceleration structure handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a bottom level acceleration structure handle.
| handle | The bottom level acceleration structure handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a gpu scene handle.
| handle | The gpu scene handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The buffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The image handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The frame buffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The vertex input state handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The depth stencil state handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The blend state handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The raster state handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The render resource set handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The compute resource set handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The sampler handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The shader handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The compute pipeline handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The render pipeline handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The render pass handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The command buffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The GPU fence handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a query pool object.
| handle | The GPU query pool handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a top level acceleration structure object.
| handle | The acceleration structure handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a bottom level acceleration structure object.
| handle | The acceleration structure handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a gpu scene object.
| handle | The gpu scene handle. |
Implemented in kanzi::gfx::BackendLayer.