Wednesday 23 January 2013

possible glsl compiler bug on samsung galaxy tab 2?

This is an example taken from some real code. This doesn't compile on my Samsung Galaxy Tab 2:
#define some_macro(x_)    void some_function(vec4 some_arg some_macro(FOO))  {    }  
The idea is that the "some_macro(FOO)" piece in the argument list should expand to nothing. Instead this generates an error message like "ERROR: 0:520: '(' : syntax error" which I assume refers to the left parent in the macro call. Android parameter-less macro (simple #define) works fine in the same place.
I'm not terribly concerned with having to refactor my code to avoid this syntax, but I'm wondering if anyone knows if this code should work according to the GLSL ES spec. This compiles fine on other devices fine (like the Galaxy Note II).

0 comments:

Post a Comment