[Mesa-dev] [PATCH 1/2] glsl: Support GL_ARB_shading_language_include internally.

Eric Anholt eric at anholt.net
Fri Apr 13 11:34:23 PDT 2012


On Wed, 11 Apr 2012 10:46:51 +0200, Olivier Galibert <galibert at pobox.com> wrote:
> No hookup with GL yet.  Planned to be used to simplify profiles.

This is pretty cool.  The payoff in patch 2 is huge.  I'd just been
thinking about how to get that sort of win, with just having a common
file for each version along with the per-target file.  Implementing
#include seems like a way better way to go.

My worry: what happens if a GLSL consumer in the real compiler enables
the extension and #includes something?  It looks like you allow the
extension to be enabled regardless, and just call the NULL get_string
method (also, using 0 in preprocess() instead of NULL?  ew.).

Also, get_string is a super generic name.  Let's
s/get_string/include_get_string/ and be consistent in that name.

I'm hoping cworth and idr can take a look at the cpp and parser bits.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120413/d24a8414/attachment.pgp>


More information about the mesa-dev mailing list