File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 55#define _NBL_BUILTIN_HLSL_MACROS_INCLUDED_
66
77#ifdef __HLSL_VERSION
8+ // TODO: DXC doesn't get this, we need our own
89#define static_assert (...) _Static_assert (__VA_ARGS__)
10+
911// TODO: switch between enabled and disabled depending on Nabla build config
10- #define assert (expr ) \
12+ #ifdef _NBL_DEBUG
13+ #define assert (...) \
1114{ \
12- bool con = (expr ); \
15+ bool con = (__VA_ARGS__ ); \
1316 do { \
1417 [branch] if (!con) \
1518 vk::RawBufferStore<uint32_t >(0xdeadbeefBADC0FFbull ,0x45u ,4u ); \
1619 } while (!con); \
1720}
21+ #else
22+ #define assert (...)
23+ #endif
24+
1825#else
1926
27+ // TODO: this is kinda useless, remove
2028#define NBL_ALIAS_TEMPLATE_FUNCTION (origFunctionName, functionAlias ) \
2129template <typename ... Args> \
2230inline auto functionAlias (Args&&... args) -> decltype(origFunctionName(std::forward<Args>(args)...)) \
You can’t perform that action at this time.
0 commit comments