Crate vulkanology [−] [src]
This crate provides macros for writing simple vulkan compute shader tests
using the tomaka/
A core problem of developing shaders is the rather difficult environment in which they are
executed. Even simple things can go wrong and cost the developer a lot of time to fix.
This crate aims at providing a simple-to-use environment for writing vulkan compute shader tests.
It uses the
vulkano rust-vulkan bindings end exports macros for a fast implementation of tests.
These macros mostly generate
vulkano boilerplate instantiation code. The interface to the
shader are CPU accessible buffers which you can read and write at will and a function for
executing the shader code and waiting for the result.
Due to the reexport of utility function from the
vulkano crate (which you don't need to access,
unless you want to) you need to use the following crates in your test module header:
#[macro_use] extern crate vulkano; #[macro_use] extern crate vulkanology;
For basic usage of the library you can refer to the doc-tests and
For a working example of a fairly elaborate shader test please refer to:
This utility pack is built around the
vulkano library, which also provides
a library which compiles GLSL shaders into Rust interface modules.
For examples on how to build shaders with
build.rs and this.
vulkanology also provides some build utilities for working with segmented shaders.
src/build_utils.rs contains working examples on how to use these utilities in your
This module exports shader building tools which simplify the test shader building process.
Creates a new uninitialized buffer of type
A simple macro for generating the build code which concatenates the correct test shader segments.
This macro is the core of the shader-testing framework.
It generates code for initializing the vulkano environment,