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>
this makes tessellation work as expected in apps but has no impact on unit tests
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
Tested-by: Witold Baryluk <witold.baryluk@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8274>
Following up from the classic swrast OSMesa removal in favor of
llvmpipe/softpipe, remove the classic swrast DRI driver. It's unused by
any distribution -- debian was the last holdout until this week, which had
it enabled instead of softpipe on obscure platforms (non-LLVM and hurd).
Now that debian has switched, remove the driver so nobody can accidentally
enable it again.
Fixes: #325, #324, #322, #321, #319, #318, #317, #315, #313, #311, #310,
#306, #305, #304, #302, #301, #300, #299, #298, #297, #293, #289
Reviewed-by: Eric Anholt <eric@anholt.net> (commit message rewritten)
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8069>
Commit 7779b1d71b, disabled clear support
when copying to/from color buffers. According to the performance CI, it
falls within a range of commits that introduced a performance regression
on Bioshock Infinite with Tigerlake. Icelake isn't noticeably affected.
By analyzing a trace of the game, I found a couple cases where that
commit added new partial resolves. Update get_copy_region_aux_settings
to avoid them:
- The trace uploads to R8_UNORM textures. On TGL, these enter the
COMPRESSED_CLEAR state on the upload and are partially resolved before
every subsequent upload. Thankfully, they keep their initial clear
color of all zeroes. Since zeros can survive format reinterpretation,
allow clear support for it.
- The trace copies between RGBA16_FLOAT textures. The ones with zero
clear color are helped by the optimization above. The ones with
non-zero clear color are used as source textures. Thankfully on ICL+,
the clear color used for sampling is in pixel form and can thus be
sampled from with format reinterpretation. Allow clear support for
this case.
I haven't tested the actual performance impact of this change, but it
should be beneficial regardless.
Reported-by: Clayton Craft <clayton.a.craft@intel.com>
Reported-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8262>