Fix type checker not promoting ints. Fix some issues in the codegen.

This commit is contained in:
2024-09-11 07:24:10 +02:00
parent 517209c886
commit ff668b6c95
5 changed files with 98 additions and 24 deletions

View File

@@ -0,0 +1,14 @@
vertex main :: (pos : float4 @position) -> float4 @position {
src_p0 : float2 = float2(0.0, 1.0);
src_p1 : float2 = float2(1.0, 0.0);
src_half_size : float2 = (src_p1 - src_p0) / 2;
src_center : float2 = (src_p1 + src_p0) / 2;
src_pos : float2 = float2(pos.x, pos.y) * src_half_size + src_center;
return float4(1, 1, 1, 1);
}
pixel main :: () -> float4 @target0 {
return float4(1, 1, 1, 1);
}