Skip to content

nil: Enforce units via Rust types

Faith Ekstrand requested to merge gfxstrand/mesa:nvk/nil-rs-types into main

We add a units generic parameter to Extent4D and Offset4D and then make every helper take and return the right type. The mul and div_* helpers only half-enforce types but it's better than nothing. We leave them non-public so no one outside extent.rs uses them.

Merge request reports

Loading