mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-29 10:14:29 +00:00
Merge pull request #133 from attackgoat/master
Added StorageImage as a new descriptor for the pipeline_layout macro.
This commit is contained in:
commit
f32a43330a
@ -130,6 +130,7 @@ macro_rules! pipeline_layout {
|
||||
use $crate::descriptor::pipeline_layout::custom_pipeline_macro::SampledImage;
|
||||
use $crate::descriptor::pipeline_layout::custom_pipeline_macro::DescriptorMarker;
|
||||
use $crate::descriptor::pipeline_layout::custom_pipeline_macro::StorageBuffer;
|
||||
use $crate::descriptor::pipeline_layout::custom_pipeline_macro::StorageImage;
|
||||
use $crate::descriptor::pipeline_layout::custom_pipeline_macro::UniformBuffer;
|
||||
use $crate::descriptor::pipeline_layout::custom_pipeline_macro::InputAttachment;
|
||||
use $crate::descriptor::pipeline_layout::custom_pipeline_macro::ValidParameter;
|
||||
@ -342,6 +343,30 @@ unsafe impl<'a, I> ValidParameter<SampledImage> for &'a Arc<I>
|
||||
}
|
||||
}
|
||||
|
||||
pub struct StorageImage;
|
||||
unsafe impl DescriptorMarker for StorageImage {
|
||||
#[inline]
|
||||
fn descriptor_type() -> DescriptorDescTy {
|
||||
DescriptorDescTy::Image(DescriptorImageDesc {
|
||||
sampled: false,
|
||||
// FIXME: correct values
|
||||
dimensions: DescriptorImageDescDimensions::TwoDimensional,
|
||||
multisampled: false,
|
||||
array_layers: DescriptorImageDescArray::NonArrayed,
|
||||
format: None,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<'a, I> ValidParameter<StorageImage> for &'a Arc<I>
|
||||
where I: ImageView + 'static
|
||||
{
|
||||
#[inline]
|
||||
fn write(&self, binding: u32) -> DescriptorWrite {
|
||||
DescriptorWrite::storage_image(binding, self)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InputAttachment;
|
||||
unsafe impl DescriptorMarker for InputAttachment {
|
||||
#[inline]
|
||||
|
Loading…
Reference in New Issue
Block a user