On Fri, May 19, 2017 at 06:38:03AM -0700, Ian Romanick wrote: > From: Ian Romanick <ian.d.roman...@intel.com> > > The previous code handled everything with the general case. I noticed > that every time I converted an open-coded check to use a > _mesa_has_EXT_foo() function, the text size of the driver increased. > > Almost all extensions only care what the current context API is, and > the version does not matter. Handle those using more compact checks. > > text data bss dec hex filename > 7037675 235248 37280 7310203 6f8b7b 32-bit i965_dri.so before > 7034307 235248 37280 7306835 6f7e53 32-bit i965_dri.so after > 6679695 303400 50608 7033703 6b5367 64-bit i965_dri.so before > 6676143 303400 50608 7030151 6b4587 64-bit i965_dri.so after >
Hi Ian, I wrote a patch some time ago that reduces the cost of the extension checks by a lot more with less code. The only thing I think may need addressing is endianness. Would you consider using it instead if I reworked it and sent it out to the list? You can find it here: https://cgit.freedesktop.org/~nchery/mesa/commit/?h=1/ext/optimize&id=a02d88eba1d3129b27d3b5e6aaa976c3ca20cf79 Thanks, Nanley _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev