Skip to content

Commit

Permalink
VulkanRenderer: Add KHRSurface and KHRSwapchain extensions also in he…
Browse files Browse the repository at this point in the history
…adless mode
  • Loading branch information
skalarproduktraum committed Oct 12, 2023
1 parent bfe3875 commit ba57f67
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,9 @@ open class VulkanRenderer(hub: Hub,
stack.UTF8(EXTMetalSurface.VK_EXT_METAL_SURFACE_EXTENSION_NAME)
)
} else {
null
stack.pointers(
stack.UTF8(VK_KHR_SURFACE_EXTENSION_NAME)
)
}

createInstance(
Expand Down Expand Up @@ -577,7 +579,7 @@ open class VulkanRenderer(hub: Hub,

device = VulkanDevice.fromPhysicalDevice(instance,
physicalDeviceFilter = { _, device -> "${device.vendor} ${device.name}".contains(System.getProperty("scenery.Renderer.Device", "DOES_NOT_EXIST"))},
additionalExtensions = { physicalDevice -> hub.getWorkingHMDDisplay()?.getVulkanDeviceExtensions(physicalDevice)?.toMutableList() ?: mutableListOf() },
additionalExtensions = { physicalDevice -> hub.getWorkingHMDDisplay()?.getVulkanDeviceExtensions(physicalDevice)?.toMutableList() ?: mutableListOf(KHRSwapchain.VK_KHR_SWAPCHAIN_EXTENSION_NAME) },
validationLayers = requestedValidationLayers,
headless = headless,
debugEnabled = validation
Expand Down

0 comments on commit ba57f67

Please sign in to comment.