mesa/src/panfrost/util
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
..
lcra.c panfrost/lcra: Fix constraint counting 2021-03-01 17:09:58 +00:00
lcra.h pan/lcra: Allow per-variable bounds to be set 2020-05-21 17:49:14 +00:00
meson.build panfrost: Use common blend lowering 2021-05-07 17:25:21 +00:00
nir_mod_helpers.c panfrost: Add modifier detection helpers 2020-05-19 20:21:27 +00:00
pan_ir.c pan/mdg: Push uniforms based on UBO analysis 2021-02-11 17:24:37 +00:00
pan_ir.h pan/bi: Rework varying linking on Valhall 2022-05-04 13:07:59 +00:00
pan_liveness.c pan/mdg: Free previous liveness 2020-08-20 18:15:01 +02:00
pan_lower_64bit_intrin.c nir: Rename WORK_GROUP (and similar) to WORKGROUP 2021-06-07 22:34:42 +00:00
pan_lower_framebuffer.c panfrost: Centralize our model list 2022-01-28 17:47:46 +00:00
pan_lower_framebuffer.h panfrost: Don't pass quirks to pan_lower_framebuffer 2022-01-28 17:47:46 +00:00
pan_lower_helper_invocation.c nir: Make nir_ssa_def_rewrite_uses take an SSA value 2021-03-08 16:59:55 +00:00
pan_lower_sample_position.c nir: Make nir_ssa_def_rewrite_uses take an SSA value 2021-03-08 16:59:55 +00:00
pan_lower_writeout.c panfrost: Remove pan_nir_reorder_writeout 2022-01-02 01:12:05 +00:00
pan_sysval.c pan/blend: Allow passing blend constants through a sysval 2021-09-30 16:54:42 +02:00