diff options
author | Jesse Yurkovich <jesse.y@gmail.com> | 2022-03-16 06:53:10 +0300 |
---|---|---|
committer | Jesse Yurkovich <jesse.y@gmail.com> | 2022-03-16 07:12:49 +0300 |
commit | 24ada9c96027971e50e9d103c746d674024b6892 (patch) | |
tree | 78ccfa159494fdcb9b0c7b46427b5c6ba948a93f /source/blender/render/intern/pipeline.c | |
parent | f1501ac0608bef767890f78221ca710bf8900b59 (diff) |
Cleanup: Remove volatile from RenderResult and related APIs
Volatile fields were introduced to the RenderResult struct years ago[1].
However, volatile is most likely not doing what it was intended to do
in this instance, and is problematic when moving files to c++ (see
discussion from D13962). There are complex rules around what happens to
these fields but none of them guarantee what the above commit alluded to.
This patch drops the volatile and cleans up the APIs surrounding it.
[1] rB7930c40051ef1b1a26140629cf1299aa89eed859
Passing on all platforms:
https://builder.blender.org/admin/#/builders/18/builds/338
Differential Revision: https://developer.blender.org/D14298
Diffstat (limited to 'source/blender/render/intern/pipeline.c')
-rw-r--r-- | source/blender/render/intern/pipeline.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/render/intern/pipeline.c b/source/blender/render/intern/pipeline.c index 913a4d3857b..f66d65ce68c 100644 --- a/source/blender/render/intern/pipeline.c +++ b/source/blender/render/intern/pipeline.c @@ -166,7 +166,7 @@ static void result_nothing(void *UNUSED(arg), RenderResult *UNUSED(rr)) } static void result_rcti_nothing(void *UNUSED(arg), RenderResult *UNUSED(rr), - volatile struct rcti *UNUSED(rect)) + struct rcti *UNUSED(rect)) { } static void current_scene_nothing(void *UNUSED(arg), Scene *UNUSED(scene)) @@ -262,7 +262,7 @@ void RE_FreeRenderResult(RenderResult *rr) render_result_free(rr); } -float *RE_RenderLayerGetPass(volatile RenderLayer *rl, const char *name, const char *viewname) +float *RE_RenderLayerGetPass(RenderLayer *rl, const char *name, const char *viewname) { RenderPass *rpass = RE_pass_find_by_name(rl, name, viewname); return rpass ? rpass->rect : NULL; @@ -890,7 +890,7 @@ void RE_display_clear_cb(Render *re, void *handle, void (*f)(void *handle, Rende } void RE_display_update_cb(Render *re, void *handle, - void (*f)(void *handle, RenderResult *rr, volatile rcti *rect)) + void (*f)(void *handle, RenderResult *rr, rcti *rect)) { re->display_update = f; re->duh = handle; @@ -2743,7 +2743,7 @@ bool RE_passes_have_name(struct RenderLayer *rl) return false; } -RenderPass *RE_pass_find_by_name(volatile RenderLayer *rl, const char *name, const char *viewname) +RenderPass *RE_pass_find_by_name(RenderLayer *rl, const char *name, const char *viewname) { RenderPass *rp = NULL; @@ -2760,7 +2760,7 @@ RenderPass *RE_pass_find_by_name(volatile RenderLayer *rl, const char *name, con return rp; } -RenderPass *RE_pass_find_by_type(volatile RenderLayer *rl, int passtype, const char *viewname) +RenderPass *RE_pass_find_by_type(RenderLayer *rl, int passtype, const char *viewname) { #define CHECK_PASS(NAME) \ if (passtype == SCE_PASS_##NAME) { \ |