Generates bi_index from nir_alu_src, taking into account the applied
swizzle, and using (swizzle / 32-bit) portion as an offset, to be
applied later during RA. The sub 32-bit portion only applies for 8-bit
and 16-bit instructions, which need to either handle them explicitly as
a swizzle specifier, or lower to a swizzle explicitly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>
In the medium term we'll want to overhaul these masks entirely since
they don't make much sense anymore, but as a stop gap, this will let us
reuse the existing liveness, RA, and DCE infrastructure.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>
Based on existing packing infrastructure, though modifier handling is
greatly simplified by using canonical modifier encodings in the IR.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>
For bitwise ops, we define .neg to mean .not to keep the IR manageable
("complement" more generally), but it's convenient to have specialized
names.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>
This has flake potential. There is clearly a hardware bug here but I
can't figure out what the correct solution is (padding out with nops
causes other tests to flake in turn).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>
If we're going to check that the size matches, we should consider the
buffer offset too. I haven't tracked down any testcases doing this, but
it seems obviously correct.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8276>
We've got the new lookup with size+ptr, just use that one for querying
buffer size.
This means we now return 0 instead of undefined for unbound buffers, but
it also means we return 0 for a buffer view with a size larger than that
of the underlying buffer.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8276>
We were ignoring the requested size of the load in the overflow handling
and would read past the end of buffers, rather than just returning 0 as
robustness would like us to do.
Fixes valgrind complaint on softpipe in:
EQP-GLES31.functional.shaders.builtin_functions.common.sign.float_mediump_compute
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8276>
I needed to refactor SSBOs to deal with a buffer overflow, and it's easier
to just delete the SSBO atomic code from the interface.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8276>
It was only executing the first channel, ignoring the rest. I also
cleaned things up to not loop over rgba, since atomics are only ever to a
single 32-bit value per invocation.
This worked on softpipe previously because it only dispatches 1 CS
invocation per TGSI exec machine anyway, wasting the other 3 slots.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8276>
If you deleted your old GS and created a new one, then it would
occasionally skip binding the new GS because the token pointers were
equal. Clear the current token pointer in the machine when we're deleting
its token.
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8277>