[Bf-blender-cvs] [da8844d73ed] temp-viewport-compositor-merge: Viewport Compositor: Fix compiler warnings
Omar Emara
noreply at git.blender.org
Mon May 16 15:47:12 CEST 2022
Commit: da8844d73ed91b107691eb7a7b80c26ddd19faf0
Author: Omar Emara
Date: Mon May 16 15:46:35 2022 +0200
Branches: temp-viewport-compositor-merge
https://developer.blender.org/rBda8844d73ed91b107691eb7a7b80c26ddd19faf0
Viewport Compositor: Fix compiler warnings
===================================================================
M source/blender/draw/engines/compositor/compositor_engine.cc
M source/blender/draw/intern/draw_manager.c
M source/blender/imbuf/intern/colormanagement_inline.c
M source/blender/viewport_compositor/VPC_texture_pool.hh
M source/blender/viewport_compositor/intern/gpu_material_operation.cc
M source/blender/viewport_compositor/intern/utilities.cc
===================================================================
diff --git a/source/blender/draw/engines/compositor/compositor_engine.cc b/source/blender/draw/engines/compositor/compositor_engine.cc
index a46f909f154..918061721ba 100644
--- a/source/blender/draw/engines/compositor/compositor_engine.cc
+++ b/source/blender/draw/engines/compositor/compositor_engine.cc
@@ -3,6 +3,7 @@
#include "BLI_listbase.h"
#include "BLI_math_vec_types.hh"
#include "BLI_string_ref.hh"
+#include "BLI_utildefines.h"
#include "BLT_translation.h"
@@ -51,7 +52,7 @@ class DRWContext : public Context {
return DRW_viewport_texture_list_get()->color;
}
- GPUTexture *get_pass_texture(int view_layer, eScenePassType pass_type) override
+ GPUTexture *get_pass_texture(int UNUSED(view_layer), eScenePassType UNUSED(pass_type)) override
{
return get_viewport_texture();
}
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index e26502bb066..b84b8deb317 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1226,7 +1226,7 @@ static void drw_engines_enable_editors(void)
}
}
-static bool is_compositor_enabled()
+static bool is_compositor_enabled(void)
{
if (!(DST.draw_ctx.v3d->shading.flag & V3D_SHADING_COMPOSITOR)) {
return false;
diff --git a/source/blender/imbuf/intern/colormanagement_inline.c b/source/blender/imbuf/intern/colormanagement_inline.c
index 6f8caaa4c68..e6d1b7da81f 100644
--- a/source/blender/imbuf/intern/colormanagement_inline.c
+++ b/source/blender/imbuf/intern/colormanagement_inline.c
@@ -29,7 +29,7 @@ unsigned char IMB_colormanagement_get_luminance_byte(const unsigned char rgb[3])
void IMB_colormanagement_get_luminance_coefficients(float rgb[3])
{
- return copy_v3_v3(rgb, imbuf_luma_coefficients);
+ copy_v3_v3(rgb, imbuf_luma_coefficients);
}
void IMB_colormanagement_xyz_to_rgb(float rgb[3], const float xyz[3])
diff --git a/source/blender/viewport_compositor/VPC_texture_pool.hh b/source/blender/viewport_compositor/VPC_texture_pool.hh
index 979ed88c1f9..09f219a6877 100644
--- a/source/blender/viewport_compositor/VPC_texture_pool.hh
+++ b/source/blender/viewport_compositor/VPC_texture_pool.hh
@@ -31,6 +31,8 @@ class TexturePoolKey {
uint64_t hash() const;
};
+bool operator==(const TexturePoolKey &a, const TexturePoolKey &b);
+
/* ------------------------------------------------------------------------------------------------
* Texture Pool
*
diff --git a/source/blender/viewport_compositor/intern/gpu_material_operation.cc b/source/blender/viewport_compositor/intern/gpu_material_operation.cc
index e513bf2328a..1dd1201383a 100644
--- a/source/blender/viewport_compositor/intern/gpu_material_operation.cc
+++ b/source/blender/viewport_compositor/intern/gpu_material_operation.cc
@@ -4,6 +4,7 @@
#include "BLI_listbase.h"
#include "BLI_string_ref.hh"
+#include "BLI_utildefines.h"
#include "GPU_material.h"
#include "GPU_shader.h"
@@ -122,7 +123,7 @@ void GPUMaterialOperation::bind_outputs(GPUShader *shader)
}
}
-void GPUMaterialOperation::setup_material(void *thunk, GPUMaterial *material)
+void GPUMaterialOperation::setup_material(void *UNUSED(thunk), GPUMaterial *material)
{
GPU_material_is_compute_set(material, true);
}
@@ -319,8 +320,8 @@ void GPUMaterialOperation::populate_material_result(DOutputSocket output, GPUMat
GPU_link(material, store_function_name, output_image_link, output_link);
}
-void GPUMaterialOperation::generate_material(void *thunk,
- GPUMaterial *material,
+void GPUMaterialOperation::generate_material(void *UNUSED(thunk),
+ GPUMaterial *UNUSED(material),
GPUCodegenOutput *code_generator_output)
{
gpu::shader::ShaderCreateInfo &info = *reinterpret_cast<gpu::shader::ShaderCreateInfo *>(
diff --git a/source/blender/viewport_compositor/intern/utilities.cc b/source/blender/viewport_compositor/intern/utilities.cc
index 671a2f73332..12be90d8c43 100644
--- a/source/blender/viewport_compositor/intern/utilities.cc
+++ b/source/blender/viewport_compositor/intern/utilities.cc
@@ -3,6 +3,7 @@
#include "BLI_assert.h"
#include "BLI_function_ref.hh"
#include "BLI_math_vec_types.hh"
+#include "BLI_utildefines.h"
#include "DNA_node_types.h"
@@ -68,12 +69,13 @@ ResultType get_node_socket_result_type(const SocketRef *socket)
bool is_output_linked_to_node_conditioned(DOutputSocket output, FunctionRef<bool(DNode)> condition)
{
bool condition_satisfied = false;
- output.foreach_target_socket([&](DInputSocket target, const TargetSocketPathInfo &path_info) {
- if (condition(target.node())) {
- condition_satisfied = true;
- return;
- }
- });
+ output.foreach_target_socket(
+ [&](DInputSocket target, const TargetSocketPathInfo &UNUSED(path_info)) {
+ if (condition(target.node())) {
+ condition_satisfied = true;
+ return;
+ }
+ });
return condition_satisfied;
}
@@ -81,11 +83,12 @@ int number_of_inputs_linked_to_output_conditioned(DOutputSocket output,
FunctionRef<bool(DInputSocket)> condition)
{
int count = 0;
- output.foreach_target_socket([&](DInputSocket target, const TargetSocketPathInfo &path_info) {
- if (condition(target)) {
- count++;
- }
- });
+ output.foreach_target_socket(
+ [&](DInputSocket target, const TargetSocketPathInfo &UNUSED(path_info)) {
+ if (condition(target)) {
+ count++;
+ }
+ });
return count;
}
More information about the Bf-blender-cvs
mailing list