diff options
Diffstat (limited to 'src/gpu/post_process_helper.cc')
| -rw-r--r-- | src/gpu/post_process_helper.cc | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/src/gpu/post_process_helper.cc b/src/gpu/post_process_helper.cc index 79fda20..871a238 100644 --- a/src/gpu/post_process_helper.cc +++ b/src/gpu/post_process_helper.cc @@ -39,33 +39,13 @@ WGPURenderPipeline create_post_process_pipeline(WGPUDevice device, return pipeline; } -// Helper to create a simple post-processing pipeline (no effect params) -WGPURenderPipeline -create_post_process_pipeline_simple(WGPUDevice device, WGPUTextureFormat format, - const char* shader_code) { - // Headless mode: skip pipeline creation (compiled out in STRIP_ALL) - HEADLESS_RETURN_VAL_IF_NULL(device, nullptr); - - WGPUBindGroupLayout bgl = - BindGroupLayoutBuilder() - .sampler(PP_BINDING_SAMPLER, WGPUShaderStage_Fragment) - .texture(PP_BINDING_TEXTURE, WGPUShaderStage_Fragment) - .uniform(PP_BINDING_UNIFORMS, - WGPUShaderStage_Vertex | WGPUShaderStage_Fragment) - .build(device); - - const std::string composed_shader = - ShaderComposer::Get().Compose({}, shader_code); - - WGPURenderPipeline pipeline = RenderPipelineBuilder(device) - .shader(composed_shader.c_str()) - .bind_group_layout(bgl) - .format(format) - .build(); - - wgpuBindGroupLayoutRelease(bgl); - return pipeline; -} +// NOTE: create_post_process_pipeline_simple() was removed (zero callers). +// If a 3-binding pipeline is needed in the future, add a `bool use_effect_params` +// parameter to create_post_process_pipeline() instead. +// Example: +// WGPURenderPipeline p = create_post_process_pipeline(device, format, code); +// // Then pass {nullptr, 0} as effect_params to pp_update_bind_group — +// // the dummy buffer fallback handles it automatically. void gpu_upload_mat4(WGPUQueue queue, WGPUBuffer buffer, size_t offset, const mat4& m) { |
