check for geometry shader availability
This commit is contained in:
parent
8b4dc69e5c
commit
836012beea
1 changed files with 10 additions and 6 deletions
|
@ -19,18 +19,22 @@ pickPhysicalDevice
|
|||
pickPhysicalDevice vkInstance = do
|
||||
physDevices <- snd <$> Vk.enumeratePhysicalDevices vkInstance
|
||||
|
||||
devicesWithProps <- V.mapM
|
||||
devicesWithPropsAndFeatures <- V.mapM
|
||||
(\device -> do
|
||||
devProps <- Vk.getPhysicalDeviceProperties device
|
||||
return (device, devProps)
|
||||
devFeatures <- Vk.getPhysicalDeviceFeatures device
|
||||
return (device, devProps, devFeatures)
|
||||
)
|
||||
physDevices
|
||||
|
||||
let discretePhysDevices = V.filter
|
||||
(\(_, devProp) -> Vk.deviceType devProp == Vk.PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
|
||||
devicesWithProps
|
||||
maxMemdiscretePhysDevice = fst $ V.foldl
|
||||
(\acc@(_, devProp1) ndev@(_, devProp2) ->
|
||||
(\(_, _, devFeatures) ->
|
||||
-- Vk.deviceType devProp == Vk.PHYSICAL_DEVICE_TYPE_DISCRETE_GPU &&
|
||||
Vk.geometryShader devFeatures
|
||||
)
|
||||
devicesWithPropsAndFeatures
|
||||
maxMemdiscretePhysDevice = (\(x, _, _) -> x) $ V.foldl
|
||||
(\acc@(_, devProp1, _) ndev@(_, devProp2, _) ->
|
||||
let dimension = Vk.maxImageDimension2D . Vk.limits
|
||||
in
|
||||
if dimension devProp1 < dimension devProp2
|
||||
|
|
Loading…
Reference in a new issue