diff options
| author | Alejandro Soto <alejandro@34project.org> | 2023-11-12 23:53:04 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2023-11-14 07:48:52 -0600 |
| commit | 8ed41312384e1f2e99b94576684fa06c1d5f468a (patch) | |
| tree | c019568bfd401fc25826a810f7aa0352ad629641 /rtl/gfx/gfx_funnel.sv | |
| parent | 3e8235aa71a930be815e03230b64bb850b6ffdb4 (diff) | |
rtl/gfx: implement w-coordinate in funnel
Diffstat (limited to 'rtl/gfx/gfx_funnel.sv')
| -rw-r--r-- | rtl/gfx/gfx_funnel.sv | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/rtl/gfx/gfx_funnel.sv b/rtl/gfx/gfx_funnel.sv index 22fefe3..4710111 100644 --- a/rtl/gfx/gfx_funnel.sv +++ b/rtl/gfx/gfx_funnel.sv @@ -7,18 +7,20 @@ module gfx_funnel input frag_xy_lanes fragments, input bary_lanes barys, + input fixed_tri raster_ws, input paint_lanes in_valid, output logic in_ready, input logic out_ready, output logic out_valid, output frag_xy frag, - output fixed_tri bary + output fixed_tri frag_bary, + frag_ws ); logic skid_ready, stall, ready, valid; frag_xy next_frag, out_frag; - fixed_tri next_bary, out_bary; + fixed_tri next_bary, out_bary, out_ws, ws_hold; bary_lanes barys_hold; paint_lanes current, next; frag_xy_lanes fragments_hold; @@ -33,10 +35,17 @@ module gfx_funnel .* ); - gfx_skid_buf #(.WIDTH($bits(bary))) skid_bary + gfx_skid_buf #(.WIDTH($bits(frag_bary))) skid_bary ( .in(out_bary), - .out(bary), + .out(frag_bary), + .* + ); + + gfx_skid_buf #(.WIDTH($bits(frag_ws))) skid_ws + ( + .in(out_ws), + .out(frag_ws), .* ); @@ -74,10 +83,12 @@ module gfx_funnel always_ff @(posedge clk) if (!stall) begin if (ready) begin + ws_hold <= raster_ws; barys_hold <= barys; fragments_hold <= fragments; end + out_ws <= ws_hold; out_bary <= next_bary; out_frag <= next_frag; end |
