panfrost: Don't allocate empty varying buffer

If the FS doesn't actually read any varyings, there's no point.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
This commit is contained in:
Alyssa Rosenzweig 2021-05-20 14:10:25 -04:00 committed by Marge Bot
parent c34b760b9f
commit e95abff4de

View file

@ -2280,9 +2280,11 @@ panfrost_emit_varying_descriptor(struct panfrost_batch *batch,
ctx->streamout.targets[i]);
}
panfrost_emit_varyings(batch,
&varyings[pan_varying_index(present, PAN_VARY_GENERAL)],
stride, vertex_count);
if (stride) {
panfrost_emit_varyings(batch,
&varyings[pan_varying_index(present, PAN_VARY_GENERAL)],
stride, vertex_count);
}
/* fp32 vec4 gl_Position */
*position = panfrost_emit_varyings(batch,