Commit graph

7 commits

Author SHA1 Message Date
Christian Gmeiner
5fa4c1a191 compiler/rust: Copy NirInstrPrinter from NAK
Switch NAK to it.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31706>
2024-10-18 12:43:52 +00:00
Daniel Almeida
279f38918f nak: memstream: move into common code
Move the memstream code into common code. Other Rust code interfacing
with FILE pointers will find the memstream abstraction useful.

Most notably, pinning is actually enforced this time with PhantomPinned.

Add a .clang-format from a sibling dir (i.e.: compiler/nir) while we're
at it to keep things tidy.

Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30594>
2024-10-17 02:50:21 +00:00
Christian Gmeiner
1421319dcf compiler/rust: Copy MappedInstrs from NAK
Rename it to SmallVec, make it more generic and switch NAK
to it.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31409>
2024-10-01 11:33:35 +00:00
Faith Ekstrand
ab72be6c5e nak,compiler: Move AsSlice to common code
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:19 +00:00
Faith Ekstrand
d723ae9814 compiler/rust: Copy the Rust NIR wrappers from NAK
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:18 +00:00
Christian Gmeiner
ad4a7e32f3 nak: Move cfg to compiler crate
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:18 +00:00
Christian Gmeiner
05bf03c3db nak: Move bitset to compiler crate
This commit intorduces src/compiler/rust crate, which will have
different modules that help to write a backend compiler in Rust.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:18 +00:00