change extension_names to use vk.extensions over hardcoded string

This commit is contained in:
zac
2025-08-30 18:24:00 +10:00
parent f879074293
commit 3c7d4021e9

View File

@@ -53,8 +53,8 @@ pub const GraphicsContext = struct {
defer extension_names.deinit(allocator); defer extension_names.deinit(allocator);
// these extensions are to support vulkan in mac os // these extensions are to support vulkan in mac os
// see https://github.com/glfw/glfw/issues/2335 // see https://github.com/glfw/glfw/issues/2335
try extension_names.append(allocator, "VK_KHR_portability_enumeration"); try extension_names.append(allocator, vk.extensions.khr_portability_enumeration.name);
try extension_names.append(allocator, "VK_KHR_get_physical_device_properties2"); try extension_names.append(allocator, vk.extensions.khr_get_physical_device_properties_2.name);
var glfw_exts_count: u32 = 0; var glfw_exts_count: u32 = 0;
const glfw_exts = c.glfwGetRequiredInstanceExtensions(&glfw_exts_count); const glfw_exts = c.glfwGetRequiredInstanceExtensions(&glfw_exts_count);