mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 00:04:15 +00:00
More fixes in limits_check (#773)
This commit is contained in:
parent
2f9c9ff6b0
commit
1640220ebf
@ -124,11 +124,11 @@ pub fn write_descriptor_sets(doc: &parse::Spirv) -> String {
|
||||
let num_bindings_in_set_body = {
|
||||
(0 .. num_sets)
|
||||
.map(|set| {
|
||||
let num = 1 +
|
||||
descriptors
|
||||
let num =
|
||||
descriptors
|
||||
.iter()
|
||||
.filter(|d| d.set == set)
|
||||
.fold(0, |s, d| cmp::max(s, d.binding));
|
||||
.fold(0, |s, d| cmp::max(s, 1 + d.binding));
|
||||
format!("{set} => Some({num}),", set = set, num = num)
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
|
@ -34,11 +34,17 @@ pub fn check_desc_against_limits<D>(device: &Device, desc: &D)
|
||||
let mut num_input_attachments = Counter::default();
|
||||
|
||||
for set in 0 .. desc.num_sets() {
|
||||
let num_bindings_in_set = desc.num_bindings_in_set(set)
|
||||
.expect("Wrong implementation of PipelineLayoutDesc");
|
||||
let num_bindings_in_set = match desc.num_bindings_in_set(set) {
|
||||
None => continue,
|
||||
Some(n) => n,
|
||||
};
|
||||
|
||||
for binding in 0 .. num_bindings_in_set {
|
||||
let descriptor = desc.descriptor(set, binding)
|
||||
.expect("Wrong implementation of PipelineLayoutDesc");
|
||||
let descriptor = match desc.descriptor(set, binding) {
|
||||
None => continue,
|
||||
Some(n) => n,
|
||||
};
|
||||
|
||||
num_resources.increment(descriptor.array_count, &descriptor.stages);
|
||||
|
||||
match descriptor.ty.ty().expect("Not implemented yet") { // TODO:
|
||||
|
Loading…
Reference in New Issue
Block a user