https://github.com/shader-slang/slang
Raw File
Tip revision: 975c5db3f0a71bc93369a321318e7d3b43001ff5 authored by jsmall-nvidia on 17 July 2020, 20:38:18 UTC
Disable specializing function calls if they have a struct param, that contains an array (#1448)
Tip revision: 975c5db
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