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:
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_hizbuffer.hh')
-rw-r--r--source/blender/draw/engines/eevee/eevee_hizbuffer.hh13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_hizbuffer.hh b/source/blender/draw/engines/eevee/eevee_hizbuffer.hh
index 5b29cc089c0..1d84349ba43 100644
--- a/source/blender/draw/engines/eevee/eevee_hizbuffer.hh
+++ b/source/blender/draw/engines/eevee/eevee_hizbuffer.hh
@@ -42,6 +42,8 @@ class HiZBuffer {
DRWPass *hiz_update_ps_;
/** References only. */
GPUTexture *input_depth_tx_ = nullptr;
+ /** Dirty flag to check if the update is necessary. */
+ bool is_dirty_ = true;
public:
HiZBuffer(Instance &inst) : inst_(inst){};
@@ -50,13 +52,16 @@ class HiZBuffer {
void view_sync(int2 extent);
void end_sync();
- void prepare(GPUTexture *depth_src_tx);
-
void update(GPUTexture *depth_src);
- GPUTexture *texture_get(void) const
+ GPUTexture **texture_ref_get(void)
+ {
+ return &hiz_tx_;
+ }
+
+ void set_dirty()
{
- return hiz_tx_;
+ is_dirty_ = true;
}
private: