https://github.com/shader-slang/slang
Raw File
Tip revision: 13ff0bd345990c0fdfb7b52ebd5339cddb04889e authored by Tim Foley on 03 March 2021, 19:45:39 UTC
Add GLSL/SPIR-V support got GetAttributeAtVertex (#1733)
Tip revision: 13ff0bd
undef.slang
//TEST:SIMPLE:
// #undef support

// warning: undef of something not defined
#undef FOO

#define BAR 1.0f

float foo() { return BAR + 2.0; }

#ifdef BAR
// okay
#else
#error not okay
#endif

#undef BAR

typedef float BAR;

BAR bar() { return 2.0; }

#if !defined(BAR)
// okay
#else
#error not okay
#endif


#define FOO

#undef FOO
back to top