If we set the shift up correctly, we can get the 64-bit wrapping
behavior to work for us instead of adding an instruction to wrap
manually. While we're at it, set known-unused sources to 0.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
Instead of scattering number checks everywhere, this lets us actually
start splitting code paths. This commit just adds the shader model
trait. Later commits will add more methods.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141>
Once we start using UGPRs, it's possible to have a vector with a mix of
GPRs and UGPRs. This isn't actually allowed by the hardware but it's
possible as an intermediate state thanks to copy-propagation.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29591>
Instead, do the same thing we do for float modifiers and use OpIAdd2 or
OpIAdd3. This makes for a little more work in copy-prop but the extra
opcode and lowering pass just isn't worth it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29591>
This commit nak: implement SHL and SHR on SM50 caused a regression on
KHR-GL45.gpu_shader_fp64.* using zink.
This fixes the regression, by setting the wrap fields.
Fixes: 00be041ffc ("nak: implement SHL and SHR on SM50")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26586>
IMAD64 does not exist on SM50, so we're using IMUL instead for
nir_op_{i,u}mul_high and nir_op{i,u}mul_2x32_64. Longer-term we may want
to replace this with XMAD for better perf.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26114>
SHF.{L,R} is supported, but it seems to always write 0 to dst when the
shift value is a register. The only case in nak_from_nir that actually
uses the 64-bit shift is nir_op_isign, which has an immediate shift
value.
This also avoids the SHF.I32 issue, since the only usage is now SHF.I64.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26114>
For now, we're just using this in place of IAdd3x for 64-bit adds. IADD3
with carry flags is supported on SM50, but it works completely
differently from SM75. Longer-term we'll probably want to emit this in
all of the places that we're currently using IADD3.
Also need to hook the carry register up to calc_deps, but for now I'm
just using NAK_DEBUG=serial.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26114>
With this commit, NAK now takes on a more Cargo-like structure with
things split better into crates:
- bitview/
- lib.rs // Formerly bitview.rs
- nak/
- lib.rs // Only pulls stuff into the module
- api.rs // Formerly nak.rs
- ...
- nvfuzz/
- main.rs // Formerly nvfuzz.rs
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26546>
2023-12-06 22:41:47 +00:00
Renamed from src/nouveau/compiler/nak_builder.rs (Browse further)