Hi Tom! We built a new standalone compiler as part of glsl2 - it should be built as src/glsl/glsl_compiler. You might want to take a look at that. It takes a few options: --dump-ast ...prints out the abstract syntax tree (GLSL source) --dump-hir ...prints out high level IR (before lowering & optimization) --dump-lir ...prints out low lever IR (optimized) --link ...attempts to link the given files
For testing an individual shader, you can just run: glsl_compiler --dump-lir foo.frag If you want to run piglit's glslparsertest using the standalone compiler, create a symlink from piglit/tests/glslparsertest/glslcompiler -> mesa/src/glsl/glsl_compiler. Then, run: ./piglit-run.py -x valgrind tests/external-glslparser.tests results Of course, that only tests parsing...usually, if I want to test shader execution, I'll create a new .shader_test file and use piglit's shader_runner. I actually hadn't seen src/mesa/drivers/glslcompiler before. Is it worth keeping? I imagine we could fold anything useful into the new compiler. I hope this helps! --Kenneth _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev