Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- createDebugInstanceWithExtensions :: forall es m. (Extendss InstanceCreateInfo es, PokeChain es, MonadResource m) => [ByteString] -> [ByteString] -> [ByteString] -> [ByteString] -> InstanceCreateInfo es -> m Instance
- createInstanceWithExtensions :: forall es m. (Extendss InstanceCreateInfo es, PokeChain es, MonadResource m) => [ByteString] -> [ByteString] -> [ByteString] -> [ByteString] -> InstanceCreateInfo es -> m Instance
- pickPhysicalDevice :: (MonadIO m, Ord b) => Instance -> (PhysicalDevice -> m (Maybe a)) -> (a -> b) -> m (Maybe (a, PhysicalDevice))
- physicalDeviceName :: MonadIO m => PhysicalDevice -> m Text
- createDeviceWithExtensions :: forall es m. (Extendss DeviceCreateInfo es, PokeChain es, MonadResource m) => PhysicalDevice -> [ByteString] -> [ByteString] -> DeviceCreateInfo es -> m Device
Documentation
createDebugInstanceWithExtensions Source #
:: forall es m. (Extendss InstanceCreateInfo es, PokeChain es, MonadResource m) | |
=> [ByteString] | Required layers |
-> [ByteString] | Optional layers |
-> [ByteString] | Required extensions |
-> [ByteString] | Optional extensions |
-> InstanceCreateInfo es | |
-> m Instance |
Like createInstanceWithExtensions
except it will create a debug utils
messenger (from the VK_EXT_debug_utils
extension).
If the VK_EXT_validation_features
extension (from the
VK_LAYER_KHRONOS_validation
layer) is available is it will be enabled and
best practices messages enabled.
createInstanceWithExtensions Source #
:: forall es m. (Extendss InstanceCreateInfo es, PokeChain es, MonadResource m) | |
=> [ByteString] | Required layers |
-> [ByteString] | Optional layers |
-> [ByteString] | Required extensions |
-> [ByteString] | Optional extensions |
-> InstanceCreateInfo es | |
-> m Instance |
Create an Instance
with some layers and extensions, the layers and
extensions will be added to the provided InstanceCreateInfo
.
Will throw an 'IOError in the case of missing layers or extensions. Details on missing layers and extensions will be reported in stderr.
:: (MonadIO m, Ord b) | |
=> Instance | |
-> (PhysicalDevice -> m (Maybe a)) | A suitability funcion for a |
-> (a -> b) | Scoring function to rate this result |
-> m (Maybe (a, PhysicalDevice)) | The score and the device |
Get a single PhysicalDevice
deciding with a scoring function
Pass a function which will extract any required values from a device in the spirit of parse-don't-validate. Also provide a function to compare these results for sorting multiple suitable devices.
As an example, the suitability function could return a tuple of device
memory and the compute queue family index, and the scoring function could be
fst
to select devices based on their memory capacity. Consider using
assignQueues
to find your desired queues in
the suitability function.
If no devices are deemed suitable then a NoSuchThing
IOError
is thrown.
physicalDeviceName :: MonadIO m => PhysicalDevice -> m Text Source #
Extract the name of a PhysicalDevice
with getPhysicalDeviceProperties
createDeviceWithExtensions Source #
:: forall es m. (Extendss DeviceCreateInfo es, PokeChain es, MonadResource m) | |
=> PhysicalDevice | |
-> [ByteString] | Required extensions |
-> [ByteString] | Optional extensions |
-> DeviceCreateInfo es | |
-> m Device |
Create a Device
with some extensions, the extensions will be added to
the provided DeviceCreateInfo
.
Will throw an 'IOError in the case of missing extensions. Missing extensions will be listed on stderr.