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:
authorCampbell Barton <campbell@blender.org>2022-01-07 03:38:08 +0300
committerCampbell Barton <campbell@blender.org>2022-01-07 06:16:26 +0300
commit3d3bc748849834ef74563deb603ab43859cffeeb (patch)
treede74ce4722b2cb032c22dbc090a15dd2e172c29b /source/blender/gpu
parentbb69c19f08ac681d4386325e4318ebfbef2e9531 (diff)
Cleanup: remove redundant const qualifiers for POD types
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_batch_presets.h4
-rw-r--r--source/blender/gpu/GPU_buffers.h16
-rw-r--r--source/blender/gpu/GPU_immediate_util.h2
-rw-r--r--source/blender/gpu/GPU_material.h6
-rw-r--r--source/blender/gpu/GPU_shader.h4
-rw-r--r--source/blender/gpu/GPU_texture.h2
-rw-r--r--source/blender/gpu/intern/gpu_material_library.h2
-rw-r--r--source/blender/gpu/intern/gpu_shader_interface.hh6
-rw-r--r--source/blender/gpu/intern/gpu_shader_private.hh9
-rw-r--r--source/blender/gpu/opengl/gl_shader.hh2
-rw-r--r--source/blender/gpu/opengl/gl_state.hh22
-rw-r--r--source/blender/gpu/opengl/gl_vertex_array.hh4
12 files changed, 38 insertions, 41 deletions
diff --git a/source/blender/gpu/GPU_batch_presets.h b/source/blender/gpu/GPU_batch_presets.h
index 73c9172f2ba..1681db8126a 100644
--- a/source/blender/gpu/GPU_batch_presets.h
+++ b/source/blender/gpu/GPU_batch_presets.h
@@ -39,10 +39,10 @@ extern "C" {
struct GPUBatch *GPU_batch_preset_sphere(int lod) ATTR_WARN_UNUSED_RESULT;
struct GPUBatch *GPU_batch_preset_sphere_wire(int lod) ATTR_WARN_UNUSED_RESULT;
-struct GPUBatch *GPU_batch_preset_panel_drag_widget(const float pixelsize,
+struct GPUBatch *GPU_batch_preset_panel_drag_widget(float pixelsize,
const float col_high[4],
const float col_dark[4],
- const float width) ATTR_WARN_UNUSED_RESULT;
+ float width) ATTR_WARN_UNUSED_RESULT;
/**
* To be used with procedural placement inside shader.
diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h
index 9ba283bf65f..598d4961e05 100644
--- a/source/blender/gpu/GPU_buffers.h
+++ b/source/blender/gpu/GPU_buffers.h
@@ -61,7 +61,7 @@ GPU_PBVH_Buffers *GPU_pbvh_mesh_buffers_build(const struct MPoly *mpoly,
const struct MVert *mvert,
const int *face_indices,
const int *sculpt_face_sets,
- const int face_indices_len,
+ int face_indices_len,
const struct Mesh *mesh);
/**
@@ -99,10 +99,10 @@ void GPU_pbvh_mesh_buffers_update(GPU_PBVH_Buffers *buffers,
const float *vmask,
const struct MLoopCol *vcol,
const int *sculpt_face_sets,
- const int face_sets_color_seed,
- const int face_sets_color_default,
+ int face_sets_color_seed,
+ int face_sets_color_default,
const struct MPropCol *vtcol,
- const int update_flags);
+ int update_flags);
/**
* Creates a vertex buffer (coordinate, normal, color) and,
@@ -114,7 +114,7 @@ void GPU_pbvh_bmesh_buffers_update(GPU_PBVH_Buffers *buffers,
struct GSet *bm_faces,
struct GSet *bm_unique_verts,
struct GSet *bm_other_verts,
- const int update_flags);
+ int update_flags);
/**
* Threaded: do not call any functions that use OpenGL calls!
@@ -126,10 +126,10 @@ void GPU_pbvh_grid_buffers_update(GPU_PBVH_Buffers *buffers,
int *grid_indices,
int totgrid,
const int *sculpt_face_sets,
- const int face_sets_color_seed,
- const int face_sets_color_default,
+ int face_sets_color_seed,
+ int face_sets_color_default,
const struct CCGKey *key,
- const int update_flags);
+ int update_flags);
/**
* Finish update. Not thread safe, must run in OpenGL main thread.
diff --git a/source/blender/gpu/GPU_immediate_util.h b/source/blender/gpu/GPU_immediate_util.h
index 102bd6c284c..cd45913158d 100644
--- a/source/blender/gpu/GPU_immediate_util.h
+++ b/source/blender/gpu/GPU_immediate_util.h
@@ -148,7 +148,7 @@ void imm_draw_cube_wire_3d(uint pos, const float center[3], const float aspect[3
void imm_draw_cube_corners_3d(uint pos,
const float center[3],
const float aspect[3],
- const float factor);
+ float factor);
/**
* Draw a cylinder. Replacement for #gluCylinder.
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h
index f7a01fadadc..3555b957d67 100644
--- a/source/blender/gpu/GPU_material.h
+++ b/source/blender/gpu/GPU_material.h
@@ -171,7 +171,7 @@ bool GPU_stack_link(GPUMaterial *mat,
GPUNodeLink *GPU_uniformbuf_link_out(struct GPUMaterial *mat,
struct bNode *node,
struct GPUNodeStack *stack,
- const int index);
+ int index);
void GPU_material_output_link(GPUMaterial *material, GPUNodeLink *link);
void GPU_material_add_output_link_aov(GPUMaterial *material, GPUNodeLink *link, int hash);
@@ -197,8 +197,8 @@ GPUMaterial *GPU_material_from_nodetree(struct Scene *scene,
struct bNodeTree *ntree,
struct ListBase *gpumaterials,
const void *engine_type,
- const int options,
- const bool is_volume_shader,
+ int options,
+ bool is_volume_shader,
const char *vert_code,
const char *geom_code,
const char *frag_lib,
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h
index 5c373551494..9bcd92f534a 100644
--- a/source/blender/gpu/GPU_shader.h
+++ b/source/blender/gpu/GPU_shader.h
@@ -62,9 +62,9 @@ GPUShader *GPU_shader_create_ex(const char *vertcode,
const char *computecode,
const char *libcode,
const char *defines,
- const eGPUShaderTFBType tf_type,
+ eGPUShaderTFBType tf_type,
const char **tf_names,
- const int tf_count,
+ int tf_count,
const char *shname);
struct GPU_ShaderCreateFromArray_Params {
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index 54e9bde70d8..d65115541fa 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -281,7 +281,7 @@ void GPU_texture_free(GPUTexture *tex);
void GPU_texture_ref(GPUTexture *tex);
void GPU_texture_bind(GPUTexture *tex, int unit);
-void GPU_texture_bind_ex(GPUTexture *tex, eGPUSamplerState state, int unit, const bool set_number);
+void GPU_texture_bind_ex(GPUTexture *tex, eGPUSamplerState state, int unit, bool set_number);
void GPU_texture_unbind(GPUTexture *tex);
void GPU_texture_unbind_all(void);
diff --git a/source/blender/gpu/intern/gpu_material_library.h b/source/blender/gpu/intern/gpu_material_library.h
index d3b12d3a2b7..7f9eeb8166a 100644
--- a/source/blender/gpu/intern/gpu_material_library.h
+++ b/source/blender/gpu/intern/gpu_material_library.h
@@ -63,4 +63,4 @@ char *gpu_material_library_generate_code(struct GSet *used_libraries, const char
/* Code Parsing */
const char *gpu_str_skip_token(const char *str, char *token, int max);
-const char *gpu_data_type_to_string(const eGPUType type);
+const char *gpu_data_type_to_string(eGPUType type);
diff --git a/source/blender/gpu/intern/gpu_shader_interface.hh b/source/blender/gpu/intern/gpu_shader_interface.hh
index a6f0e30b715..4bd8f245e2b 100644
--- a/source/blender/gpu/intern/gpu_shader_interface.hh
+++ b/source/blender/gpu/intern/gpu_shader_interface.hh
@@ -137,12 +137,12 @@ class ShaderInterface {
private:
inline const ShaderInput *input_lookup(const ShaderInput *const inputs,
- const uint inputs_len,
+ uint inputs_len,
const char *name) const;
inline const ShaderInput *input_lookup(const ShaderInput *const inputs,
- const uint inputs_len,
- const int binding) const;
+ uint inputs_len,
+ int binding) const;
};
inline const char *ShaderInterface::builtin_uniform_name(GPUUniformBuiltin u)
diff --git a/source/blender/gpu/intern/gpu_shader_private.hh b/source/blender/gpu/intern/gpu_shader_private.hh
index 8bd1115c731..498dd8f3877 100644
--- a/source/blender/gpu/intern/gpu_shader_private.hh
+++ b/source/blender/gpu/intern/gpu_shader_private.hh
@@ -56,7 +56,7 @@ class Shader {
virtual bool finalize() = 0;
virtual void transform_feedback_names_set(Span<const char *> name_list,
- const eGPUShaderTFBType geom_type) = 0;
+ eGPUShaderTFBType geom_type) = 0;
virtual bool transform_feedback_enable(GPUVertBuf *) = 0;
virtual void transform_feedback_disable() = 0;
@@ -77,11 +77,8 @@ class Shader {
};
protected:
- void print_log(Span<const char *> sources,
- char *log,
- const char *stage,
- const bool error,
- GPULogParser *parser);
+ void print_log(
+ Span<const char *> sources, char *log, const char *stage, bool error, GPULogParser *parser);
};
/* Syntactic sugar. */
diff --git a/source/blender/gpu/opengl/gl_shader.hh b/source/blender/gpu/opengl/gl_shader.hh
index 6a424e0c7ee..9ea1334b862 100644
--- a/source/blender/gpu/opengl/gl_shader.hh
+++ b/source/blender/gpu/opengl/gl_shader.hh
@@ -62,7 +62,7 @@ class GLShader : public Shader {
/** Should be called before linking. */
void transform_feedback_names_set(Span<const char *> name_list,
- const eGPUShaderTFBType geom_type) override;
+ eGPUShaderTFBType geom_type) override;
bool transform_feedback_enable(GPUVertBuf *buf) override;
void transform_feedback_disable() override;
diff --git a/source/blender/gpu/opengl/gl_state.hh b/source/blender/gpu/opengl/gl_state.hh
index e0c0dab76e1..83ff3ffc9e9 100644
--- a/source/blender/gpu/opengl/gl_state.hh
+++ b/source/blender/gpu/opengl/gl_state.hh
@@ -97,17 +97,17 @@ class GLStateManager : public StateManager {
uint8_t bound_image_slots();
private:
- static void set_write_mask(const eGPUWriteMask value);
- static void set_depth_test(const eGPUDepthTest value);
- static void set_stencil_test(const eGPUStencilTest test, const eGPUStencilOp operation);
- static void set_stencil_mask(const eGPUStencilTest test, const GPUStateMutable state);
- static void set_clip_distances(const int new_dist_len, const int old_dist_len);
- static void set_logic_op(const bool enable);
- static void set_facing(const bool invert);
- static void set_backface_culling(const eGPUFaceCullTest test);
- static void set_provoking_vert(const eGPUProvokingVertex vert);
- static void set_shadow_bias(const bool enable);
- static void set_blend(const eGPUBlend value);
+ static void set_write_mask(eGPUWriteMask value);
+ static void set_depth_test(eGPUDepthTest value);
+ static void set_stencil_test(eGPUStencilTest test, eGPUStencilOp operation);
+ static void set_stencil_mask(eGPUStencilTest test, const GPUStateMutable state);
+ static void set_clip_distances(int new_dist_len, int old_dist_len);
+ static void set_logic_op(bool enable);
+ static void set_facing(bool invert);
+ static void set_backface_culling(eGPUFaceCullTest test);
+ static void set_provoking_vert(eGPUProvokingVertex vert);
+ static void set_shadow_bias(bool enable);
+ static void set_blend(eGPUBlend value);
void set_state(const GPUState &state);
void set_mutable_state(const GPUStateMutable &state);
diff --git a/source/blender/gpu/opengl/gl_vertex_array.hh b/source/blender/gpu/opengl/gl_vertex_array.hh
index 0f9b61f9648..b8edbf3a691 100644
--- a/source/blender/gpu/opengl/gl_vertex_array.hh
+++ b/source/blender/gpu/opengl/gl_vertex_array.hh
@@ -39,13 +39,13 @@ namespace GLVertArray {
void update_bindings(const GLuint vao,
const GPUBatch *batch,
const ShaderInterface *interface,
- const int base_instance);
+ int base_instance);
/**
* Another version of update_bindings for Immediate mode.
*/
void update_bindings(const GLuint vao,
- const uint v_first,
+ uint v_first,
const GPUVertFormat *format,
const ShaderInterface *interface);