grab the first available queue, not the last
This commit is contained in:
parent
8fef9a4830
commit
857c87f370
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ import Control.Monad
|
||||||
import Control.Monad.IO.Class (liftIO)
|
import Control.Monad.IO.Class (liftIO)
|
||||||
import Control.Monad.Trans.Resource
|
import Control.Monad.Trans.Resource
|
||||||
import qualified Data.Vector as V
|
import qualified Data.Vector as V
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe, isNothing)
|
||||||
import Data.Bits
|
import Data.Bits
|
||||||
import Foreign.C.Types (CInt)
|
import Foreign.C.Types (CInt)
|
||||||
import Linear
|
import Linear
|
||||||
|
@ -68,7 +68,7 @@ createLogicalDevice physDevice surface = do
|
||||||
|
|
||||||
let graphicsQueueFamilies = V.foldl
|
let graphicsQueueFamilies = V.foldl
|
||||||
(\acc (index, queueFamily) ->
|
(\acc (index, queueFamily) ->
|
||||||
if Vk.queueFlags queueFamily .&. Vk.QUEUE_GRAPHICS_BIT /= zeroBits
|
if Vk.queueFlags queueFamily .&. Vk.QUEUE_GRAPHICS_BIT /= zeroBits && isNothing acc
|
||||||
then Just index
|
then Just index
|
||||||
else acc
|
else acc
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue