diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/LambdaCube/Compiler/CoreToIR.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/LambdaCube/Compiler/CoreToIR.hs b/src/LambdaCube/Compiler/CoreToIR.hs index 2a3c78eb..e11e2861 100644 --- a/src/LambdaCube/Compiler/CoreToIR.hs +++ b/src/LambdaCube/Compiler/CoreToIR.hs | |||
@@ -138,7 +138,8 @@ getSlot x = error $ "getSlot: " ++ ppShow x | |||
138 | 138 | ||
139 | getPrim (A1 "List" (A2 "Primitive" _ p)) = p | 139 | getPrim (A1 "List" (A2 "Primitive" _ p)) = p |
140 | getPrim' (A1 "List" (A2 "Primitive" a _)) = a | 140 | getPrim' (A1 "List" (A2 "Primitive" a _)) = a |
141 | getPrim'' (A1 "List" (A2 "Fragment" _ a)) = a | 141 | getPrim'' (A1 "List" (A2 "Vector" _ (A1 "Maybe" (A1 "SimpleFragment" a)))) = a |
142 | getPrim'' x = error $ "getPrim'':" ++ ppShow x | ||
142 | 143 | ||
143 | addProgramToSlot :: IR.ProgramName -> IR.Command -> CG () | 144 | addProgramToSlot :: IR.ProgramName -> IR.Command -> CG () |
144 | addProgramToSlot prgName (IR.RenderSlot slotName) = do | 145 | addProgramToSlot prgName (IR.RenderSlot slotName) = do |
@@ -225,7 +226,7 @@ getCommands e = case e of | |||
225 | rt <- newFrameBufferTarget (tyOf a) | 226 | rt <- newFrameBufferTarget (tyOf a) |
226 | (subCmds,cmds) <- getCommands a | 227 | (subCmds,cmds) <- getCommands a |
227 | return (subCmds,IR.SetRenderTarget rt : cmds) | 228 | return (subCmds,IR.SetRenderTarget rt : cmds) |
228 | Prim3 "Accumulate" actx (getFragmentShader . removeDepthHandler -> (frag, getFragFilter -> (ffilter, Prim3 "foldr" (EtaPrim2_2 "++") (A0 "Nil") (Prim2 "map" (EtaPrim3 "rasterize" {-rp-} is rctx) (getVertexShader -> (vert, input)))))) fbuf -> do | 229 | Prim3 "Accumulate" actx (getFragmentShader . removeDepthHandler -> (frag, getFragFilter -> (ffilter, Prim3 "foldr" (EtaPrim2_2 "++") (A0 "Nil") (Prim2 "map" (EtaPrim3 "rasterizePrimitive" is rctx) (getVertexShader -> (vert, input)))))) fbuf -> do |
229 | let rp = compRC' rctx | 230 | let rp = compRC' rctx |
230 | (smpBindingsV,vertCmds) <- getRenderTextureCommands vert | 231 | (smpBindingsV,vertCmds) <- getRenderTextureCommands vert |
231 | (smpBindingsR,rastCmds) <- maybe (return mempty) getRenderTextureCommands ffilter | 232 | (smpBindingsR,rastCmds) <- maybe (return mempty) getRenderTextureCommands ffilter |