diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-17 11:16:24 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-17 11:16:24 +0100 |
| commit | bd26bc743933dcd5241fc87d160a893f83644dfb (patch) | |
| tree | 373aa9c866fc6f6bbc58f4e27395f58563acbccc /src/gpu/sequence.h | |
| parent | a1789611cdce872c2cecb2c6412c9eda12745916 (diff) | |
docs(gpu): Purge comment bloat from GPU headers
Removed redundant and obvious comments from 7 GPU headers:
- post_process_helper.h: binding comments, stale UniformsSequenceParams note
- shader_composer.h: verbose Compose/VerifyIncludes descriptions
- uniform_helper.h: obvious method comments
- effect.h: redundant render/resize comments
- gpu.h: verbose struct/header comments, GPU perf placeholder
- sdf_effect.h: obvious method comments
- sequence.h: duplicate header, obvious API comments
Kept only non-obvious context (binding conventions, headless mode notes).
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/gpu/sequence.h')
| -rw-r--r-- | src/gpu/sequence.h | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/src/gpu/sequence.h b/src/gpu/sequence.h index 0f448ce..3bb770f 100644 --- a/src/gpu/sequence.h +++ b/src/gpu/sequence.h @@ -1,5 +1,4 @@ -// Sequence: Explicit node system with DAG effect routing -// DAG-based effect routing with ping-pong optimization +// Sequence: DAG-based effect routing with ping-pong optimization #ifndef SEQUENCE_H #define SEQUENCE_H @@ -16,11 +15,11 @@ class Effect; enum class NodeType { - U8X4_NORM, // RGBAu8 normalized (0-1) - default Source/Sink - F32X4, // RGBA float32 - F16X8, // 8-channel float16 - DEPTH24, // Depth buffer - COMPUTE_F32, // Compute buffer + U8X4_NORM, // RGBAu8 (default Source/Sink) + F32X4, + F16X8, + DEPTH24, + COMPUTE_F32, }; struct Node { @@ -49,29 +48,22 @@ class NodeRegistry { NodeRegistry(WGPUDevice device, int default_width, int default_height); ~NodeRegistry(); - // Declare new node with explicit type/dimensions void declare_node(const std::string& name, NodeType type, int width, int height); - // Declare aliased node (ping-pong optimization) void declare_aliased_node(const std::string& name, const std::string& alias_of); - // Retrieve views WGPUTextureView get_view(const std::string& name); std::vector<WGPUTextureView> get_output_views(const std::vector<std::string>& names); - // Retrieve texture (for blits) WGPUTexture get_texture(const std::string& name); - // Resize all nodes void resize(int width, int height); - // Check if node exists bool has_node(const std::string& name) const; - // Register external view (for source/sink managed externally) void set_external_view(const std::string& name, WGPUTextureView view); private: @@ -79,7 +71,7 @@ class NodeRegistry { int default_width_; int default_height_; std::map<std::string, Node> nodes_; - std::map<std::string, std::string> aliases_; // name -> backing node name + std::map<std::string, std::string> aliases_; void create_texture(Node& node); }; @@ -88,7 +80,7 @@ struct EffectDAGNode { std::shared_ptr<Effect> effect; std::vector<std::string> input_nodes; std::vector<std::string> output_nodes; - int execution_order; // Topologically sorted + int execution_order; }; class Sequence { @@ -96,7 +88,6 @@ class Sequence { Sequence(const GpuContext& ctx, int width, int height); virtual ~Sequence() = default; - // Virtual methods (most sequences use defaults) virtual void preprocess(float seq_time, float beat_time, float beat_phase, float audio_intensity); virtual void postprocess(WGPUCommandEncoder encoder); @@ -104,20 +95,16 @@ class Sequence { void resize(int width, int height); - // Initialize effect nodes (call at end of subclass constructor) void init_effect_nodes(); - // Set surface texture view for rendering (sink node) void set_sink_view(WGPUTextureView view) { nodes_.set_external_view("sink", view); } - // Set source texture view (input framebuffer) void set_source_view(WGPUTextureView view) { nodes_.set_external_view("source", view); } - // Test accessor const std::vector<EffectDAGNode>& get_effect_dag() const { return effect_dag_; } |
