Harden Vulkan init/device selection and resource teardown
- Remove unconditional VK_KHR_swapchain request; offscreen renderer needs no device extensions, fixing failures on headless/CI setups. - Enumerate physical devices properly and pick the first one with a graphics queue family instead of blindly choosing device 0. - Check vkEnumeratePhysicalDevices/vkBindImageMemory/vkBindBufferMemory results. - Validate FindMemoryType() result before allocation and log clear errors. - Add a persistent linear sampler created in PostInit and destroy it in DestroyInternal. - Fix DestroyInternal() early-return leak: now tears down the instance even if device creation failed. ctest passes 4/4.
This commit is contained in:
@@ -129,6 +129,7 @@ private:
|
||||
|
||||
VkInstance instance_ = VK_NULL_HANDLE;
|
||||
VkPhysicalDevice physical_device_ = VK_NULL_HANDLE;
|
||||
uint32_t physical_device_count_ = 0;
|
||||
VkDevice device_ = VK_NULL_HANDLE;
|
||||
VkQueue graphics_queue_ = VK_NULL_HANDLE;
|
||||
uint32_t graphics_queue_family_ = UINT32_MAX;
|
||||
|
||||
Reference in New Issue
Block a user