Struct vulkanite::vk::structs::ImageCreateInfo
source · #[repr(C)]pub struct ImageCreateInfo<'a> {
pub flags: ImageCreateFlags,
pub image_type: ImageType,
pub format: Format,
pub extent: Extent3D,
pub mip_levels: u32,
pub array_layers: u32,
pub samples: SampleCountFlags,
pub tiling: ImageTiling,
pub usage: ImageUsageFlags,
pub sharing_mode: SharingMode,
pub queue_family_index_count: u32,
pub initial_layout: ImageLayout,
/* private fields */
}
Expand description
Fields§
§flags: ImageCreateFlags
§image_type: ImageType
§format: Format
§extent: Extent3D
§mip_levels: u32
§array_layers: u32
§samples: SampleCountFlags
§tiling: ImageTiling
§usage: ImageUsageFlags
§sharing_mode: SharingMode
§queue_family_index_count: u32
§initial_layout: ImageLayout
Implementations§
source§impl<'a> ImageCreateInfo<'a>
impl<'a> ImageCreateInfo<'a>
pub fn flags(self, value: ImageCreateFlags) -> Self
pub fn image_type(self, value: ImageType) -> Self
pub fn format(self, value: Format) -> Self
pub fn extent(self, value: Extent3D) -> Self
pub fn mip_levels(self, value: u32) -> Self
pub fn array_layers(self, value: u32) -> Self
pub fn samples(self, value: SampleCountFlags) -> Self
pub fn tiling(self, value: ImageTiling) -> Self
pub fn usage(self, value: ImageUsageFlags) -> Self
pub fn sharing_mode(self, value: SharingMode) -> Self
pub fn queue_family_index_count(self, value: u32) -> Self
pub fn initial_layout(self, value: ImageLayout) -> Self
pub fn queue_family_indices( self, p_queue_family_indices: impl AsSlice<'a, u32>, ) -> Self
pub fn get_queue_family_indices(&self) -> &'a [u32]
pub fn push_next<T: ExtendingStructure<Self>>(self, ext: &'a mut T) -> Self
Trait Implementations§
source§impl<'a> Default for ImageCreateInfo<'a>
impl<'a> Default for ImageCreateInfo<'a>
source§impl<'a> ExtendableStructure for ImageCreateInfo<'a>
impl<'a> ExtendableStructure for ImageCreateInfo<'a>
const STRUCTURE_TYPE: StructureType = StructureType::ImageCreateInfo
unsafe fn retrieve_next(&self) -> &Cell<*const Header>
source§unsafe fn push_next_unchecked<T: ExtendableStructure>(&self, ext: &T)
unsafe fn push_next_unchecked<T: ExtendableStructure>(&self, ext: &T)
Assuming the current structure chain is the following:
Self -> Ext1 -> Ext2 -> Ext3
calling this function with Ext4 will result in:
Self -> Ext4 -> Ext1 -> Ext2 -> Ext3
This function will never cause cycles in the structure chain
This function is unsafe because it discards the lifetime (ExtendableStructure does not have a lifetime parameter)
Also it does not check that T is a valid extension to be added to Self and only requires references (and not mutable references)
source§fn new_uninit() -> MaybeUninit<Self>
fn new_uninit() -> MaybeUninit<Self>
Return a unitialized structure except the structure type being correctly set
and the p_next pointer being set to null
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for BufferCollectionImageCreateInfoFUCHSIA<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for DedicatedAllocationImageCreateInfoNV<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ExportMetalObjectCreateInfoEXT<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ExternalFormatANDROID<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ExternalFormatQNX<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ExternalMemoryImageCreateInfo<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ExternalMemoryImageCreateInfoNV<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ImageAlignmentControlCreateInfoMESA<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ImageCompressionControlEXT<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ImageDrmFormatModifierExplicitCreateInfoEXT<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ImageDrmFormatModifierListCreateInfoEXT<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ImageFormatListCreateInfo<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ImageStencilUsageCreateInfo<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ImageSwapchainCreateInfoKHR<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ImportMetalIOSurfaceInfoEXT<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for ImportMetalTextureInfoEXT<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for OpaqueCaptureDescriptorDataCreateInfoEXT<'a>
impl<'a, 'b> ExtendingStructure<ImageCreateInfo<'b>> for OpticalFlowImageFormatInfoNV<'a>
impl<'a> Send for ImageCreateInfo<'a>
impl<'a> Sync for ImageCreateInfo<'a>
Auto Trait Implementations§
impl<'a> !Freeze for ImageCreateInfo<'a>
impl<'a> !RefUnwindSafe for ImageCreateInfo<'a>
impl<'a> Unpin for ImageCreateInfo<'a>
impl<'a> !UnwindSafe for ImageCreateInfo<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<H> StructureChainOut<H> for Hwhere
H: ExtendableStructure,
impl<H> StructureChainOut<H> for Hwhere
H: ExtendableStructure,
source§fn setup_uninit(chain: &mut MaybeUninit<H>)
fn setup_uninit(chain: &mut MaybeUninit<H>)
Setup an uninitialized structure chain
After this call, for the structure chain to be initialized, each structure field (with the exception of the structure type
and the p_next pointer) must be initialized (usually by calling the appropriate vulkan command)
The structure type and p_next pointer of each struct are set so that a vulkan commands sees a pointer to the head
as a valid chain containing all structures
Calling setup_uninit should be enough to then call a vulkan command filling this structure chain, moreover after
the call to this vulkan command, the whole structure chain should be considered initialized
source§fn get_uninit_head_ptr(chain: *mut H) -> *mut H
fn get_uninit_head_ptr(chain: *mut H) -> *mut H
Return a mutable pointer to the head structure, which can then be passed to vulkan commands
source§fn setup_cleanup(_: *mut H)
fn setup_cleanup(_: *mut H)
Function to call after a vulkan function initialized this structure to make sure there is no dangling pointer
or anything which could cause undefined behavior