panfrost: don't try to emit varying shader stats on v12+

On v12+, IDVS no longer has separate position and varying variants, so
we only need to emit stats for one binary. Attempting to emit stats for
the nonexistent varying shader breaks shader-db.

Fixes: 7819b103fa ("pan/bi: Add support for IDVS2 on Avalon")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
(cherry picked from commit 31ddfe26eb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
This commit is contained in:
Olivia Lee 2026-04-07 00:01:05 -07:00 committed by Eric Engestrom
parent 6c5ec9424d
commit 665974c934
2 changed files with 3 additions and 2 deletions

View file

@ -2464,7 +2464,7 @@
"description": "panfrost: don't try to emit varying shader stats on v12+",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "7819b103fa70b79e4f3de5b8a2bf6705ecacca9c",
"notes": null

View file

@ -220,7 +220,8 @@ panfrost_shader_compile(struct panfrost_screen *screen, const nir_shader *ir,
/* Report stats only if we really got the shader compiled */
if (out->binary.size > 0) {
if (s->info.stage == MESA_SHADER_VERTEX && out->info.vs.idvs) {
if (s->info.stage == MESA_SHADER_VERTEX &&
out->info.vs.secondary_offset) {
pan_stats_util_debug(dbg, "MESA_SHADER_POSITION",
&out->info.stats);
pan_stats_util_debug(dbg, "MESA_SHADER_VERTEX",