{"record":{"id":"73858410de60d2c1","repo":"stride3d/stride","slug":"required-vulkan-extension-extensionname-is-not-supported-by","errorCode":null,"errorMessage":"Required Vulkan extension {extensionName} is not supported by the current physical device.","messagePattern":"Required Vulkan extension (.+?) is not supported by the current physical device\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"critical","filePath":"sources/engine/Stride.Graphics/Vulkan/GraphicsDevice.Vulkan.cs","lineNumber":672,"sourceCode":"            {\n                var properties = extensionProperties[index];\n                var name = new VkUtf8String(properties.extensionName);\n                var indexOfExtensionName = supportedExtensionProperties.IndexOf(name);\n\n                if (indexOfExtensionName >= 0)\n                    availableExtensionProperties.Add(supportedExtensionProperties[indexOfExtensionName]);\n            }\n\n            return availableExtensionProperties;\n        }\n\n        private static void ValidateExtensionPropertiesAvailability(HashSet<VkUtf8String> availableExtensionProperties)\n        {\n            if (!availableExtensionProperties.Contains(VK_KHR_SWAPCHAIN_EXTENSION_NAME))\n            {\n                string extensionName = Encoding.UTF8.GetString(VK_KHR_SWAPCHAIN_EXTENSION_NAME);\n\n                throw new NotSupportedException($\"Required Vulkan extension {extensionName} is not supported by the current physical device.\");\n            }\n        }\n\n        internal unsafe IntPtr AllocateUploadBuffer(int size, out VkBuffer resource, out int offset)\n        {\n            lock (nativeUploadBufferLock)\n            {\n                if (nativeUploadBuffer == VkBuffer.Null || nativeUploadBufferOffset + size > nativeUploadBufferSize)\n                {\n                    if (nativeUploadBuffer != VkBuffer.Null)\n                    {\n                        NativeDeviceApi.vkUnmapMemory(NativeDevice, nativeUploadBufferMemory);\n                        Collect(nativeUploadBuffer);\n                        Collect(nativeUploadBufferMemory);\n                    }\n\n                    // Allocate new buffer\n                    // TODO D3D12 recycle old ones (using fences to know when GPU is done with them)","sourceCodeStart":654,"sourceCodeEnd":690,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Graphics/Vulkan/GraphicsDevice.Vulkan.cs#L654-L690","documentation":"Before creating a Vulkan logical device, Stride validates that the chosen physical device exposes the VK_KHR_swapchain extension, which is mandatory for presenting rendered images to a window surface. ValidateExtensionPropertiesAvailability throws NotSupportedException if the device's enumerated extension list does not contain it, since no swapchain can exist without it.","triggerScenarios":"GraphicsDevice creation with a swapchain (windowed mode) on a physical device that fails to enumerate VK_KHR_swapchain in its device extension properties.","commonSituations":"Headless Vulkan ICDs or compute-only devices (some server GPUs, lavapipe variants) that lack presentation support; misconfigured Vulkan runtime/loader; a device selected without swapchain capability (e.g. picking device index 0 which is a compute accelerator).","solutions":["Verify with vulkaninfo that the selected physical device lists VK_KHR_swapchain under device extensions.","Install/repair full vendor GPU drivers rather than a headless or compute-only ICD.","Run in headless/offscreen mode without a swapchain if presentation is not needed.","Select a different, presentation-capable physical device in the adapter list."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"bool hasSwapchain = physicalDevice.EnumerateDeviceExtensionProperties()\n    .Any(e => e.ExtensionName == \"VK_KHR_swapchain\");\nif (!hasSwapchain) throw new NotSupportedException(\"Device lacks VK_KHR_swapchain\");","typeGuard":"bool SupportsSwapchain(PhysicalDevice d) => d.EnumerateDeviceExtensionProperties().Any(e => e.ExtensionName == \"VK_KHR_swapchain\");","tryCatchPattern":"try { device = GraphicsDevice.New(adapter, desc); }\ncatch (NotSupportedException ex) when (ex.Message.Contains(\"VK_KHR_swapchain\")) { log.Error(\"Presentation unsupported on this device\", ex); throw; }","preventionTips":["Run vulkaninfo and check device extensions before deployment","Avoid headless/compute-only ICDs for windowed rendering","Select presentation-capable adapters explicitly rather than defaulting to index 0","Install complete vendor drivers, not compute-only variants"],"tags":["vulkan","swapchain","device-extension","initialization"],"backgroundTag":"missing-dependency","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}