iris: Several tests fail assertion !options->unify_interfaces
At the very least, on ICL piglit's gl-1.0-edgeflag
fails with:
src/mesa/state_tracker/st_program.c:784: st_create_common_variant: Assertion `!options->unify_interfaces' failed.
Some other tests fail with this assertion too. I bisected this to the following commit, but I haven't had a chance to dig further. Perhaps @anholt will have some ideas...
a76ec17f12c39a88cf44e039a62ed74aca4a19f2 is the first bad commit
commit a76ec17f12c39a88cf44e039a62ed74aca4a19f2
Author: Emma Anholt <emma@anholt.net>
Date: Tue May 18 16:57:30 2021 -0700
mesa/st: Fix iris regression with clip distances.
In general gallium shaders are all SSO and it's up to the driver to handle
lining up varying storage between stages at draw time. However, there's a
NIR option "unify_interfaces" that iris uses which applies to non-SSO (as
indicated by nir->info.separate_shader) shaders and makes the inputs_read
and outputs_written match up at GLSL-to-NIR link time, and then iris then
avoids any lowering passes that would add new varyings.
By introducing info gathering after variant creation (because all I knew
was "gallium is always SSO"), I broke the unify_interfaces link-time setup
on iris. Just skip that when the unify_interfaces flag is set, and add
some asserts to catch anyone trying to mix unify_interfaces with known
varying-adjusting lowering passes.
Closes: #4450
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10876>
src/mesa/state_tracker/st_program.c | 19 ++++++++++++++++---