2023-12-12 19:02:49 -05:00
|
|
|
use librashader_reflect::reflect::semantics::BindingStage;
|
2023-12-16 20:28:41 +09:00
|
|
|
use wgpu::ShaderStages;
|
2023-12-12 19:02:49 -05:00
|
|
|
|
|
|
|
pub fn binding_stage_to_wgpu_stage(stage_mask: BindingStage) -> ShaderStages {
|
|
|
|
let mut mask = ShaderStages::empty();
|
|
|
|
if stage_mask.contains(BindingStage::VERTEX) {
|
|
|
|
mask |= ShaderStages::VERTEX;
|
|
|
|
}
|
|
|
|
|
|
|
|
if stage_mask.contains(BindingStage::FRAGMENT) {
|
|
|
|
mask |= ShaderStages::FRAGMENT;
|
|
|
|
}
|
|
|
|
|
|
|
|
mask
|
2023-12-16 20:28:41 +09:00
|
|
|
}
|