@@ -104,7 +104,7 @@ getCommands backend e = case e of
104
104
105
105
A3 " foldr" (A0 " ++" ) (A0 " Nil" ) (A2 " map" (EtaPrim3 " rasterizePrimitive" ints rctx) (getVertexShader -> (vert, input_))) -> mdo
106
106
107
- let
107
+ let
108
108
(vertexInput, pUniforms, vertSrc, fragSrc) = case backend of
109
109
-- disabled DX11 codegen, due to it's incomplete
110
110
-- IR.DirectX11 -> genHLSLs backend (compRC' rctx) ints vert frag ffilter
@@ -306,22 +306,23 @@ compEdgeMode = \case
306
306
A0 " ClampToEdge" -> IR. ClampToEdge
307
307
x -> error $ " compEdgeMode: " ++ ppShow x
308
308
309
- compSemantic x = case x of
309
+ compSemantic = \ case
310
310
A0 " Depth" -> IR. Depth
311
311
A0 " Stencil" -> IR. Stencil
312
312
A1 " Color" _ -> IR. Color
313
313
x -> error $ " compSemantic: " ++ ppShow x
314
314
315
315
imageInputTypeTextureType :: HasCallStack => IR. InputType -> (IR. ColorArity -> IR. TextureDataType )
316
- imageInputTypeTextureType IR. Float = IR. FloatT
317
- imageInputTypeTextureType IR. Int = IR. IntT
318
- imageInputTypeTextureType IR. V2I = IR. IntT
319
- imageInputTypeTextureType IR. V3I = IR. IntT
320
- imageInputTypeTextureType IR. V4I = IR. IntT
321
- imageInputTypeTextureType IR. V2F = IR. FloatT
322
- imageInputTypeTextureType IR. V3F = IR. FloatT
323
- imageInputTypeTextureType IR. V4F = IR. FloatT
324
- imageInputTypeTextureType x = error $ " Unsupported input type: " <> show x
316
+ imageInputTypeTextureType = \ case
317
+ IR. Float -> IR. FloatT
318
+ IR. Int -> IR. IntT
319
+ IR. V2I -> IR. IntT
320
+ IR. V3I -> IR. IntT
321
+ IR. V4I -> IR. IntT
322
+ IR. V2F -> IR. FloatT
323
+ IR. V3F -> IR. FloatT
324
+ IR. V4F -> IR. FloatT
325
+ x -> error $ " Unsupported input type: " <> show x
325
326
326
327
-- mirrors Builtins.lc:imageType
327
328
compImageInputType :: HasCallStack => ExpTV -> IR. InputType
0 commit comments