Low-level graphics abstraction for Rust. Mostly operates on data, not types. Designed for use by libraries and higher-level abstractions only.
This crate provides a hardware abstraction layer for graphics adapters, for both compute and graphics operations. The API design is heavily inspired by the Vulkan API, and borrows some of the terminology.
Most of the functionality is implemented in separate crates, one for each backend.
This crate only exposes a few generic traits and structures. You can import
all the necessary traits through the
The first step to using
gfx-hal is to initialize one of the available
backends, by creating an
Instance. Then proceed by
enumerating the available
graphics adapters and querying their available
features and queues.
Physical graphics devices.
Logical graphics device.
Universal format specification. Applicable to textures, views, and vertex buffers.
Image related structures.
Types to describe the properties of memory allocated for graphics resources.
Render pass handling.
Prelude module re-exports all the traits necessary to use
Raw Pipeline State Objects
Commands that can be used to record statistics or other useful values as the command buffer is running.
Windowing system interoperability.
Macro for specifying list of specialization constants for
Feature capabilities related to Descriptor Indexing.
Propterties to indicate when the backend does not support full vulkan compliance.
Dynamic pipeline states.
Features that the device supports.
Resource limits of a particular graphics device.
A strongly-typed index to a particular
Resource limits related to the Mesh Shaders.
Features that the device doesn’t support natively, but is able to emulate at some performance cost.
Properties of physical devices that are exposed but do not need to be explicitly opted into.
Resource limits related to the reduction samplers.
Error creating an instance of a backend on the platform that doesn’t support this backend.
Collections of shader features shaders support if they support less than vulkan does.
An enum describing the type of an index value in a slice’s index buffer
Wraps together all the types needed for a graphics backend.
An instantiated backend.
Indirect draw calls count.
Draw number of indices.
Draw number of instances.
Number of tasks.
Draw vertex count.
Draw vertex base offset.
Number of work groups.