More fiddling
I am finally on the right track after a breakthrough. I accepted I need
to work out which parts of the uniforms are used at macro-expansion
time. I started looking into processing the lisp shader code to
establish this but places make this non trivial... Luckily though as we
can guarentee the format of the names of the uniform variables we can
use a simple regex on the glsl source code to find all the uses of a
uniform, and not only that but the full 'path' showing what part is
used.
We can then use a relatively simple loop using our existing code to
calculate all the details we need for the uniform assigners.
We will be able to inline the results from this which means we will
finally have much faster pipeline creation, uniform assignment and thus
fast pipeline calls.

The final result will be that only the locations need be queried at
runtime, this will be handled by a supporting function which could
easily be called from the gl-context d-val.

Im closer now but there is lots to do. Will hopefully have more on Saturday
Still implementing the solution but need sleep
Merge branch 'master' of github.com:cbaggers/cepl