pan/va: Do not insert NOPs into empty shaders
authorAlyssa Rosenzweig <alyssa@collabora.com>
Sat, 4 Jun 2022 13:32:30 +0000 (09:32 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 6 Jun 2022 14:28:59 +0000 (14:28 +0000)
commite1fb182d90e09a522e0d6e8b8ae18bc3543d9226
tree487b7269ce7b6352d6fe0a1338bb991e56949a99
parente8da8fc5b7429e3aa832e1153f900765951470d4
pan/va: Do not insert NOPs into empty shaders

It's unnecessary and breaks the empty shader optimizations. Noticed while
inspecting a trace from dEQP-GLES3.functional.color_clear.masked_scissored_rgb,
which does not produce any varyings other than gl_Position in its vertex shader
and hence should omit the varying shader.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16868>
src/panfrost/bifrost/valhall/test/test-insert-flow.cpp
src/panfrost/bifrost/valhall/va_insert_flow.c