summaryrefslogtreecommitdiff
path: root/testdata/bug
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/bug')
-rw-r--r--testdata/bug/infer01.wip.lc19
-rw-r--r--testdata/bug/infer01.wip.out89
2 files changed, 108 insertions, 0 deletions
diff --git a/testdata/bug/infer01.wip.lc b/testdata/bug/infer01.wip.lc
new file mode 100644
index 00000000..07c84705
--- /dev/null
+++ b/testdata/bug/infer01.wip.lc
@@ -0,0 +1,19 @@
1-- works with type signature
2--frag :: (Vec 4 Float,Vec 2 Float) -> Vec 4 Float
3frag = \(x,uv) -> x
4
5makeFrame (vertexstream :: PrimitiveStream Triangle (Vec 4 Float,Vec 2 Float))
6
7 = imageFrame (emptyDepthImage 1, emptyColorImage navy)
8 `overlay` fragments
9 where
10 fragments =
11 vertexstream
12 & mapPrimitives (\(x,uv) -> (x,x,uv))
13 & rasterizePrimitives (TriangleCtx CullNone PolygonFill NoOffset LastVertex) (Smooth,Smooth)
14 & mapFragments frag
15 & accumulateWith (DepthOp Less True, ColorOp NoBlending (V4 True True True True))
16
17main = renderFrame $
18 makeFrame (fetch_ "stream4" (Attribute "position4",Attribute "vertexUV"))
19
diff --git a/testdata/bug/infer01.wip.out b/testdata/bug/infer01.wip.out
new file mode 100644
index 00000000..1410c500
--- /dev/null
+++ b/testdata/bug/infer01.wip.out
@@ -0,0 +1,89 @@
1Pipeline
2 { info = "generated by lambdcube-compiler 0.5.0.0"
3 , backend = OpenGL33
4 , textures = []
5 , samplers = []
6 , targets =
7 [ RenderTarget
8 { renderTargets =
9 [ TargetItem
10 { targetSemantic = Depth , targetRef = Just (Framebuffer Depth) }
11 , TargetItem
12 { targetSemantic = Color , targetRef = Just (Framebuffer Color) }
13 ]
14 }
15 ]
16 , programs =
17 [ Program
18 { programUniforms = fromList []
19 , programStreams =
20 fromList
21 [ ( "vi1" , Parameter { name = "position4" , ty = V4F } )
22 , ( "vi2" , Parameter { name = "vertexUV" , ty = V2F } )
23 ]
24 , programInTextures = fromList []
25 , programOutput = [ Parameter { name = "f0" , ty = V4F } ]
26 , vertexShader =
27 """
28 #version 330 core
29 vec4 texture2D(sampler2D s,vec2 uv) {
30 return texture(s,uv);
31 }
32 in vec4 vi1;
33 in vec2 vi2;
34 smooth out vec4 vo1;
35 smooth out vec2 vo2;
36 void main() {
37 gl_Position = vi1;
38 vo1 = vi1;
39 vo2 = vi2;
40 }
41 """
42 , geometryShader = Nothing
43 , fragmentShader =
44 """
45 #version 330 core
46 vec4 texture2D(sampler2D s,vec2 uv) {
47 return texture(s,uv);
48 }
49 smooth in vec4 vo1;
50 smooth in vec2 vo2;
51 out vec4 f0;
52 void main() {
53 f0 = vo1;
54 }
55 """
56 }
57 ]
58 , slots =
59 [ Slot
60 { slotName = "stream4"
61 , slotStreams =
62 fromList [ ( "position4" , V4F ) , ( "vertexUV" , V2F ) ]
63 , slotUniforms = fromList []
64 , slotPrimitive = Triangles
65 , slotPrograms = [ 0 ]
66 }
67 ]
68 , streams = []
69 , commands =
70 [ SetRenderTarget 0
71 , ClearRenderTarget
72 [ ClearImage { imageSemantic = Depth , clearValue = VFloat 1.0 }
73 , ClearImage
74 { imageSemantic = Color , clearValue = VV4F (V4 0.0 0.0 0.5 1.0) }
75 ]
76 , SetProgram 0
77 , SetRasterContext
78 (TriangleCtx CullNone PolygonFill NoOffset LastVertex)
79 , SetAccumulationContext
80 AccumulationContext
81 { accViewportName = Nothing
82 , accOperations =
83 [ DepthOp Less True
84 , ColorOp NoBlending (VV4B (V4 True True True True))
85 ]
86 }
87 , RenderSlot 0
88 ]
89 } \ No newline at end of file