From 02e5523774b104866e502e706141ae1a468183e6 Mon Sep 17 00:00:00 2001 From: Ioannis Tsakpinis Date: Sun, 14 Nov 2021 21:55:22 +0200 Subject: [PATCH] feat(vma): update to latest version --- .../lwjgl/util/vma/VmaVulkanFunctions.java | 30 +++++++++++-------- modules/lwjgl/vma/src/main/c/vk_mem_alloc.h | 4 +++ .../vma/src/templates/kotlin/vma/VMATypes.kt | 26 +++++++++++++--- 3 files changed, 44 insertions(+), 16 deletions(-) diff --git a/modules/lwjgl/vma/src/generated/java/org/lwjgl/util/vma/VmaVulkanFunctions.java b/modules/lwjgl/vma/src/generated/java/org/lwjgl/util/vma/VmaVulkanFunctions.java index 0c7ca2fc16..e7fd0a7af1 100644 --- a/modules/lwjgl/vma/src/generated/java/org/lwjgl/util/vma/VmaVulkanFunctions.java +++ b/modules/lwjgl/vma/src/generated/java/org/lwjgl/util/vma/VmaVulkanFunctions.java @@ -44,10 +44,10 @@ * PFN_vkCreateImage vkCreateImage; * PFN_vkDestroyImage vkDestroyImage; * PFN_vkCmdCopyBuffer vkCmdCopyBuffer; - * PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR; - * PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR; - * PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR; - * PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR; + * PFN_vkGetBufferMemoryRequirements2KHR {@link #vkGetBufferMemoryRequirements2KHR}; + * PFN_vkGetImageMemoryRequirements2KHR {@link #vkGetImageMemoryRequirements2KHR}; + * PFN_vkBindBufferMemory2KHR {@link #vkBindBufferMemory2KHR}; + * PFN_vkBindImageMemory2KHR {@link #vkBindImageMemory2KHR}; * PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR; * } */ @@ -201,16 +201,22 @@ public VmaVulkanFunctions(ByteBuffer container) { /** @return the value of the {@code vkCmdCopyBuffer} field. */ @NativeType("PFN_vkCmdCopyBuffer") public long vkCmdCopyBuffer() { return nvkCmdCopyBuffer(address()); } - /** @return the value of the {@code vkGetBufferMemoryRequirements2KHR} field. */ + /** + * {@code vkGetBufferMemoryRequirements2} on Vulkan ≥ 1.1, {@code vkGetBufferMemoryRequirements2KHR} when using {@code VK_KHR_dedicated_allocation} + * extension. + */ @NativeType("PFN_vkGetBufferMemoryRequirements2KHR") public long vkGetBufferMemoryRequirements2KHR() { return nvkGetBufferMemoryRequirements2KHR(address()); } - /** @return the value of the {@code vkGetImageMemoryRequirements2KHR} field. */ + /** + * {@code vkGetImageMemoryRequirements2} on Vulkan ≥ 1.1, {@code vkGetImageMemoryRequirements2KHR} when using {@code VK_KHR_dedicated_allocation} + * extension. + */ @NativeType("PFN_vkGetImageMemoryRequirements2KHR") public long vkGetImageMemoryRequirements2KHR() { return nvkGetImageMemoryRequirements2KHR(address()); } - /** @return the value of the {@code vkBindBufferMemory2KHR} field. */ + /** {@code vkBindBufferMemory2} on Vulkan ≥ 1.1, {@code vkBindBufferMemory2KHR} when using {@code VK_KHR_bind_memory2} extension. */ @NativeType("PFN_vkBindBufferMemory2KHR") public long vkBindBufferMemory2KHR() { return nvkBindBufferMemory2KHR(address()); } - /** @return the value of the {@code vkBindImageMemory2KHR} field. */ + /** {@code vkBindImageMemory2} on Vulkan ≥ 1.1, {@code vkBindImageMemory2KHR} when using {@code VK_KHR_bind_memory2} extension. */ @NativeType("PFN_vkBindImageMemory2KHR") public long vkBindImageMemory2KHR() { return nvkBindImageMemory2KHR(address()); } /** @return the value of the {@code vkGetPhysicalDeviceMemoryProperties2KHR} field. */ @@ -251,13 +257,13 @@ public VmaVulkanFunctions(ByteBuffer container) { public VmaVulkanFunctions vkDestroyImage(@NativeType("PFN_vkDestroyImage") long value) { nvkDestroyImage(address(), value); return this; } /** Sets the specified value to the {@code vkCmdCopyBuffer} field. */ public VmaVulkanFunctions vkCmdCopyBuffer(@NativeType("PFN_vkCmdCopyBuffer") long value) { nvkCmdCopyBuffer(address(), value); return this; } - /** Sets the specified value to the {@code vkGetBufferMemoryRequirements2KHR} field. */ + /** Sets the specified value to the {@link #vkGetBufferMemoryRequirements2KHR} field. */ public VmaVulkanFunctions vkGetBufferMemoryRequirements2KHR(@NativeType("PFN_vkGetBufferMemoryRequirements2KHR") long value) { nvkGetBufferMemoryRequirements2KHR(address(), value); return this; } - /** Sets the specified value to the {@code vkGetImageMemoryRequirements2KHR} field. */ + /** Sets the specified value to the {@link #vkGetImageMemoryRequirements2KHR} field. */ public VmaVulkanFunctions vkGetImageMemoryRequirements2KHR(@NativeType("PFN_vkGetImageMemoryRequirements2KHR") long value) { nvkGetImageMemoryRequirements2KHR(address(), value); return this; } - /** Sets the specified value to the {@code vkBindBufferMemory2KHR} field. */ + /** Sets the specified value to the {@link #vkBindBufferMemory2KHR} field. */ public VmaVulkanFunctions vkBindBufferMemory2KHR(@NativeType("PFN_vkBindBufferMemory2KHR") long value) { nvkBindBufferMemory2KHR(address(), value); return this; } - /** Sets the specified value to the {@code vkBindImageMemory2KHR} field. */ + /** Sets the specified value to the {@link #vkBindImageMemory2KHR} field. */ public VmaVulkanFunctions vkBindImageMemory2KHR(@NativeType("PFN_vkBindImageMemory2KHR") long value) { nvkBindImageMemory2KHR(address(), value); return this; } /** Sets the specified value to the {@code vkGetPhysicalDeviceMemoryProperties2KHR} field. */ public VmaVulkanFunctions vkGetPhysicalDeviceMemoryProperties2KHR(@NativeType("PFN_vkGetPhysicalDeviceMemoryProperties2KHR") long value) { nvkGetPhysicalDeviceMemoryProperties2KHR(address(), value); return this; } diff --git a/modules/lwjgl/vma/src/main/c/vk_mem_alloc.h b/modules/lwjgl/vma/src/main/c/vk_mem_alloc.h index 5b3506acbe..9d576d1dd6 100644 --- a/modules/lwjgl/vma/src/main/c/vk_mem_alloc.h +++ b/modules/lwjgl/vma/src/main/c/vk_mem_alloc.h @@ -461,11 +461,15 @@ typedef struct VmaVulkanFunctions { PFN_vkDestroyImage VMA_NULLABLE vkDestroyImage; PFN_vkCmdCopyBuffer VMA_NULLABLE vkCmdCopyBuffer; #if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000 + /// Fetch "vkGetBufferMemoryRequirements2" on Vulkan >= 1.1, fetch "vkGetBufferMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension. PFN_vkGetBufferMemoryRequirements2KHR VMA_NULLABLE vkGetBufferMemoryRequirements2KHR; + /// Fetch "vkGetImageMemoryRequirements 2" on Vulkan >= 1.1, fetch "vkGetImageMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension. PFN_vkGetImageMemoryRequirements2KHR VMA_NULLABLE vkGetImageMemoryRequirements2KHR; #endif #if VMA_BIND_MEMORY2 || VMA_VULKAN_VERSION >= 1001000 + /// Fetch "vkBindBufferMemory2" on Vulkan >= 1.1, fetch "vkBindBufferMemory2KHR" when using VK_KHR_bind_memory2 extension. PFN_vkBindBufferMemory2KHR VMA_NULLABLE vkBindBufferMemory2KHR; + /// Fetch "vkBindImageMemory2" on Vulkan >= 1.1, fetch "vkBindImageMemory2KHR" when using VK_KHR_bind_memory2 extension. PFN_vkBindImageMemory2KHR VMA_NULLABLE vkBindImageMemory2KHR; #endif #if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 diff --git a/modules/lwjgl/vma/src/templates/kotlin/vma/VMATypes.kt b/modules/lwjgl/vma/src/templates/kotlin/vma/VMATypes.kt index 50a925d058..e3e5fc5606 100644 --- a/modules/lwjgl/vma/src/templates/kotlin/vma/VMATypes.kt +++ b/modules/lwjgl/vma/src/templates/kotlin/vma/VMATypes.kt @@ -96,10 +96,28 @@ val VmaVulkanFunctions = struct(Module.VMA, "VmaVulkanFunctions", skipBuffer = t "PFN_vkCreateImage".handle("vkCreateImage", "") "PFN_vkDestroyImage".handle("vkDestroyImage", "") "PFN_vkCmdCopyBuffer".handle("vkCmdCopyBuffer", "") - nullable.."PFN_vkGetBufferMemoryRequirements2KHR".handle("vkGetBufferMemoryRequirements2KHR", "") - nullable.."PFN_vkGetImageMemoryRequirements2KHR".handle("vkGetImageMemoryRequirements2KHR", "") - nullable.."PFN_vkBindBufferMemory2KHR".handle("vkBindBufferMemory2KHR", "") - nullable.."PFN_vkBindImageMemory2KHR".handle("vkBindImageMemory2KHR", "") + nullable.."PFN_vkGetBufferMemoryRequirements2KHR".handle( + "vkGetBufferMemoryRequirements2KHR", + """ + {@code vkGetBufferMemoryRequirements2} on Vulkan ≥ 1.1, {@code vkGetBufferMemoryRequirements2KHR} when using {@code VK_KHR_dedicated_allocation} + extension. + """ + ) + nullable.."PFN_vkGetImageMemoryRequirements2KHR".handle( + "vkGetImageMemoryRequirements2KHR", + """ + {@code vkGetImageMemoryRequirements2} on Vulkan ≥ 1.1, {@code vkGetImageMemoryRequirements2KHR} when using {@code VK_KHR_dedicated_allocation} + extension. + """ + ) + nullable.."PFN_vkBindBufferMemory2KHR".handle( + "vkBindBufferMemory2KHR", + "{@code vkBindBufferMemory2} on Vulkan ≥ 1.1, {@code vkBindBufferMemory2KHR} when using {@code VK_KHR_bind_memory2} extension." + ) + nullable.."PFN_vkBindImageMemory2KHR".handle( + "vkBindImageMemory2KHR", + "{@code vkBindImageMemory2} on Vulkan ≥ 1.1, {@code vkBindImageMemory2KHR} when using {@code VK_KHR_bind_memory2} extension." + ) nullable.."PFN_vkGetPhysicalDeviceMemoryProperties2KHR".handle("vkGetPhysicalDeviceMemoryProperties2KHR", "") customMethod("""