From 21e1173f3f0cc80c09b59d86ae8b2b7424127d04 Mon Sep 17 00:00:00 2001 From: Mike Young Date: Thu, 13 Feb 2025 02:45:51 -0600 Subject: [PATCH 1/2] Set feature sType in feature structs. --- chapter-6/vk_engine.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chapter-6/vk_engine.cpp b/chapter-6/vk_engine.cpp index db1d78203..701de640b 100644 --- a/chapter-6/vk_engine.cpp +++ b/chapter-6/vk_engine.cpp @@ -875,10 +875,12 @@ void VulkanEngine::init_vulkan() SDL_Vulkan_CreateSurface(_window, _instance, &_surface); VkPhysicalDeviceVulkan13Features features13 {}; + features13.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES; features13.dynamicRendering = true; features13.synchronization2 = true; VkPhysicalDeviceVulkan12Features features12 {}; + features12.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; features12.bufferDeviceAddress = true; features12.descriptorIndexing = true; features12.descriptorBindingPartiallyBound = true; From e18fa849268742d5cc394eae996a12ab18b9f31b Mon Sep 17 00:00:00 2001 From: Mike Young Date: Thu, 13 Feb 2025 04:07:23 -0600 Subject: [PATCH 2/2] Set feature sType in feature structs. --- chapter-5/vk_engine.cpp | 4 ++-- chapter-6/vk_engine.cpp | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/chapter-5/vk_engine.cpp b/chapter-5/vk_engine.cpp index 5185967a3..4c1db6d03 100644 --- a/chapter-5/vk_engine.cpp +++ b/chapter-5/vk_engine.cpp @@ -876,11 +876,11 @@ void VulkanEngine::init_vulkan() SDL_Vulkan_CreateSurface(_window, _instance, &_surface); - VkPhysicalDeviceVulkan13Features features13 {}; + VkPhysicalDeviceVulkan13Features features13{ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES }; features13.dynamicRendering = true; features13.synchronization2 = true; - VkPhysicalDeviceVulkan12Features features12 {}; + VkPhysicalDeviceVulkan12Features features12{ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES }; features12.bufferDeviceAddress = true; features12.descriptorIndexing = true; diff --git a/chapter-6/vk_engine.cpp b/chapter-6/vk_engine.cpp index 701de640b..83fc08a15 100644 --- a/chapter-6/vk_engine.cpp +++ b/chapter-6/vk_engine.cpp @@ -874,13 +874,11 @@ void VulkanEngine::init_vulkan() SDL_Vulkan_CreateSurface(_window, _instance, &_surface); - VkPhysicalDeviceVulkan13Features features13 {}; - features13.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES; + VkPhysicalDeviceVulkan13Features features13{ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES }; features13.dynamicRendering = true; features13.synchronization2 = true; - VkPhysicalDeviceVulkan12Features features12 {}; - features12.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; + VkPhysicalDeviceVulkan12Features features12{ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES }; features12.bufferDeviceAddress = true; features12.descriptorIndexing = true; features12.descriptorBindingPartiallyBound = true;