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/gpu.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/gpu.h')
| -rw-r--r-- | src/gpu/gpu.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/gpu/gpu.h b/src/gpu/gpu.h index de6c5ba..9a3fd38 100644 --- a/src/gpu/gpu.h +++ b/src/gpu/gpu.h @@ -1,27 +1,23 @@ // This file is part of the 64k demo project. -// It defines the public interface for the GPU rendering system. -// Coordinates WebGPU lifecycle and draw calls. +// GPU rendering system interface. #pragma once #include "platform/platform.h" -struct PlatformState; // Forward declaration +struct PlatformState; -// GPU context bundling device, queue, and surface format struct GpuContext { WGPUDevice device; WGPUQueue queue; WGPUTextureFormat format; }; -// Basic wrapper for WebGPU buffers struct GpuBuffer { WGPUBuffer buffer; size_t size; }; -// Encapsulates a compute operation struct ComputePass { WGPUComputePipeline pipeline; WGPUBindGroup bind_group; @@ -30,7 +26,6 @@ struct ComputePass { uint32_t workgroup_size_z; }; -// Encapsulates a render operation struct RenderPass { WGPURenderPipeline pipeline; WGPUBindGroup bind_group; @@ -48,18 +43,11 @@ WGPUSurface gpu_get_surface(); const GpuContext* gpu_get_context(); -// Placeholder for GPU performance capture. -// This define can be controlled via CMake to conditionally enable profiling -// code. #define ENABLE_GPU_PERF_CAPTURE - -// Helper functions (exposed for internal/future use) struct ResourceBinding { GpuBuffer buffer; - WGPUBufferBindingType type; // e.g., WGPUBufferBindingType_Uniform, - // WGPUBufferBindingType_Storage + WGPUBufferBindingType type; }; -// Cross-platform helper for color attachment initialization inline void gpu_init_color_attachment(WGPURenderPassColorAttachment& attachment, WGPUTextureView view) { attachment.view = view; @@ -71,13 +59,11 @@ inline void gpu_init_color_attachment(WGPURenderPassColorAttachment& attachment, #endif } -// Texture creation helper struct TextureWithView { WGPUTexture texture; WGPUTextureView view; }; -// Platform-abstracted texture copy types #if defined(DEMO_CROSS_COMPILE_WIN32) using GpuTextureCopyInfo = WGPUImageCopyTexture; using GpuTextureDataLayout = WGPUTextureDataLayout; |
