@@ -20,7 +20,8 @@ pub const DispatchTable = struct {
2020 createDevice : * const fn (* Self , std.mem.Allocator , * const vk.DeviceCreateInfo ) VkError ! * Device ,
2121 getFormatProperties : * const fn (* Self , vk.Format ) VkError ! vk.FormatProperties ,
2222 getImageFormatProperties : * const fn (* Self , vk.Format , vk.ImageType , vk.ImageTiling , vk.ImageUsageFlags , vk.ImageCreateFlags ) VkError ! vk.ImageFormatProperties ,
23- getSparseImageFormatProperties : * const fn (* Self , vk.Format , vk.ImageType , vk.SampleCountFlags , vk.ImageTiling , vk.ImageUsageFlags , vk.ImageCreateFlags ) VkError ! vk.SparseImageFormatProperties ,
23+ getSparseImageFormatProperties : * const fn (* Self , vk.Format , vk.ImageType , vk.SampleCountFlags , vk.ImageTiling , vk.ImageUsageFlags , ? [* ]vk.SparseImageFormatProperties ) VkError ! u32 ,
24+ getSparseImageFormatProperties2 : ? * const fn (* Self , vk.Format , vk.ImageType , vk.SampleCountFlags , vk.ImageTiling , vk.ImageUsageFlags , ? [* ]vk.SparseImageFormatProperties2 ) VkError ! u32 ,
2425 release : * const fn (* Self , std.mem.Allocator ) VkError ! void ,
2526};
2627
@@ -67,7 +68,7 @@ pub fn getImageFormatProperties(
6768 usage : vk.ImageUsageFlags ,
6869 flags : vk.ImageCreateFlags ,
6970) VkError ! vk.ImageFormatProperties {
70- return try self .dispatch_table .getImageFormatProperties (self , format , image_type , tiling , usage , flags );
71+ return self .dispatch_table .getImageFormatProperties (self , format , image_type , tiling , usage , flags );
7172}
7273
7374pub fn getSparseImageFormatProperties (
@@ -77,9 +78,24 @@ pub fn getSparseImageFormatProperties(
7778 samples : vk.SampleCountFlags ,
7879 tiling : vk.ImageTiling ,
7980 usage : vk.ImageUsageFlags ,
80- flags : vk.ImageCreateFlags ,
81- ) VkError ! vk.SparseImageFormatProperties {
82- return try self .dispatch_table .getSparseImageFormatProperties (self , format , image_type , samples , tiling , usage , flags );
81+ properties : ? [* ]vk.SparseImageFormatProperties ,
82+ ) VkError ! u32 {
83+ return self .dispatch_table .getSparseImageFormatProperties (self , format , image_type , samples , tiling , usage , properties );
84+ }
85+
86+ pub fn getSparseImageFormatProperties2 (
87+ self : * Self ,
88+ format : vk.Format ,
89+ image_type : vk.ImageType ,
90+ samples : vk.SampleCountFlags ,
91+ tiling : vk.ImageTiling ,
92+ usage : vk.ImageUsageFlags ,
93+ properties : ? [* ]vk.SparseImageFormatProperties2 ,
94+ ) VkError ! u32 {
95+ return if (self .dispatch_table .getSparseImageFormatProperties2 ) | pfn |
96+ pfn (self , format , image_type , samples , tiling , usage , properties )
97+ else
98+ 0 ;
8399}
84100
85101pub fn releasePhysicalDevice (self : * Self , allocator : std.mem.Allocator ) VkError ! void {
0 commit comments