[−][src]Macro nobs_vkpipes_macro::pipeline
pipeline!() { /* proc-macro */ }
Generates code for a pipeline
A pipeline can be configured by a comma separated list of fields, described in the table below:
specifier | type | mandatory | description | example |
---|---|---|---|---|
stage | {...} | yes | Specifies a shader stage with parameters. Can be used multiple times to specify multiple stages. | see shader |
include | [str] | no | List of strings specifying include directories for the compilation of glsl shader files. Include directories defined in the pipeline are used for all stages. | include = ["src/global", "src/util"] |
dset_name[i32] | [str] | no | Rename descriptor set with index 0. Since we can not specify descriptor set names in glsl, they are enumerated with Dset0, Dset1, Dset2.. if no name is specified for a descriptor set index. | dset_name[0] = "per_frame" |
vk_alias | str | no | Alias of the import of the nobs-vk crate. Set to "vk" by default. | vk_alias = "othervk" |
vkpipes_alias | str | no | Alias of the import of the nobs-vkpipes crate. Set to "vk::pipes" by default. | vkpipes_alias = "otherpipes" |
dump | str | no | Filename to which the output of the code generation will be written. | dump = "dump/my_pipeline.rs" |
The fields 'vk_alias' and 'vkpipes_alias' are important, if this crate is not used in conjuction with either of the vulkanism crates and if the nobs-vkpipes crate was imported with an alias e.g.: 'extern crate nobs-vkpipes as pipes;'. In these cases the code generation can not resolve the dependencies for the generated module code.
See the module level documentation for a complete example