summaryrefslogtreecommitdiff
path: root/rtl/gfx/gfx.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-11-22 01:38:58 -0600
committerAlejandro Soto <alejandro@34project.org>2023-11-22 02:31:52 -0600
commit11231e7173d16415d45f809dc570cba0a2aae0cd (patch)
tree9a2a3e984b7b8e6c2ccc6da1b54d847a020c45ac /rtl/gfx/gfx.sv
parent1e064f29139a45061a8082914e9ee75c15e803a4 (diff)
rtl/gfx: implement perspective correction
Diffstat (limited to '')
-rw-r--r--rtl/gfx/gfx.sv26
1 files changed, 22 insertions, 4 deletions
diff --git a/rtl/gfx/gfx.sv b/rtl/gfx/gfx.sv
index 2398826..6bead44 100644
--- a/rtl/gfx/gfx.sv
+++ b/rtl/gfx/gfx.sv
@@ -62,6 +62,24 @@ module gfx
.*
);
+ logic persp_ready, persp_valid;
+ raster_xyzw persp_vertex_a, persp_vertex_b, persp_vertex_c;
+
+ gfx_persp perspective
+ (
+ .in_ready(persp_ready),
+ .in_valid(0), //TODO
+ .out_ready(raster_ready),
+ .out_valid(persp_valid),
+ .in_vertex_a(), //TODO
+ .in_vertex_b(), //TODO
+ .in_vertex_c(), //TODO
+ .out_vertex_a(persp_vertex_a),
+ .out_vertex_b(persp_vertex_b),
+ .out_vertex_c(persp_vertex_c),
+ .*
+ );
+
logic raster_ready;
fixed_tri raster_ws;
bary_lanes barys;
@@ -72,13 +90,13 @@ module gfx
(
.ws(raster_ws),
.in_ready(raster_ready),
- .in_valid(0), //TODO
+ .in_valid(persp_valid),
.out_ready(funnel_ready),
.out_valid(raster_valid),
- .vertex_a(), //TODO
- .vertex_b(), //TODO
- .vertex_c(), //TODO
+ .vertex_a(persp_vertex_a),
+ .vertex_b(persp_vertex_b),
+ .vertex_c(persp_vertex_c),
.*
);