Thanks for the follow up Arron! Out of curiosity, is the bug tracker database publicly viewable? I couldn’t find a link to it on Imagination Technologies’ site.
Unfortunately not: the tracker system is internal. I posted the BRN number so that you can use it for reference against future SDK releases as we post a list of fixed BRNs.
I’ve just received an update regarding this issue.
The GLSL specification states that quotation marks are invalid characters outside of comment blocks even inside pre-processor blocks that will not be processed. This is detailed in section 3.1 here: http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.clean.pdf
Moreover, the #include directive you are using in your preprocessor block is also not part of the specification (hence why the quotation marks is not supported). This is detailed in section 3.3.
2. If you look at the appropriate section for "Prepocessor" commands in the GLSL ES document that I linked to (3.4) and GLSL document that you linked to (3.3), they both more or less say that "#if, #ifdef, #ifndef, #else, #elif, and #endif are defined to operate as (is standard) for C++" (The exclusions that the GLSL ES doc then goes on to mention don't seem relevant for this conversation.)
In C++ I can write the following code in one of my files and still compile it successfully. #if 0 4this is not valid code #include #endif
I assume this works because before the compiler runs and checks what characters are valid against the "Character Set" section of the specification, and before other preprocessor commands are evaluated, the #if and related preprocesser commands have been evaluated and any characters inbetween #if 0 and #endif have been removed. Thus the compiler never even knows they were there. Hopefully that made sense and you can still see the validity of my original bug report.
Thanks again for taking the time to share an update!
WhatsInAName2011-10-19 13:35:33
Sorry, I didn’t mean to imply that the GLSL spec is also the GLSL:ES spec. I just linked to the GLSL spec as it’s slightly more verbose the relevant sections.
2. Indeed I can see the validity of your original report (hence why I filed it against our compiler), alas the preprocessor checks for valid characters just as the compiler does - hence why your examples don’t compile.
As a workaround you could easily strip out the offending line/characters before passing it to GL - simple pre-processors are easy to write :).