mesa/src/panfrost
Alyssa Rosenzweig 0fcddd4d2c pan/bi: Rework varying linking on Valhall
Valhall introduces hardware-allocated varyings. Instead of allocating varying
descriptors on the CPU with a slot based interface, the driver just tells the
hardware how many bytes to allocate per vertex and loads/stores with byte
offsets. This is much nicer!

However, this requires us to rework our linking code to account for separable
shaders. With separable shaders, we can't rely on driver_location matching
between stages, and unlike on Midgard, we can't resolve the differences with
curated command stream descriptors. However, we *can* rely on slots matching. So
we should "just" determine the byte offsets based on the slot, and then
separable shaders work.

For GLES, it really is that easy.

For desktop GL, it's not -- desktop GL brings unpredictable extra varyings like
COL1 and TEX2. Allocating space for all of these unconditionally would hamper
performance. To cope, we key fragment shaders to the set of non-GLES varyings
written by the linked vertex shader. Then we may define an efficient ABI, where
only apps only pay for what they use.

Fixes various tests in dEQP-GLES31.functional.separate_shader.random.* on
Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16310>
2022-05-04 13:07:59 +00:00
..
bifrost pan/bi: Rework varying linking on Valhall 2022-05-04 13:07:59 +00:00
ci panfrost/ci: Smoke test spilling 2022-05-04 12:48:27 +00:00
drm-shim panfrost: Advertise all textures in drm-shim 2022-04-26 17:47:49 +00:00
ds pps: allow drivers to report timestamps in their own time domain 2021-11-22 11:52:46 +00:00
include panfrost: Centralize our model list 2022-01-28 17:47:46 +00:00
lib pan/bi: Rework varying linking on Valhall 2022-05-04 13:07:59 +00:00
midgard nir/lower_tex: Make the adding a 0 LOD to nir_op_tex in the VS optional. 2022-04-28 21:26:08 +00:00
perf panfrost: Get performance counters from table 2022-01-28 17:47:46 +00:00
shared lima,panfrost: Use row stride for tiling routines 2022-05-03 14:20:15 +00:00
util pan/bi: Rework varying linking on Valhall 2022-05-04 13:07:59 +00:00
vulkan panvk: Don't use VARYING_SLOT_TEX0 internally 2022-05-04 13:07:59 +00:00
meson.build panfrost: drm-shim support 2021-08-17 22:06:17 +00:00