[Bf-blender-cvs] [ba0a3747394] tmp-workbench-rewrite2: Merge branch 'master' into tmp-workbench-rewrite2

Miguel Pozo noreply at git.blender.org
Mon Jan 23 17:56:56 CET 2023


Commit: ba0a3747394fa041bed73250d7e07cd7ebe7f951
Author: Miguel Pozo
Date:   Mon Jan 23 17:56:42 2023 +0100
Branches: tmp-workbench-rewrite2
https://developer.blender.org/rBba0a3747394fa041bed73250d7e07cd7ebe7f951

Merge branch 'master' into tmp-workbench-rewrite2

===================================================================



===================================================================

diff --cc release/scripts/startup/bl_ui/properties_data_camera.py
index b348940a260,0a9a16999b8..6ecfa9dfbb4
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@@ -21,15 -21,15 +21,15 @@@ class CAMERA_PT_presets(PresetPanel, Pa
      preset_subdir = "camera"
      preset_operator = "script.execute_preset"
      preset_add_operator = "camera.preset_add"
 -    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'}
 +    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'}
  
  
- class SAFE_AREAS_PT_presets(PresetPanel, Panel):
+ class CAMERA_PT_safe_areas_presets(PresetPanel, Panel):
      bl_label = "Camera Presets"
      preset_subdir = "safe_areas"
      preset_operator = "script.execute_preset"
-     preset_add_operator = "safe_areas.preset_add"
-     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'}
+     preset_add_operator = "camera.safe_areas_preset_add"
 -    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'}
++    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
  
  
  class DATA_PT_context_camera(CameraButtonsPanel, Panel):
diff --cc source/blender/draw/intern/DRW_gpu_wrapper.hh
index bc090fe0436,1653dedebba..6d8c4cc8e87
--- a/source/blender/draw/intern/DRW_gpu_wrapper.hh
+++ b/source/blender/draw/intern/DRW_gpu_wrapper.hh
@@@ -1048,20 -1066,25 +1066,35 @@@ class Framebuffer : NonCopyable 
                GPUAttachment color7 = GPU_ATTACHMENT_NONE,
                GPUAttachment color8 = GPU_ATTACHMENT_NONE)
    {
-     GPU_framebuffer_ensure_config(
-         &fb_, {depth, color1, color2, color3, color4, color5, color6, color7, color8});
+     if (fb_ == NULL) {
+       fb_ = GPU_framebuffer_create(name_);
+     }
+     GPUAttachment config[] = {
+         depth, color1, color2, color3, color4, color5, color6, color7, color8};
+     GPU_framebuffer_config_array(fb_, config, sizeof(config) / sizeof(GPUAttachment));
+   }
+ 
+   /**
+    * Empty frame-buffer configuration.
+    */
+   void ensure(int2 target_size)
+   {
+     if (fb_ == NULL) {
+       fb_ = GPU_framebuffer_create(name_);
+     }
+     GPU_framebuffer_default_size(fb_, UNPACK2(target_size));
    }
  
 +  void bind()
 +  {
 +    GPU_framebuffer_bind(fb_);
 +  }
 +
 +  void clear_depth(float depth)
 +  {
 +    GPU_framebuffer_clear_depth(fb_, depth);
 +  }
 +
    Framebuffer &operator=(Framebuffer &&a)
    {
      if (*this != a) {
diff --cc source/blender/draw/intern/draw_view.hh
index 5bf2bf1a568,e18abf94fce..3e93e0043aa
--- a/source/blender/draw/intern/draw_view.hh
+++ b/source/blender/draw/intern/draw_view.hh
@@@ -69,9 -72,16 +69,19 @@@ class View 
  
    void sync(const float4x4 &view_mat, const float4x4 &win_mat, int view_id = 0);
  
 +  /* For compatibility with old system. Will be removed at some point. */
 +  void sync(const DRWView *view);
 +
+   /** Disable a range in the multi-view array. Disabled view will not produce any instances. */
+   void disable(IndexRange range);
+ 
+   /**
+    * Update culling data using a compute shader.
+    * This is to be used if the matrices were updated externally
+    * on the GPU (not using the `sync()` method).
+    **/
+   void compute_procedural_bounds();
+ 
    bool is_persp(int view_id = 0) const
    {
      BLI_assert(view_id < view_len_);
@@@ -132,11 -142,15 +142,16 @@@
      return (view_len_ == 1) ? 0 : divide_ceil_u(view_len_, 32);
    }
  
+   UniformArrayBuffer<ViewMatrices, DRW_VIEW_MAX> &matrices_ubo_get()
+   {
+     return data_;
+   }
+ 
 - private:
 + protected:
    /** Called from draw manager. */
    void bind();
 -  void compute_visibility(ObjectBoundsBuf &bounds, uint resource_len, bool debug_freeze);
 +  virtual void compute_visibility(ObjectBoundsBuf &bounds, uint resource_len, bool debug_freeze);
 +  virtual VisibilityBuf &get_visibility_buffer();
  
    void update_viewport_size();



More information about the Bf-blender-cvs mailing list