diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2022-01-06 05:44:03 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2022-01-06 05:44:22 +0300 |
commit | 4067367b6c64f09be70c771180cb47eca4e341eb (patch) | |
tree | 791bf22101c4dd09e7a901cb8adf793cfaff458a /source/blender/gpu/intern | |
parent | c0fb8ea8f3cd01cfb01effa687a8d553c540aec3 (diff) |
Cleanup: Clang-tidy: modernize-redundant-void-arg
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_backend.hh | 14 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_batch_private.hh | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_context_private.hh | 14 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_framebuffer_private.hh | 8 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_immediate_private.hh | 8 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_index_buffer_private.hh | 8 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_platform_private.hh | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_query.hh | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_interface.hh | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_private.hh | 14 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_state_private.hh | 8 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_texture_private.hh | 22 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_uniform_buffer_private.hh | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_vertex_buffer_private.hh | 22 |
14 files changed, 66 insertions, 66 deletions
diff --git a/source/blender/gpu/intern/gpu_backend.hh b/source/blender/gpu/intern/gpu_backend.hh index 73792215569..d472e48776e 100644 --- a/source/blender/gpu/intern/gpu_backend.hh +++ b/source/blender/gpu/intern/gpu_backend.hh @@ -42,24 +42,24 @@ class VertBuf; class GPUBackend { public: - virtual ~GPUBackend(){}; + virtual ~GPUBackend()= default;; - static GPUBackend *get(void); + static GPUBackend *get(); - virtual void samplers_update(void) = 0; + virtual void samplers_update() = 0; virtual void compute_dispatch(int groups_x_len, int groups_y_len, int groups_z_len) = 0; virtual Context *context_alloc(void *ghost_window) = 0; - virtual Batch *batch_alloc(void) = 0; + virtual Batch *batch_alloc() = 0; virtual DrawList *drawlist_alloc(int list_length) = 0; virtual FrameBuffer *framebuffer_alloc(const char *name) = 0; - virtual IndexBuf *indexbuf_alloc(void) = 0; - virtual QueryPool *querypool_alloc(void) = 0; + virtual IndexBuf *indexbuf_alloc() = 0; + virtual QueryPool *querypool_alloc() = 0; virtual Shader *shader_alloc(const char *name) = 0; virtual Texture *texture_alloc(const char *name) = 0; virtual UniformBuf *uniformbuf_alloc(int size, const char *name) = 0; - virtual VertBuf *vertbuf_alloc(void) = 0; + virtual VertBuf *vertbuf_alloc() = 0; }; } // namespace gpu diff --git a/source/blender/gpu/intern/gpu_batch_private.hh b/source/blender/gpu/intern/gpu_batch_private.hh index eed96864f20..4c2f221e9b6 100644 --- a/source/blender/gpu/intern/gpu_batch_private.hh +++ b/source/blender/gpu/intern/gpu_batch_private.hh @@ -47,7 +47,7 @@ class Batch : public GPUBatch { virtual void draw(int v_first, int v_count, int i_first, int i_count) = 0; /* Convenience casts. */ - IndexBuf *elem_(void) const + IndexBuf *elem_() const { return unwrap(elem); } diff --git a/source/blender/gpu/intern/gpu_context_private.hh b/source/blender/gpu/intern/gpu_context_private.hh index 82753b44c51..d99555b3bf5 100644 --- a/source/blender/gpu/intern/gpu_context_private.hh +++ b/source/blender/gpu/intern/gpu_context_private.hh @@ -75,22 +75,22 @@ class Context { Context(); virtual ~Context(); - static Context *get(void); + static Context *get(); - virtual void activate(void) = 0; - virtual void deactivate(void) = 0; + virtual void activate() = 0; + virtual void deactivate() = 0; /* Will push all pending commands to the GPU. */ - virtual void flush(void) = 0; + virtual void flush() = 0; /* Will wait until the GPU has finished executing all command. */ - virtual void finish(void) = 0; + virtual void finish() = 0; virtual void memory_statistics_get(int *total_mem, int *free_mem) = 0; virtual void debug_group_begin(const char *, int){}; - virtual void debug_group_end(void){}; + virtual void debug_group_end(){}; - bool is_active_on_thread(void); + bool is_active_on_thread(); }; /* Syntactic sugar. */ diff --git a/source/blender/gpu/intern/gpu_framebuffer_private.hh b/source/blender/gpu/intern/gpu_framebuffer_private.hh index 2b00c239af4..a936e889e57 100644 --- a/source/blender/gpu/intern/gpu_framebuffer_private.hh +++ b/source/blender/gpu/intern/gpu_framebuffer_private.hh @@ -188,24 +188,24 @@ class FrameBuffer { copy_v4_v4_int(r_scissor, scissor_); } - inline bool scissor_test_get(void) const + inline bool scissor_test_get() const { return scissor_test_; } - inline void viewport_reset(void) + inline void viewport_reset() { int viewport_rect[4] = {0, 0, width_, height_}; viewport_set(viewport_rect); } - inline void scissor_reset(void) + inline void scissor_reset() { int scissor_rect[4] = {0, 0, width_, height_}; scissor_set(scissor_rect); } - inline GPUTexture *depth_tex(void) const + inline GPUTexture *depth_tex() const { if (attachments_[GPU_FB_DEPTH_ATTACHMENT].tex) { return attachments_[GPU_FB_DEPTH_ATTACHMENT].tex; diff --git a/source/blender/gpu/intern/gpu_immediate_private.hh b/source/blender/gpu/intern/gpu_immediate_private.hh index 382f70eeec4..bc1ae403c52 100644 --- a/source/blender/gpu/intern/gpu_immediate_private.hh +++ b/source/blender/gpu/intern/gpu_immediate_private.hh @@ -68,11 +68,11 @@ class Immediate { Immediate(){}; virtual ~Immediate(){}; - virtual uchar *begin(void) = 0; - virtual void end(void) = 0; + virtual uchar *begin() = 0; + virtual void end() = 0; }; } // namespace blender::gpu -void immActivate(void); -void immDeactivate(void); +void immActivate(); +void immDeactivate(); diff --git a/source/blender/gpu/intern/gpu_index_buffer_private.hh b/source/blender/gpu/intern/gpu_index_buffer_private.hh index adc0145f867..4bb46689727 100644 --- a/source/blender/gpu/intern/gpu_index_buffer_private.hh +++ b/source/blender/gpu/intern/gpu_index_buffer_private.hh @@ -77,22 +77,22 @@ class IndexBuf { void init_subrange(IndexBuf *elem_src, uint start, uint length); void init_build_on_device(uint index_len); - uint32_t index_len_get(void) const + uint32_t index_len_get() const { return index_len_; } /* Return size in byte of the drawable data buffer range. Actual buffer size might be bigger. */ - size_t size_get(void) const + size_t size_get() const { return index_len_ * to_bytesize(index_type_); }; - bool is_init(void) const + bool is_init() const { return is_init_; }; - virtual void upload_data(void) = 0; + virtual void upload_data() = 0; virtual void bind_as_ssbo(uint binding) = 0; diff --git a/source/blender/gpu/intern/gpu_platform_private.hh b/source/blender/gpu/intern/gpu_platform_private.hh index f823269ab54..faae7c48588 100644 --- a/source/blender/gpu/intern/gpu_platform_private.hh +++ b/source/blender/gpu/intern/gpu_platform_private.hh @@ -49,7 +49,7 @@ class GPUPlatformGlobal { const char *renderer_str, const char *version_str); - void clear(void); + void clear(); }; extern GPUPlatformGlobal GPG; diff --git a/source/blender/gpu/intern/gpu_query.hh b/source/blender/gpu/intern/gpu_query.hh index 0356e145b00..a004c355c8f 100644 --- a/source/blender/gpu/intern/gpu_query.hh +++ b/source/blender/gpu/intern/gpu_query.hh @@ -45,8 +45,8 @@ class QueryPool { * Will start and end the query at this index inside the pool. * The pool will resize automatically. */ - virtual void begin_query(void) = 0; - virtual void end_query(void) = 0; + virtual void begin_query() = 0; + virtual void end_query() = 0; /** * Must be fed with a buffer large enough to contain all the queries issued. diff --git a/source/blender/gpu/intern/gpu_shader_interface.hh b/source/blender/gpu/intern/gpu_shader_interface.hh index 12a7ffabcc6..a6f0e30b715 100644 --- a/source/blender/gpu/intern/gpu_shader_interface.hh +++ b/source/blender/gpu/intern/gpu_shader_interface.hh @@ -74,7 +74,7 @@ class ShaderInterface { ShaderInterface(); virtual ~ShaderInterface(); - void debug_print(void); + void debug_print(); inline const ShaderInput *attr_get(const char *name) const { @@ -133,7 +133,7 @@ class ShaderInterface { /** * Finalize interface construction by sorting the #ShaderInputs for faster lookups. */ - void sort_inputs(void); + void sort_inputs(); private: inline const ShaderInput *input_lookup(const ShaderInput *const inputs, diff --git a/source/blender/gpu/intern/gpu_shader_private.hh b/source/blender/gpu/intern/gpu_shader_private.hh index 65720e457d8..8bd1115c731 100644 --- a/source/blender/gpu/intern/gpu_shader_private.hh +++ b/source/blender/gpu/intern/gpu_shader_private.hh @@ -53,15 +53,15 @@ class Shader { virtual void geometry_shader_from_glsl(MutableSpan<const char *> sources) = 0; virtual void fragment_shader_from_glsl(MutableSpan<const char *> sources) = 0; virtual void compute_shader_from_glsl(MutableSpan<const char *> sources) = 0; - virtual bool finalize(void) = 0; + virtual bool finalize() = 0; virtual void transform_feedback_names_set(Span<const char *> name_list, const eGPUShaderTFBType geom_type) = 0; virtual bool transform_feedback_enable(GPUVertBuf *) = 0; - virtual void transform_feedback_disable(void) = 0; + virtual void transform_feedback_disable() = 0; - virtual void bind(void) = 0; - virtual void unbind(void) = 0; + virtual void bind() = 0; + virtual void unbind() = 0; virtual void uniform_float(int location, int comp_len, int array_size, const float *data) = 0; virtual void uniform_int(int location, int comp_len, int array_size, const int *data) = 0; @@ -69,9 +69,9 @@ class Shader { virtual void vertformat_from_shader(GPUVertFormat *) const = 0; /* DEPRECATED: Kept only because of BGL API. */ - virtual int program_handle_get(void) const = 0; + virtual int program_handle_get() const = 0; - inline const char *const name_get(void) const + inline const char *const name_get() const { return name; }; @@ -137,4 +137,4 @@ class GPULogParser { } // namespace blender /* XXX do not use it. Special hack to use OCIO with batch API. */ -GPUShader *immGetShader(void); +GPUShader *immGetShader(); diff --git a/source/blender/gpu/intern/gpu_state_private.hh b/source/blender/gpu/intern/gpu_state_private.hh index b96b71a7ac4..81d422ff21a 100644 --- a/source/blender/gpu/intern/gpu_state_private.hh +++ b/source/blender/gpu/intern/gpu_state_private.hh @@ -159,18 +159,18 @@ class StateManager { StateManager(); virtual ~StateManager(){}; - virtual void apply_state(void) = 0; - virtual void force_state(void) = 0; + virtual void apply_state() = 0; + virtual void force_state() = 0; virtual void issue_barrier(eGPUBarrier barrier_bits) = 0; virtual void texture_bind(Texture *tex, eGPUSamplerState sampler, int unit) = 0; virtual void texture_unbind(Texture *tex) = 0; - virtual void texture_unbind_all(void) = 0; + virtual void texture_unbind_all() = 0; virtual void image_bind(Texture *tex, int unit) = 0; virtual void image_unbind(Texture *tex) = 0; - virtual void image_unbind_all(void) = 0; + virtual void image_unbind_all() = 0; virtual void texture_unpack_row_length_set(uint len) = 0; }; diff --git a/source/blender/gpu/intern/gpu_texture_private.hh b/source/blender/gpu/intern/gpu_texture_private.hh index 19d83366e6f..73b59b9f06f 100644 --- a/source/blender/gpu/intern/gpu_texture_private.hh +++ b/source/blender/gpu/intern/gpu_texture_private.hh @@ -123,7 +123,7 @@ class Texture { bool init_cubemap(int w, int layers, eGPUTextureFormat format); bool init_buffer(GPUVertBuf *vbo, eGPUTextureFormat format); - virtual void generate_mipmap(void) = 0; + virtual void generate_mipmap() = 0; virtual void copy_to(Texture *tex) = 0; virtual void clear(eGPUDataFormat format, const void *data) = 0; virtual void swizzle_set(const char swizzle_mask[4]) = 0; @@ -138,17 +138,17 @@ class Texture { int mip, int offset[3], int extent[3], eGPUDataFormat format, const void *data) = 0; /* TODO(fclem): Legacy. Should be removed at some point. */ - virtual uint gl_bindcode_get(void) const = 0; + virtual uint gl_bindcode_get() const = 0; - int width_get(void) const + int width_get() const { return w_; } - int height_get(void) const + int height_get() const { return h_; } - int depth_get(void) const + int depth_get() const { return d_; } @@ -188,7 +188,7 @@ class Texture { } /* Return number of dimension taking the array type into account. */ - int dimensions_count(void) const + int dimensions_count() const { const int array = (type_ & GPU_TEXTURE_ARRAY) ? 1 : 0; switch (type_ & ~GPU_TEXTURE_ARRAY) { @@ -205,7 +205,7 @@ class Texture { } } /* Return number of array layer (or face layer) for texture array or 1 for the others. */ - int layer_count(void) const + int layer_count() const { switch (type_) { case GPU_TEXTURE_1D_ARRAY: @@ -218,15 +218,15 @@ class Texture { } } - eGPUTextureFormat format_get(void) const + eGPUTextureFormat format_get() const { return format_; } - eGPUTextureFormatFlag format_flag_get(void) const + eGPUTextureFormatFlag format_flag_get() const { return format_flag_; } - eGPUTextureType type_get(void) const + eGPUTextureType type_get() const { return type_; } @@ -248,7 +248,7 @@ class Texture { } protected: - virtual bool init_internal(void) = 0; + virtual bool init_internal() = 0; virtual bool init_internal(GPUVertBuf *vbo) = 0; }; diff --git a/source/blender/gpu/intern/gpu_uniform_buffer_private.hh b/source/blender/gpu/intern/gpu_uniform_buffer_private.hh index e8fc1343eaf..018b85c865e 100644 --- a/source/blender/gpu/intern/gpu_uniform_buffer_private.hh +++ b/source/blender/gpu/intern/gpu_uniform_buffer_private.hh @@ -54,7 +54,7 @@ class UniformBuf { virtual void update(const void *data) = 0; virtual void bind(int slot) = 0; - virtual void unbind(void) = 0; + virtual void unbind() = 0; /** Used to defer data upload at drawing time. * This is useful if the thread has no context bound. diff --git a/source/blender/gpu/intern/gpu_vertex_buffer_private.hh b/source/blender/gpu/intern/gpu_vertex_buffer_private.hh index 2f46295f45a..97514b382b1 100644 --- a/source/blender/gpu/intern/gpu_vertex_buffer_private.hh +++ b/source/blender/gpu/intern/gpu_vertex_buffer_private.hh @@ -60,36 +60,36 @@ class VertBuf { virtual ~VertBuf(); void init(const GPUVertFormat *format, GPUUsageType usage); - void clear(void); + void clear(); /* Data management. */ void allocate(uint vert_len); void resize(uint vert_len); - void upload(void); + void upload(); virtual void bind_as_ssbo(uint binding) = 0; virtual void wrap_handle(uint64_t handle) = 0; - VertBuf *duplicate(void); + VertBuf *duplicate(); /* Size of the data allocated. */ - size_t size_alloc_get(void) const + size_t size_alloc_get() const { BLI_assert(format.packed); return vertex_alloc * format.stride; } /* Size of the data uploaded to the GPU. */ - size_t size_used_get(void) const + size_t size_used_get() const { BLI_assert(format.packed); return vertex_len * format.stride; } - void reference_add(void) + void reference_add() { handle_refcount_++; } - void reference_remove(void) + void reference_remove() { BLI_assert(handle_refcount_ > 0); handle_refcount_--; @@ -103,10 +103,10 @@ class VertBuf { virtual void *unmap(const void *mapped_data) const = 0; protected: - virtual void acquire_data(void) = 0; - virtual void resize_data(void) = 0; - virtual void release_data(void) = 0; - virtual void upload_data(void) = 0; + virtual void acquire_data() = 0; + virtual void resize_data() = 0; + virtual void release_data() = 0; + virtual void upload_data() = 0; virtual void duplicate_data(VertBuf *dst) = 0; }; |