[Mesa-dev] [PATCH v2 0/6] radeonsi: gl_BaseVertex fix in non-indexed draws

Nicolai Hähnle nhaehnle at gmail.com
Wed Apr 12 09:19:57 UTC 2017


Hi all,

This is the alternative approach to ensuring that gl_BaseVertex == 0 in
non-indexed draws.

During this, it occurred to me that the earlier approach could also be
improved just by saying

+       if (info->indexed != sctx->current_indexed) {
+               sctx->current_indexed = info->indexed;
+
+               if (sctx->vs_shader.cso->info.uses_basevertex)
+                       sctx->do_update_shaders = true;
+       }

which should avoid going through update shaders in the vast majority of
cases.

At the end of the day, there's probably not a huge difference either way.
This current version has the advantage of preparing us if something else
comes up that would require sending state to the VS.

Please review!
Thanks,
Nicolai



More information about the mesa-dev mailing list