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 5
5
#define _NBL_BUILTIN_HLSL_MACROS_INCLUDED_
6
6
7
7
#ifdef __HLSL_VERSION
8
+ // TODO: DXC doesn't get this, we need our own
8
9
#define static_assert (...) _Static_assert(__VA_ARGS__)
10
+
9
11
// TODO: switch between enabled and disabled depending on Nabla build config
10
- #define assert (expr ) \
12
+ #ifdef _NBL_DEBUG
13
+ #define assert (...) \
11
14
{ \
12
- bool con = (expr ); \
15
+ bool con = (__VA_ARGS__ ); \
13
16
do { \
14
17
[branch] if (!con) \
15
18
vk::RawBufferStore<uint32_t >(0xdeadbeefBADC0FFbull ,0x45u ,4u ); \
16
19
} while (!con); \
17
20
}
21
+ #else
22
+ #define assert (...)
23
+ #endif
24
+
18
25
#else
19
26
27
+ // TODO: this is kinda useless, remove
20
28
#define NBL_ALIAS_TEMPLATE_FUNCTION (origFunctionName, functionAlias ) \
21
29
template <typename ... Args> \
22
30
inline auto functionAlias (Args&&... args) -> decltype(origFunctionName(std::forward<Args>(args)...)) \
You can’t perform that action at this time.
0 commit comments