Skip to content

no more shader-warnings

Erik Faye-Lund requested to merge kusma/virglrenderer:shader-no_warnings into master

OK, so here's an attempt to take this strbuf thing a bit further, to eliminate the rest of the string-length warnings.

I've only done a quick sanity test that rendering kinda works, as I'm not 100% sure if we want to do this like this or not. The reasons I think we could do better are:

  • This moves a lot more allocations to the heap rather than the stack. I'm not sure this is a real problem, but it makes me worry a bit. We could have an initial static buffer inside each vrend_strbuf or something like that perhaps? But that would make the next point a tad worse than it is now.
  • It kinda turns vrend_strbuf into a "jack of all trades, master of none". I don't think this is that bad, though.
  • It drops a couple of unit tests. I can probably refactor this to gain them back, but I'm not sure it's worth spending too much more time on at this point.
  • It doesn't go all the way; there's still quite a bit of open-coded snprintfs here that are kinda hard to prove correctness of. At least the compiler doesn't complain any more.
Edited by Erik Faye-Lund

Merge request reports

Loading