mirror of
https://github.com/libretro/glslang.git
synced 2024-11-30 19:30:40 +00:00
fcb4ed054c
- consistently dealing with EOF and its effect on error recovery (bug 11444, #1) - turning a simulated OO hierarchy of function pointers and typecasting into a real C++ class hierarchy - correctly handling '\' everywhere, in all classes of tokens, as a layer before preprocessing itself - conditionally handling '\n' in macro expansion input, depending on whether it is in a macro expression or not - delete some unused "memory cleanup" code git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24626 e7fa87d3-cd2b-0410-9028-fcbf551c1848
62 lines
828 B
GLSL
62 lines
828 B
GLSL
#version 110
|
|
|
|
#define ON
|
|
|
|
float sum = 0.0;
|
|
|
|
void main()
|
|
{
|
|
|
|
#ifdef ON
|
|
//yes
|
|
sum += 1.0;
|
|
#endif
|
|
|
|
#ifdef OFF
|
|
//no
|
|
sum += 20.0;
|
|
#endif
|
|
|
|
#if defined(ON)
|
|
//yes
|
|
sum += 300.0;
|
|
#endif
|
|
|
|
#if defined(OFF)
|
|
//no
|
|
sum += 4000.0;
|
|
#endif
|
|
|
|
#if !defined(ON)
|
|
//no
|
|
sum += 50000.0;
|
|
#endif
|
|
|
|
#if !defined(OFF)
|
|
//yes
|
|
sum += 600000.0;
|
|
#endif
|
|
|
|
#if defined (ON) && defined (OFF)
|
|
//no
|
|
sum += 7000000.0;
|
|
#endif
|
|
|
|
#if defined ( ON ) && ! defined(OFF)
|
|
//yes
|
|
sum += 80000000.0;
|
|
#endif
|
|
|
|
#if defined(OFF) || defined(ON)
|
|
//yes
|
|
sum += 900000000.0;
|
|
#endif
|
|
|
|
// sum should be 980600301.0
|
|
gl_Position = vec4(sum);
|
|
}
|
|
|
|
#define FUNC(a,b) a+b
|
|
// needs to be last test in file due to syntax error
|
|
void foo986(){ FUNC( (((2)))), 4); } // ERROR, too many )
|