Files
test/source/blender/render/RE_compositor.hh
Omar Emara 0dca908191 Compositor: Add GPU per-node execution time report
This patch adds support for timing GPU compositor executions. This was
previously not possible since there was no mechanism to measure GPU
calls, which is still the case. However, since 2cf8b5c4e1, we now flush
GPU calls immediately for interactive editing, so we can now measure the
GPU evaluation on the host, which is not a very accurate method, but it
is better than having no timing information. Therefore, timing is only
implemented for interactive editing.

This is different from the CPU implementation in that it measures the
total evaluation time, including any preprocessing of the inputs like
implicit type conversion as well as things like previews.

The profiling implementation was moved to the realtime compositor since
the compositor module is optional.

Pull Request: https://projects.blender.org/blender/blender/pulls/122230
2024-05-28 08:13:46 +02:00

42 lines
1.3 KiB
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#include <memory>
namespace blender::realtime_compositor {
class RenderContext;
class Profiler;
} // namespace blender::realtime_compositor
struct bNodeTree;
struct Depsgraph;
struct Render;
struct RenderData;
struct Scene;
/* ------------------------------------------------------------------------------------------------
* Render Realtime Compositor
*
* Implementation of the compositor for final rendering, as opposed to the viewport compositor
* that is part of the draw manager. The input and output of this is pre-existing RenderResult
* buffers in scenes, that are uploaded to and read back from the GPU. */
namespace blender::render {
class RealtimeCompositor;
}
/* Execute compositor. */
void RE_compositor_execute(Render &render,
const Scene &scene,
const RenderData &render_data,
const bNodeTree &node_tree,
const char *view_name,
blender::realtime_compositor::RenderContext *render_context,
blender::realtime_compositor::Profiler *profiler);
/* Free compositor caches. */
void RE_compositor_free(Render &render);