Crate spirv_std_macros
source ·Expand description
spirv-std-macros
This crate implements macros required for spirv-std
. Most importantly, it implements the #![spirv(..)]
attribute macro required for use in shader code. Please refer to spirv-std
for more information.
Macros
- A macro for creating SPIR-V
OpTypeImage
types. Always produces aspirv_std::image::Image<...>
type. - Print a formatted string with a newline using the debug printf extension.
- Similar to
debug_printf
but appends a newline to the format string.
Attribute Macros
- Marks a function as runnable only on the GPU, and will panic on CPU platforms.
- Replaces all (nested) occurrences of the
#[spirv(..)]
attribute with#[cfg_attr(target_arch="spirv", rust_gpu::spirv(..))]
.