https://github.com/shader-slang/slang
Raw File
Tip revision: 6cbe215e58eeb8edc53d71e8f315e2fb55c0eeee authored by Yong He on 13 December 2023, 00:29:51 UTC
Define `Texture::Sample` for float element types only. (#3403)
Tip revision: 6cbe215
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