Replace legacy VkDeviceCreateInfo::pEnabledFeatures with VkPhysicalDeviceFeatures2in pNext chain

This commit is contained in:
2026-05-13 14:04:31 +02:00
parent bce62feb09
commit 41b60c45d6

View File

@@ -275,11 +275,14 @@ pub fn init(allocator: std.mem.Allocator, io: std.Io, maybe_window: ?*glfw.Windo
try enabled_extensions.appendBounded(vk.extensions.khr_swapchain.name);
}
const enabled_features_vulkan10: vk.PhysicalDeviceFeatures = .{
.shader_int_16 = .true,
var enabled_features_vulkan10: vk.PhysicalDeviceFeatures2 = .{
.features = .{
.shader_int_16 = .true,
},
};
var enabled_features_vulkan11: vk.PhysicalDeviceVulkan11Features = .{
.p_next = &enabled_features_vulkan10,
.storage_buffer_16_bit_access = .true,
.uniform_and_storage_buffer_16_bit_access = .true,
};
@@ -316,7 +319,6 @@ pub fn init(allocator: std.mem.Allocator, io: std.Io, maybe_window: ?*glfw.Windo
.p_queue_create_infos = queue_create_info.items.ptr,
.enabled_extension_count = @intCast(enabled_extensions.items.len),
.pp_enabled_extension_names = enabled_extensions.items.ptr,
.p_enabled_features = &enabled_features_vulkan10,
}, &vk_allocator.interface);
};