nx_raster_sw_test.nx
buildroot/runtime/nx_raster_sw_test.nx
about
nx_raster_sw_test.nx -- KAT for nx_raster_sw.nx Pineda 1988
edge-function triangle rasterizer.
Verifies:
T1 signed-area sign convention (positive = front, zero =
degenerate, negative = back-facing).
T2 edge function on a known directed edge.
T3 reference triangle (2,2)(12,2)(2,12) -> exactly 36 pixels
covered with strict-interior convention.
T4 individual known-in / known-out pixels for the reference
triangle.
T5 vertex corners themselves are NOT drawn (strict-interior
convention; edge function evaluates to zero on vertex).
T6 degenerate (collinear) triangle -> 0 pixels written.
T7 back-facing (CW; negative area) triangle -> 0 pixels written.
T8 triangle fully outside framebuffer -> 0 pixels written;
no crash; bounding-box clip is honest.
T9 triangle partially outside framebuffer -> only in-bounds
pixels written; clipped pixels are silently not drawn (not
silently corrupted past the buffer).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_framebuffer.nxnx_raster_sw.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 26 | func main() -> i64 |