Trait dacite::VulkanObject
[−]
[src]
pub trait VulkanObject: Sized + Send + Sync + Clone + Debug { type NativeVulkanObject; fn id(&self) -> u64; fn as_native_vulkan_object(&self) -> Self::NativeVulkanObject; fn try_destroy(self) -> Result<(), TryDestroyError<Self>>; }
Associated Types
type NativeVulkanObject
Required Methods
fn id(&self) -> u64
Get the object id.
This function returns the same value as as_native_vulkan_object()
, but conveniently cast
to a u64
. This is useful for extensions like VK_EXT_debug_report
and
VK_EXT_debug_marker
, which use these to refer Vulkan objects.
Object ids (or more correctly, handles) come in two variants, dispatchable and
non-dispatchable. While dispatchable objects are actually pointers, and thus unique,
the same is not true for non-dispatchable objects. For instance, two Semaphore
s, created
independently of each other, might in fact have the same handle.
Additionally, handles of non-dispatchable objects are only ever meaningful, if their type
is known (whether it is i.e. a Semaphore
or some other type). This must be taken into
account, if handles are used to identify Vulkan objects.
Refer to the Vulkan specification (Object Model) for more information.
fn as_native_vulkan_object(&self) -> Self::NativeVulkanObject
fn try_destroy(self) -> Result<(), TryDestroyError<Self>>
Implementors
impl VulkanObject for Buffer type NativeVulkanObject = VkBuffer;
impl VulkanObject for BufferView type NativeVulkanObject = VkBufferView;
impl VulkanObject for CommandBuffer type NativeVulkanObject = VkCommandBuffer;
impl VulkanObject for CommandPool type NativeVulkanObject = VkCommandPool;
impl VulkanObject for DescriptorPool type NativeVulkanObject = VkDescriptorPool;
impl VulkanObject for DescriptorSet type NativeVulkanObject = VkDescriptorSet;
impl VulkanObject for DescriptorSetLayout type NativeVulkanObject = VkDescriptorSetLayout;
impl VulkanObject for Device type NativeVulkanObject = VkDevice;
impl VulkanObject for DeviceMemory type NativeVulkanObject = VkDeviceMemory;
impl VulkanObject for Event type NativeVulkanObject = VkEvent;
impl VulkanObject for Fence type NativeVulkanObject = VkFence;
impl VulkanObject for Framebuffer type NativeVulkanObject = VkFramebuffer;
impl VulkanObject for Image type NativeVulkanObject = VkImage;
impl VulkanObject for ImageView type NativeVulkanObject = VkImageView;
impl VulkanObject for Instance type NativeVulkanObject = VkInstance;
impl VulkanObject for PhysicalDevice type NativeVulkanObject = VkPhysicalDevice;
impl VulkanObject for Pipeline type NativeVulkanObject = VkPipeline;
impl VulkanObject for PipelineCache type NativeVulkanObject = VkPipelineCache;
impl VulkanObject for PipelineLayout type NativeVulkanObject = VkPipelineLayout;
impl VulkanObject for QueryPool type NativeVulkanObject = VkQueryPool;
impl VulkanObject for Queue type NativeVulkanObject = VkQueue;
impl VulkanObject for RenderPass type NativeVulkanObject = VkRenderPass;
impl VulkanObject for Sampler type NativeVulkanObject = VkSampler;
impl VulkanObject for Semaphore type NativeVulkanObject = VkSemaphore;
impl VulkanObject for ShaderModule type NativeVulkanObject = VkShaderModule;
impl VulkanObject for DebugReportCallbackExt type NativeVulkanObject = VkDebugReportCallbackEXT;
impl VulkanObject for DisplayKhr type NativeVulkanObject = VkDisplayKHR;
impl VulkanObject for DisplayModeKhr type NativeVulkanObject = VkDisplayModeKHR;
impl VulkanObject for SurfaceKhr type NativeVulkanObject = VkSurfaceKHR;
impl VulkanObject for SwapchainKhr type NativeVulkanObject = VkSwapchainKHR;