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
|
pickPhysicalDevice vkInstance = do
|
||||||
physDevices <- snd <$> Vk.enumeratePhysicalDevices vkInstance
|
physDevices <- snd <$> Vk.enumeratePhysicalDevices vkInstance
|
||||||
|
|
||||||
devicesWithProps <- V.mapM
|
devicesWithPropsAndFeatures <- V.mapM
|
||||||
(\device -> do
|
(\device -> do
|
||||||
devProps <- Vk.getPhysicalDeviceProperties device
|
devProps <- Vk.getPhysicalDeviceProperties device
|
||||||
return (device, devProps)
|
devFeatures <- Vk.getPhysicalDeviceFeatures device
|
||||||
|
return (device, devProps, devFeatures)
|
||||||
)
|
)
|
||||||
physDevices
|
physDevices
|
||||||
|
|
||||||
let discretePhysDevices = V.filter
|
let discretePhysDevices = V.filter
|
||||||
(\(_, devProp) -> Vk.deviceType devProp == Vk.PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
|
(\(_, _, devFeatures) ->
|
||||||
devicesWithProps
|
-- Vk.deviceType devProp == Vk.PHYSICAL_DEVICE_TYPE_DISCRETE_GPU &&
|
||||||
maxMemdiscretePhysDevice = fst $ V.foldl
|
Vk.geometryShader devFeatures
|
||||||
(\acc@(_, devProp1) ndev@(_, devProp2) ->
|
)
|
||||||
|
devicesWithPropsAndFeatures
|
||||||
|
maxMemdiscretePhysDevice = (\(x, _, _) -> x) $ V.foldl
|
||||||
|
(\acc@(_, devProp1, _) ndev@(_, devProp2, _) ->
|
||||||
let dimension = Vk.maxImageDimension2D . Vk.limits
|
let dimension = Vk.maxImageDimension2D . Vk.limits
|
||||||
in
|
in
|
||||||
if dimension devProp1 < dimension devProp2
|
if dimension devProp1 < dimension devProp2
|
||||||
|
|
Loading…
Reference in a new issue