code wiki / (root) / nx_raster_sw_test.nx

nx_raster_sw_test.nx

buildroot/runtime/nx_raster_sw_test.nx

5094 B118 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic raster
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_framebuffer.nx nx_raster_sw.nx nx_raster_sw_test.nx

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

main nx_fb_alloc sys_mmap nx_fb_pack_rgba nx_fb_clear nx_raster_signed_area_2x nx_raster_edge nx_raster_triangle nx_raster_signed_area_2x ↻ nx_raster_min3 nx_raster_max3 nx_raster_clamp nx_raster_edge ↻ nx_fb_set nx_fb_get

structs

none

consts

none

functions

26func main() -> i64