diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/cnn_test.cc | 2 | ||||
| -rwxr-xr-x | tools/seq_compiler.py | 15 |
2 files changed, 13 insertions, 4 deletions
diff --git a/tools/cnn_test.cc b/tools/cnn_test.cc index 70f857e..e5e2d26 100644 --- a/tools/cnn_test.cc +++ b/tools/cnn_test.cc @@ -21,7 +21,7 @@ #include "util/mini_math.h" #include "stb_image.h" -#include "wgpu-native/examples/capture/stb_image_write.h" +#include "stb_image_write.h" #include <cmath> #include <cstdio> diff --git a/tools/seq_compiler.py b/tools/seq_compiler.py index dfd2ea4..09188a5 100755 --- a/tools/seq_compiler.py +++ b/tools/seq_compiler.py @@ -18,6 +18,8 @@ NODE_TYPES = { 'f16x8': 'NodeType::F16X8', 'depth24': 'NodeType::DEPTH24', 'compute_f32': 'NodeType::COMPUTE_F32', + 'gbuf_albedo': 'NodeType::GBUF_ALBEDO', + 'gbuf_rgba32uint': 'NodeType::GBUF_RGBA32UINT', } class NodeDecl: @@ -391,14 +393,21 @@ def generate_cpp(seq: SequenceDecl, sorted_effects: List[EffectDecl], class_name += f'_{seq_index}_Sequence' # Generate includes - # Map class names that share a header file + # Map class names to header stems (default path: effects/<stem>_effect.h) + # Use a full #include string to override the path entirely. CLASS_TO_HEADER = { - 'NtscYiq': 'ntsc', + 'NtscYiq': 'ntsc', + 'GBufferEffect': '#include "../../cnn_v3/src/gbuffer_effect.h"', + 'CNNv3Effect': '#include "../../cnn_v3/src/cnn_v3_effect.h"', } includes = set() for effect in seq.effects: if effect.class_name in CLASS_TO_HEADER: - header = CLASS_TO_HEADER[effect.class_name] + val = CLASS_TO_HEADER[effect.class_name] + if val.startswith('#include'): + includes.add(val) + continue + header = val else: # Convert ClassName to snake_case header header = re.sub('([A-Z])', r'_\1', effect.class_name).lower().lstrip('_') |
