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:
authorJesse Yurkovich <jesse.y@gmail.com>2022-03-16 06:53:10 +0300
committerJesse Yurkovich <jesse.y@gmail.com>2022-03-16 07:12:49 +0300
commit24ada9c96027971e50e9d103c746d674024b6892 (patch)
tree78ccfa159494fdcb9b0c7b46427b5c6ba948a93f /source/blender/render/RE_pipeline.h
parentf1501ac0608bef767890f78221ca710bf8900b59 (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/RE_pipeline.h')
-rw-r--r--source/blender/render/RE_pipeline.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/render/RE_pipeline.h b/source/blender/render/RE_pipeline.h
index 21be690a56e..a8436772299 100644
--- a/source/blender/render/RE_pipeline.h
+++ b/source/blender/render/RE_pipeline.h
@@ -123,8 +123,8 @@ typedef struct RenderResult {
ListBase views; /* RenderView */
/* allowing live updates: */
- volatile rcti renrect;
- volatile RenderLayer *renlay;
+ rcti renrect;
+ RenderLayer *renlay;
/* for render results in Image, verify validity for sequences */
int framenr;
@@ -248,9 +248,7 @@ void RE_render_result_rect_from_ibuf(struct RenderResult *rr,
int view_id);
struct RenderLayer *RE_GetRenderLayer(struct RenderResult *rr, const char *name);
-float *RE_RenderLayerGetPass(volatile struct RenderLayer *rl,
- const char *name,
- const char *viewname);
+float *RE_RenderLayerGetPass(struct RenderLayer *rl, const char *name, const char *viewname);
bool RE_HasSingleLayer(struct Render *re);
@@ -400,7 +398,7 @@ void RE_display_clear_cb(struct Render *re,
void (*f)(void *handle, RenderResult *rr));
void RE_display_update_cb(struct Render *re,
void *handle,
- void (*f)(void *handle, RenderResult *rr, volatile struct rcti *rect));
+ void (*f)(void *handle, RenderResult *rr, struct rcti *rect));
void RE_stats_draw_cb(struct Render *re, void *handle, void (*f)(void *handle, RenderStats *rs));
void RE_progress_cb(struct Render *re, void *handle, void (*f)(void *handle, float));
void RE_draw_lock_cb(struct Render *re, void *handle, void (*f)(void *handle, bool lock));
@@ -429,13 +427,13 @@ int RE_seq_render_active(struct Scene *scene, struct RenderData *rd);
bool RE_layers_have_name(struct RenderResult *result);
bool RE_passes_have_name(struct RenderLayer *rl);
-struct RenderPass *RE_pass_find_by_name(volatile struct RenderLayer *rl,
+struct RenderPass *RE_pass_find_by_name(struct RenderLayer *rl,
const char *name,
const char *viewname);
/**
* Only provided for API compatibility, don't use this in new code!
*/
-struct RenderPass *RE_pass_find_by_type(volatile struct RenderLayer *rl,
+struct RenderPass *RE_pass_find_by_type(struct RenderLayer *rl,
int passtype,
const char *viewname);