Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2022-10-19 05:02:39 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2022-10-20 03:23:28 +0300
commit3411a96e74938afe9b7ffe64e61a225da5f2eb6a (patch)
treef6585fc86ec35c6a5db1a9be6fd519f3d509f73c /source/blender/draw/intern/draw_manager.c
parente3075f3cf7ce2fae086f3cd09867e4f0455e4115 (diff)
Fix T93382: Blender still generates subsurface render passes
In T93382, the problem was that the Blender-side rendering code was still generating the subsurface passes because the old render pass flags were set, even though Cycles doesn't generate them anymore. After a closer look, it turns out that the entire hardcoded pass creation code can be removed. We already have an Engine API function to query the list of render passes from the engine, so we might as well just call that and create the returned passes. Turns out that Eevee already did this anyways. On the Cycles side, it allows to deduplicate a lot of `BlenderSync::sync_render_passes`. Before, passes were defined in engine.py and in sync.cpp. Now, all passes that engine.py returns are created automatically, so sync.cpp only needs to handle a few special cases. I'm not really concerned about affecting external renderer addons, since they already needed to handle the old "builtin passes" in their Engine API implementation anyways to make them show up in the compositor. So, unless they missed that for like 10 releases, they should not notice any difference. Differential Revision: https://developer.blender.org/D16295
Diffstat (limited to 'source/blender/draw/intern/draw_manager.c')
-rw-r--r--source/blender/draw/intern/draw_manager.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index da77845feb4..b9a9780e651 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1959,20 +1959,6 @@ void DRW_render_gpencil(struct RenderEngine *engine, struct Depsgraph *depsgraph
DST.buffer_finish_called = false;
}
-/* Callback function for RE_engine_update_render_passes to ensure all
- * render passes are registered. */
-static void draw_render_result_ensure_pass_cb(void *user_data,
- struct Scene *UNUSED(scene),
- struct ViewLayer *view_layer,
- const char *name,
- int channels,
- const char *chanid,
- eNodeSocketDatatype UNUSED(type))
-{
- RenderEngine *engine = user_data;
- RE_engine_add_pass(engine, name, channels, chanid, view_layer->name);
-}
-
void DRW_render_to_image(RenderEngine *engine, struct Depsgraph *depsgraph)
{
Scene *scene = DEG_get_evaluated_scene(depsgraph);
@@ -2023,10 +2009,6 @@ void DRW_render_to_image(RenderEngine *engine, struct Depsgraph *depsgraph)
/* set default viewport */
GPU_viewport(0, 0, size[0], size[1]);
- /* Update the render passes. This needs to be done before acquiring the render result. */
- RE_engine_update_render_passes(
- engine, scene, view_layer, draw_render_result_ensure_pass_cb, engine);
-
/* Init render result. */
RenderResult *render_result = RE_engine_begin_result(engine,
0,