Skip to content

Commit 439177e

Browse files
committed
save plan & thoughts in comments
1 parent 3718dfc commit 439177e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/nbl/asset/utils/CWaveStringResolver.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,33 @@
88
options remain and there is no mismatch, we force agressive inlining and optimizations mostly regardless build configuration by default
99
*/
1010

11+
/*
12+
Arek leaving thoughts, TODO:
13+
14+
in NBL_WAVE_STRING_RESOLVER_TU_DEBUG_OPTIMISATION mode enabled -> here in this TU do
15+
16+
#define _ITERATOR_DEBUG_LEVEL 0
17+
#define _HAS_ITERATOR_DEBUGGING 0
18+
19+
and allow Nabla to mismatch debug iterator *on purpose* by
20+
21+
#define _ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH
22+
23+
in Debug/RWDI
24+
25+
then make resolveString full C API with raw in/out pointers and bytes out pointer,
26+
with mismtach we must be very careful about memory ownership as STL stuff will have
27+
different struct layouts and its easy to make a crash, we will have extra memcpy and
28+
deallocation but as a trade each config will have almost the same preprocessing perf
29+
which matters for our NSC integration
30+
31+
then we can think to make use of existing shader cache and maybe consider HLSL PCH
32+
which NSC would inject into each input
33+
34+
NOTE: this approach allows to do all in single Nabla module, no extra proxy/fake shared DLL needed!
35+
NOTE: yep I know I have currently a callback for which context size will differ accross TUs afterwards but will think about it
36+
*/
37+
1138
#include "nbl/asset/utils/IShaderCompiler.h"
1239

1340
using namespace nbl;

0 commit comments

Comments
 (0)