Better error message for unsupported shader features Fixes #869 (#2598)

# Objective

- Provides more useful error messages when using unsupported shader features.

## Solution Fixes #869

- Provided a error message as follows (adding name, set and binding): 
```
Unsupported shader bind type CombinedImageSampler (name noiseVol0, set 0, binding 9)
```
This commit is contained in:
Isaak Eriksson 2021-08-13 22:21:33 +00:00
parent fafee8898e
commit 5eeba1556d

View file

@ -151,7 +151,19 @@ fn reflect_binding(
filtering: true,
},
),
_ => panic!("Unsupported bind type {:?}.", binding.descriptor_type),
_ => {
let ReflectDescriptorBinding {
descriptor_type,
name,
set,
binding,
..
} = binding;
panic!(
"Unsupported shader bind type {:?} (name '{}', set {}, binding {})",
descriptor_type, name, set, binding
);
}
};
let shader_stage = match shader_stage {