Fix number of sets in vulkano-shaders (#764)

This commit is contained in:
tomaka 2017-08-23 18:07:54 +02:00 committed by GitHub
parent 2f2b97e5d5
commit 0f05fc8d57

View File

@ -118,7 +118,7 @@ pub fn write_descriptor_sets(doc: &parse::Spirv) -> String {
.collect::<Vec<_>>()
.concat();
let num_sets = 1 + descriptors.iter().fold(0, |s, d| cmp::max(s, d.set));
let num_sets = descriptors.iter().fold(0, |s, d| cmp::max(s, d.set + 1));
// Writing the body of the `num_bindings_in_set` method.
let num_bindings_in_set_body = {