From 6c9ebf718fa388df8772cd023352eed575dc3668 Mon Sep 17 00:00:00 2001 From: Csaba Hruska Date: Thu, 30 Apr 2015 15:32:06 +0200 Subject: fix --- Backend/GL/Backend.hs | 14 +++++++------- Backend/GL/Input.hs | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Backend/GL/Backend.hs b/Backend/GL/Backend.hs index 7e6a9d4..9adff30 100644 --- a/Backend/GL/Backend.hs +++ b/Backend/GL/Backend.hs @@ -351,12 +351,12 @@ compileRenderTarget texs glTexs (RenderTarget targets) = do allocPipeline :: Pipeline -> IO GLPipeline allocPipeline p = do let uniTrie = uniforms $ schemaFromPipeline p - smps <- V.mapM compileSampler $ samplers p - texs <- V.mapM compileTexture $ textures p - trgs <- V.mapM (compileRenderTarget (textures p) texs) $ targets p - prgs <- V.mapM (compileProgram uniTrie) $ programs p + smps <- V.mapM compileSampler $ V.fromList $ samplers p + texs <- V.mapM compileTexture $ V.fromList $ textures p + trgs <- V.mapM (compileRenderTarget (V.fromList $ textures p) texs) $ V.fromList $ targets p + prgs <- V.mapM (compileProgram uniTrie) $ V.fromList $ programs p -- texture unit mapping ioref trie - texUnitMapRefs <- T.fromList <$> mapM (\k -> (k,) <$> newIORef 0) (S.toList $ S.fromList $ concat $ V.toList $ V.map (T.keys . toTrie . programInTextures) $ programs p) + texUnitMapRefs <- T.fromList <$> mapM (\k -> (k,) <$> newIORef 0) (S.toList $ S.fromList $ concat $ V.toList $ V.map (T.keys . toTrie . programInTextures) $ V.fromList $ programs p) let (cmds,st) = runState (mapM (compileCommand texUnitMapRefs smps texs trgs prgs) $ commands p) initCGState input <- newIORef Nothing -- default Vertex Array Object @@ -367,9 +367,9 @@ allocPipeline p = do , glSamplers = smps , glTargets = trgs , glCommands = cmds - , glSlotPrograms = V.map slotPrograms $ IR.slots p + , glSlotPrograms = V.map slotPrograms $ V.fromList $ IR.slots p , glInput = input - , glSlotNames = V.map (pack . slotName) $ IR.slots p + , glSlotNames = V.map (pack . slotName) $ V.fromList $ IR.slots p , glVAO = vao , glTexUnitMapping = texUnitMapRefs } diff --git a/Backend/GL/Input.hs b/Backend/GL/Input.hs index 6d4f40f..9d217ad 100644 --- a/Backend/GL/Input.hs +++ b/Backend/GL/Input.hs @@ -30,7 +30,7 @@ import qualified IR as IR schemaFromPipeline :: IR.Pipeline -> PipelineSchema schemaFromPipeline a = PipelineSchema (T.fromList sl) (foldl T.unionL T.empty ul) where - (sl,ul) = unzip [((pack n,SlotSchema p (fmap cvt (toTrie s))),toTrie u) | IR.Slot n u s p _ <- V.toList $ IR.slots a] + (sl,ul) = unzip [((pack n,SlotSchema p (fmap cvt (toTrie s))),toTrie u) | IR.Slot n u s p _ <- IR.slots a] cvt a = case toStreamType a of Just v -> v Nothing -> error "internal error (schemaFromPipeline)" -- cgit v1.2.3