Skip to content

Commit

Permalink
Portability bits
Browse files Browse the repository at this point in the history
  • Loading branch information
alt-romes committed May 17, 2024
1 parent 45ba5c3 commit 581442f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ghengin-core/ghengin-vulkan/Ghengin/Vulkan/Renderer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ deviceExtensions :: Vector ByteString
deviceExtensions = [ Vk.KHR_SWAPCHAIN_EXTENSION_NAME

-- required at least from 1.3 with MoltenVk
#if defined(darwin_HOST_OS)
, Vk.KHR_PORTABILITY_SUBSET_EXTENSION_NAME
#endif
]

rateFn :: Vk.SurfaceKHR -> DeviceRateFunction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ createInstance validationLayers = Linear.liftSystemIO $ do
instanceInfo glfwe
= Vk.InstanceCreateInfo {..} where
next = ()
flags = Vk.InstanceCreateFlagBits 0 .|. Vk.INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR -- required at least on 1.3 w MoltenVk
flags = Vk.InstanceCreateFlagBits 0
#if defined(darwin_HOST_OS)
.|. Vk.INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR -- required at least on 1.3 w MoltenVk
#endif
applicationInfo = Just appInfo
enabledLayerNames = validationLayers
enabledExtensionNames = instanceExtensions <> glfwe
Expand Down
8 changes: 8 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ mkShell {
# renderdoc # Graphics debugger
# tracy # Graphics profiler
vulkan-tools-lunarg # vkconfig

# bindings-GLFW
xorg.libX11
xorg.libXi
xorg.libXrandr
xorg.libXxf86vm
xorg.libXcursor
xorg.libXinerama
];

buildInputs = with pkgs; [
Expand Down

0 comments on commit 581442f

Please sign in to comment.