Implement hash for core types

This commit is contained in:
hodasemi 2023-11-30 15:40:01 +01:00
parent 42900dab46
commit 54ab11e461
2 changed files with 32 additions and 32 deletions

View file

@ -1,124 +1,124 @@
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkBuffer(u64);
SetupU64Conv!(VkBuffer);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkBufferView(u64);
SetupU64Conv!(VkBufferView);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkCommandBuffer(usize);
SetupUSizeConv!(VkCommandBuffer);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkCommandPool(u64);
SetupU64Conv!(VkCommandPool);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkDescriptorPool(u64);
SetupU64Conv!(VkDescriptorPool);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkDescriptorSet(u64);
SetupU64Conv!(VkDescriptorSet);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkDescriptorSetLayout(u64);
SetupU64Conv!(VkDescriptorSetLayout);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkDevice(usize);
SetupUSizeConv!(VkDevice);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkDeviceMemory(u64);
SetupU64Conv!(VkDeviceMemory);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkEvent(u64);
SetupU64Conv!(VkEvent);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkFence(u64);
SetupU64Conv!(VkFence);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkFramebuffer(u64);
SetupU64Conv!(VkFramebuffer);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkImage(u64);
SetupU64Conv!(VkImage);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkImageView(u64);
SetupU64Conv!(VkImageView);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkInstance(usize);
SetupUSizeConv!(VkInstance);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkPhysicalDevice(usize);
SetupUSizeConv!(VkPhysicalDevice);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkPipeline(u64);
SetupU64Conv!(VkPipeline);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkPipelineCache(u64);
SetupU64Conv!(VkPipelineCache);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkPipelineLayout(u64);
SetupU64Conv!(VkPipelineLayout);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkQueryPool(u64);
SetupU64Conv!(VkQueryPool);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkQueue(usize);
SetupUSizeConv!(VkQueue);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkRenderPass(u64);
SetupU64Conv!(VkRenderPass);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkSampler(u64);
SetupU64Conv!(VkSampler);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkSemaphore(u64);
SetupU64Conv!(VkSemaphore);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkShaderModule(u64);
SetupU64Conv!(VkShaderModule);

View file

@ -1,34 +1,34 @@
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkDescriptorUpdateTemplateKHR(u64);
SetupU64Conv!(VkDescriptorUpdateTemplateKHR);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkDisplayKHR(u64);
SetupU64Conv!(VkDisplayKHR);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkDisplayModeKHR(u64);
SetupU64Conv!(VkDisplayModeKHR);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkSurfaceKHR(u64);
SetupU64Conv!(VkSurfaceKHR);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkSwapchainKHR(u64);
SetupU64Conv!(VkSwapchainKHR);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkAccelerationStructureKHR(u64);
SetupU64Conv!(VkAccelerationStructureKHR);
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VkDeferredOperationKHR(u64);
SetupU64Conv!(VkDeferredOperationKHR);