[Bf-blender-cvs] [61d66b528e7] draw-colormanagement: Cleanup: Update comments & fix some style issues

Clément Foucault noreply at git.blender.org
Tue Feb 11 15:10:05 CET 2020


Commit: 61d66b528e7585f63b871be74d10311e2f017a57
Author: Clément Foucault
Date:   Wed Feb 5 00:25:32 2020 +0100
Branches: draw-colormanagement
https://developer.blender.org/rB61d66b528e7585f63b871be74d10311e2f017a57

Cleanup: Update comments & fix some style issues

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

M	intern/opencolorio/fallback_impl.cc
M	intern/opencolorio/ocio_impl_glsl.cc
M	source/blender/draw/engines/workbench/workbench_private.h
M	source/blender/draw/intern/draw_manager.c
M	source/blender/gpu/shaders/gpu_shader_image_overlays_merge_frag.glsl

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

diff --git a/intern/opencolorio/fallback_impl.cc b/intern/opencolorio/fallback_impl.cc
index 0e5441af4e8..8174714520f 100644
--- a/intern/opencolorio/fallback_impl.cc
+++ b/intern/opencolorio/fallback_impl.cc
@@ -696,7 +696,7 @@ bool FallbackImpl::supportGLSLDraw(void)
 
 bool FallbackImpl::setupGLSLDraw(struct OCIO_GLSLDrawState ** /*state_r*/,
                                  OCIO_ConstProcessorRcPtr * /*processor*/,
-                                 OCIO_ConstProcessorRcPtr * /*processor*/,
+                                 OCIO_ConstProcessorRcPtr * /*processor_display*/,
                                  OCIO_CurveMappingSettings * /*curve_mapping_settings*/,
                                  float /*dither*/,
                                  bool /*predivide*/,
diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc
index 5f66ec631fc..129734d68be 100644
--- a/intern/opencolorio/ocio_impl_glsl.cc
+++ b/intern/opencolorio/ocio_impl_glsl.cc
@@ -694,9 +694,8 @@ bool OCIOImpl::setupGLSLDraw(OCIO_GLSLDrawState **state_r,
   return false;
 }
 
-void OCIOImpl::finishGLSLDraw(OCIO_GLSLDrawState *state)
+void OCIOImpl::finishGLSLDraw(OCIO_GLSLDrawState * /*state*/)
 {
-  (void)state;
   immUnbindProgram();
 }
 
diff --git a/source/blender/draw/engines/workbench/workbench_private.h b/source/blender/draw/engines/workbench/workbench_private.h
index 975b0b84793..6b459c3693e 100644
--- a/source/blender/draw/engines/workbench/workbench_private.h
+++ b/source/blender/draw/engines/workbench/workbench_private.h
@@ -427,9 +427,6 @@ BLI_INLINE eGPUTextureFormat workbench_color_texture_format(const WORKBENCH_Priv
       TEXTURE_DRAWING_ENABLED(wpd)) {
     result = GPU_RGBA16F;
   }
-  else if (workbench_is_in_vertex_paint_mode() || VERTEX_COLORS_ENABLED(wpd)) {
-    result = GPU_RGBA16;
-  }
   else {
     result = GPU_RGBA16;
   }
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 39dd1a8be71..85459b8abc7 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -249,11 +249,9 @@ static void drw_viewport_colormanagement_set(void)
   ColorManagedViewSettings view_settings;
   float dither = 0.0f;
 
-  /* TODO make it match old behavior. */
   bool use_render_settings = v3d && (v3d->shading.type == OB_RENDER);
   bool use_view_transform = v3d && (v3d->shading.type >= OB_MATERIAL);
 
-  /* TODO What ocio settings do we need here? */
   if (use_render_settings) {
     /* Use full render settings, for renders with scene lighting. */
     view_settings = scene->view_settings;
diff --git a/source/blender/gpu/shaders/gpu_shader_image_overlays_merge_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_overlays_merge_frag.glsl
index c9a3073e933..e8323520af5 100644
--- a/source/blender/gpu/shaders/gpu_shader_image_overlays_merge_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_image_overlays_merge_frag.glsl
@@ -1,5 +1,5 @@
 
-/* Display a linear image texture into sRGB space */
+/* Merge overlays texture on top of image texture and transform to display space (assume sRGB) */
 
 uniform sampler2D image_texture;
 uniform sampler2D overlays_texture;



More information about the Bf-blender-cvs mailing list