It is reasonable not to write gl_Position in a transform feedback program.
Fixes rendering of the apitrace of Domekeeper in #7798.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21266>
for (unsigned i = 0; i < ARRAY_SIZE(varyings->slots); ++i)
varyings->slots[i] = ~0;
- assert(nir->info.outputs_written & VARYING_BIT_POS);
+ /* gl_Position is implicitly written, although it may validly be absent in
+ * vertex programs run only for transform feedback. Those ignore their
+ * varyings so it doesn't matter what we do here as long as we don't fail.
+ */
varyings->slots[VARYING_SLOT_POS] = base;
base += 4;