Now that the SSO ABI is never used we can remove it with all of the
plumbing code required to find the fixed varyings bits.
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
Now that everything is using the new layout to emit descriptors we can
switch to the compact ABI. Even without mediump lowering this should
still offer increased performance for separate shaders, it also unifies
OpenGL and Vulkan code paths.
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
Midforst no longer uses auto32, we can hopefully remove the quirk and
never think about it again.
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
Using explicit types makes the code more easier to reason about, there
is only one edge-case where we still need varying stores but it should
be removed soon.
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
After switching to the new layout we do not need most of the old
varyings info code, remove it.
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
Every compiler is now using varyings_layout, we can remove the old
nir_collect_varyings and live happily ever after.
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
pan_cmdstream handles code common to both JM and CSF,
while valhall v9 didn't use CSF yet, they already used the
new version of the descriptor.
This lead to conditional compilation of various function with
similar names.
This commit renames some version-specific descriptor code to have
a versioned name, either `bi` (bifrost), `mid` (midfrost) or `val`
(valhall), to help with code comprehension.
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
Now that all compilers manually build the right ABI we can stop
automatically building the SSO ABI when we need it. Still keep
some assertions to avoid headaches in the future
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
Thewe new layouts actually take advantage of mediump to save on I/O
bandwidth, instead of focusing just on data types in the shader. Using
them requires that the driver use the varying layout for emitting any
needed varying descriptors.
Co-authored-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
If we're going to use the varying layout from the VS for the FS then we
need to be able to handle minor mismatches. Mostly, this just means we
need to drop the assert that the set of locations matches 1:1. We'll
use the byte offsets from the varying layout when we have one but keep
using the resource handles the driver put in driver_location for
LD_VAR[_IMM].
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
We also store it in the shader variant so that we can get at it from the
API side or from other shader stage compiles.
Co-authored-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
We want to flip the order in which we compile shaders and go in pipeline
stage order. In order to do that and continue to bake in noperspective
varyings, we need to scrape them out of the FS as a separate step.
Fortunately, that's now easy and safe to do.
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
We can easily handle indirect loads by looking at sem.num_slots.
Because noperspective is declared on the entire variable and not
individual slots of an array, we can smash noperspective on for the
whole range if we see an indirect. We also add collect from variables,
which is probably redundant when run late because variables are left
around after lowering I/O but it lets us run the pass before I/O is
lowered.
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
For the descriptor paths, we just assert that the locations match what
we expect and move on. For the direct paths, we use the offsets in the
layout. The compiler also now takes an optional layout which the driver
can provide itself if desired.
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
These can never come from the API but there's a few cases where panvk
wants them.
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
Right now, the varying layout is entirely a series of assumptions made
various places in the driver and compiler. This adds an explicit
structure for tracking the layout which we will eventually plumb through
everywhere.
Co-authored-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
In preparation for future commits, we're builing better alternatives
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
neither pipe_grid_info::block nor pipe_grid_info::grid_base are used
by the GL frontend, and using them in lavapipe prevents the GL side from
working
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37408>
They all do exactly the same thing, except that GS multiplies by an
extra factor, and TCS has urb_read_length == 0 so it skips one line.
No need for four copies.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40328>
Just return the register instead of having multiple functions stash the
register in an array of registers. Way too much hoopla here.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40328>