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/opengl | |
parent | c0fb8ea8f3cd01cfb01effa687a8d553c540aec3 (diff) |
Cleanup: Clang-tidy: modernize-redundant-void-arg
Diffstat (limited to 'source/blender/gpu/opengl')
-rw-r--r-- | source/blender/gpu/opengl/gl_backend.hh | 20 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_batch.hh | 8 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_context.hh | 14 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_debug.hh | 4 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_drawlist.hh | 4 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_framebuffer.hh | 8 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_immediate.hh | 10 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_index_buffer.hh | 6 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_query.hh | 4 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_shader.hh | 10 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_state.hh | 16 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_texture.hh | 16 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_uniform_buffer.hh | 4 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_vertex_buffer.hh | 10 |
14 files changed, 67 insertions, 67 deletions
diff --git a/source/blender/gpu/opengl/gl_backend.hh b/source/blender/gpu/opengl/gl_backend.hh index e9dcdffced0..abac9174d4a 100644 --- a/source/blender/gpu/opengl/gl_backend.hh +++ b/source/blender/gpu/opengl/gl_backend.hh @@ -62,12 +62,12 @@ class GLBackend : public GPUBackend { GLBackend::platform_exit(); } - static GLBackend *get(void) + static GLBackend *get() { return static_cast<GLBackend *>(GPUBackend::get()); } - void samplers_update(void) override + void samplers_update() override { GLTexture::samplers_update(); }; @@ -77,7 +77,7 @@ class GLBackend : public GPUBackend { return new GLContext(ghost_window, shared_orphan_list_); }; - Batch *batch_alloc(void) override + Batch *batch_alloc() override { return new GLBatch(); }; @@ -92,12 +92,12 @@ class GLBackend : public GPUBackend { return new GLFrameBuffer(name); }; - IndexBuf *indexbuf_alloc(void) override + IndexBuf *indexbuf_alloc() override { return new GLIndexBuf(); }; - QueryPool *querypool_alloc(void) override + QueryPool *querypool_alloc() override { return new GLQueryPool(); }; @@ -117,12 +117,12 @@ class GLBackend : public GPUBackend { return new GLUniformBuf(size, name); }; - VertBuf *vertbuf_alloc(void) override + VertBuf *vertbuf_alloc() override { return new GLVertBuf(); }; - GLSharedOrphanLists &shared_orphan_list_get(void) + GLSharedOrphanLists &shared_orphan_list_get() { return shared_orphan_list_; }; @@ -134,10 +134,10 @@ class GLBackend : public GPUBackend { } private: - static void platform_init(void); - static void platform_exit(void); + static void platform_init(); + static void platform_exit(); - static void capabilities_init(void); + static void capabilities_init(); }; } // namespace gpu diff --git a/source/blender/gpu/opengl/gl_batch.hh b/source/blender/gpu/opengl/gl_batch.hh index a2b5f8fc15e..4e6e25cdb0f 100644 --- a/source/blender/gpu/opengl/gl_batch.hh +++ b/source/blender/gpu/opengl/gl_batch.hh @@ -91,15 +91,15 @@ class GLVaoCache { */ void insert(const GLShaderInterface *interface, GLuint vao_id); void remove(const GLShaderInterface *interface); - void clear(void); + void clear(); private: - void init(void); + void init(); /** * The #GLVaoCache object is only valid for one #GLContext. * Reset the cache if trying to draw in another context;. */ - void context_check(void); + void context_check(); }; class GLBatch : public Batch { @@ -113,7 +113,7 @@ class GLBatch : public Batch { /* Convenience getters. */ - GLIndexBuf *elem_(void) const + GLIndexBuf *elem_() const { return static_cast<GLIndexBuf *>(unwrap(elem)); } diff --git a/source/blender/gpu/opengl/gl_context.hh b/source/blender/gpu/opengl/gl_context.hh index 40107ca9ef7..656f4a1caf2 100644 --- a/source/blender/gpu/opengl/gl_context.hh +++ b/source/blender/gpu/opengl/gl_context.hh @@ -50,7 +50,7 @@ class GLSharedOrphanLists { Vector<GLuint> buffers; public: - void orphans_clear(void); + void orphans_clear(); }; class GLContext : public Context { @@ -112,11 +112,11 @@ class GLContext : public Context { static void check_error(const char *info); - void activate(void) override; - void deactivate(void) override; + void activate() override; + void deactivate() override; - void flush(void) override; - void finish(void) override; + void flush() override; + void finish() override; void memory_statistics_get(int *total_mem, int *free_mem) override; @@ -142,11 +142,11 @@ class GLContext : public Context { void vao_cache_unregister(GLVaoCache *cache); void debug_group_begin(const char *name, int index) override; - void debug_group_end(void) override; + void debug_group_end() override; private: static void orphans_add(Vector<GLuint> &orphan_list, std::mutex &list_mutex, GLuint id); - void orphans_clear(void); + void orphans_clear(); MEM_CXX_CLASS_ALLOC_FUNCS("GLContext") }; diff --git a/source/blender/gpu/opengl/gl_debug.hh b/source/blender/gpu/opengl/gl_debug.hh index 3964e5da550..7917c05f94b 100644 --- a/source/blender/gpu/opengl/gl_debug.hh +++ b/source/blender/gpu/opengl/gl_debug.hh @@ -91,14 +91,14 @@ void check_gl_resources(const char *info); /** * This function needs to be called once per context. */ -void init_gl_callbacks(void); +void init_gl_callbacks(); /** * Initialize a fallback layer (to KHR_debug) that covers only some functions. * We override the functions pointers by our own implementation that just checks #glGetError. * Some additional functions (not overridable) are covered inside the header using wrappers. */ -void init_debug_layer(void); +void init_debug_layer(); void object_label(GLenum type, GLuint object, const char *name); diff --git a/source/blender/gpu/opengl/gl_drawlist.hh b/source/blender/gpu/opengl/gl_drawlist.hh index 6f80fdd5a8a..bb7b89ca707 100644 --- a/source/blender/gpu/opengl/gl_drawlist.hh +++ b/source/blender/gpu/opengl/gl_drawlist.hh @@ -48,10 +48,10 @@ class GLDrawList : public DrawList { ~GLDrawList(); void append(GPUBatch *batch, int i_first, int i_count) override; - void submit(void) override; + void submit() override; private: - void init(void); + void init(); /** Batch for which we are recording commands for. */ GLBatch *batch_; diff --git a/source/blender/gpu/opengl/gl_framebuffer.hh b/source/blender/gpu/opengl/gl_framebuffer.hh index 21b5931440d..9ebe549efe7 100644 --- a/source/blender/gpu/opengl/gl_framebuffer.hh +++ b/source/blender/gpu/opengl/gl_framebuffer.hh @@ -110,12 +110,12 @@ class GLFrameBuffer : public FrameBuffer { int dst_offset_x, int dst_offset_y) override; - void apply_state(void); + void apply_state(); private: - void init(void); - void update_attachments(void); - void update_drawbuffers(void); + void init(); + void update_attachments(); + void update_drawbuffers(); MEM_CXX_CLASS_ALLOC_FUNCS("GLFrameBuffer"); }; diff --git a/source/blender/gpu/opengl/gl_immediate.hh b/source/blender/gpu/opengl/gl_immediate.hh index b42f439f9ec..235bc1254f2 100644 --- a/source/blender/gpu/opengl/gl_immediate.hh +++ b/source/blender/gpu/opengl/gl_immediate.hh @@ -58,21 +58,21 @@ class GLImmediate : public Immediate { GLImmediate(); ~GLImmediate(); - uchar *begin(void) override; - void end(void) override; + uchar *begin() override; + void end() override; private: - GLuint &vbo_id(void) + GLuint &vbo_id() { return strict_vertex_len ? buffer_strict.vbo_id : buffer.vbo_id; }; - size_t &buffer_offset(void) + size_t &buffer_offset() { return strict_vertex_len ? buffer_strict.buffer_offset : buffer.buffer_offset; }; - size_t &buffer_size(void) + size_t &buffer_size() { return strict_vertex_len ? buffer_strict.buffer_size : buffer.buffer_size; }; diff --git a/source/blender/gpu/opengl/gl_index_buffer.hh b/source/blender/gpu/opengl/gl_index_buffer.hh index 85d52447bc6..aaec10d43b3 100644 --- a/source/blender/gpu/opengl/gl_index_buffer.hh +++ b/source/blender/gpu/opengl/gl_index_buffer.hh @@ -42,7 +42,7 @@ class GLIndexBuf : public IndexBuf { public: ~GLIndexBuf(); - void bind(void); + void bind(); void bind_as_ssbo(uint binding) override; const uint32_t *read() const override; @@ -56,12 +56,12 @@ class GLIndexBuf : public IndexBuf { return (GLushort *)0 + additional_vertex_offset; } - GLuint restart_index(void) const + GLuint restart_index() const { return (index_type_ == GPU_INDEX_U16) ? 0xFFFFu : 0xFFFFFFFFu; } - void upload_data(void) override; + void upload_data() override; void update_sub(uint start, uint len, const void *data) override; diff --git a/source/blender/gpu/opengl/gl_query.hh b/source/blender/gpu/opengl/gl_query.hh index b4f971f45ee..2848a7abb8b 100644 --- a/source/blender/gpu/opengl/gl_query.hh +++ b/source/blender/gpu/opengl/gl_query.hh @@ -50,8 +50,8 @@ class GLQueryPool : public QueryPool { void init(GPUQueryType type) override; - void begin_query(void) override; - void end_query(void) override; + void begin_query() override; + void end_query() override; void get_occlusion_result(MutableSpan<uint32_t> r_values) override; }; diff --git a/source/blender/gpu/opengl/gl_shader.hh b/source/blender/gpu/opengl/gl_shader.hh index 57e33392d9f..6a424e0c7ee 100644 --- a/source/blender/gpu/opengl/gl_shader.hh +++ b/source/blender/gpu/opengl/gl_shader.hh @@ -58,16 +58,16 @@ class GLShader : public Shader { void geometry_shader_from_glsl(MutableSpan<const char *> sources) override; void fragment_shader_from_glsl(MutableSpan<const char *> sources) override; void compute_shader_from_glsl(MutableSpan<const char *> sources) override; - bool finalize(void) override; + bool finalize() override; /** Should be called before linking. */ void transform_feedback_names_set(Span<const char *> name_list, const eGPUShaderTFBType geom_type) override; bool transform_feedback_enable(GPUVertBuf *buf) override; - void transform_feedback_disable(void) override; + void transform_feedback_disable() override; - void bind(void) override; - void unbind(void) override; + void bind() override; + void unbind() override; void uniform_float(int location, int comp_len, int array_size, const float *data) override; void uniform_int(int location, int comp_len, int array_size, const int *data) override; @@ -75,7 +75,7 @@ class GLShader : public Shader { void vertformat_from_shader(GPUVertFormat *format) const override; /** DEPRECATED: Kept only because of BGL API. */ - int program_handle_get(void) const override; + int program_handle_get() const override; private: char *glsl_patch_get(GLenum gl_stage); diff --git a/source/blender/gpu/opengl/gl_state.hh b/source/blender/gpu/opengl/gl_state.hh index f5c38a33628..e0c0dab76e1 100644 --- a/source/blender/gpu/opengl/gl_state.hh +++ b/source/blender/gpu/opengl/gl_state.hh @@ -71,11 +71,11 @@ class GLStateManager : public StateManager { public: GLStateManager(); - void apply_state(void) override; + void apply_state() override; /** * Will set all the states regardless of the current ones. */ - void force_state(void) override; + void force_state() override; void issue_barrier(eGPUBarrier barrier_bits) override; @@ -85,16 +85,16 @@ class GLStateManager : public StateManager { */ void texture_bind_temp(GLTexture *tex); void texture_unbind(Texture *tex) override; - void texture_unbind_all(void) override; + void texture_unbind_all() override; void image_bind(Texture *tex, int unit) override; void image_unbind(Texture *tex) override; - void image_unbind_all(void) override; + void image_unbind_all() override; void texture_unpack_row_length_set(uint len) override; - uint64_t bound_texture_slots(void); - uint8_t bound_image_slots(void); + uint64_t bound_texture_slots(); + uint8_t bound_image_slots(); private: static void set_write_mask(const eGPUWriteMask value); @@ -112,8 +112,8 @@ class GLStateManager : public StateManager { void set_state(const GPUState &state); void set_mutable_state(const GPUStateMutable &state); - void texture_bind_apply(void); - void image_bind_apply(void); + void texture_bind_apply(); + void image_bind_apply(); MEM_CXX_CLASS_ALLOC_FUNCS("GLStateManager") }; diff --git a/source/blender/gpu/opengl/gl_texture.hh b/source/blender/gpu/opengl/gl_texture.hh index eb979444f5a..e786eaed38a 100644 --- a/source/blender/gpu/opengl/gl_texture.hh +++ b/source/blender/gpu/opengl/gl_texture.hh @@ -69,25 +69,25 @@ class GLTexture : public Texture { * \warning Depth textures are not populated but they have their mips correctly defined. * \warning This resets the mipmap range. */ - void generate_mipmap(void) override; + void generate_mipmap() override; void copy_to(Texture *dst) override; void clear(eGPUDataFormat format, const void *data) override; void swizzle_set(const char swizzle_mask[4]) override; void mip_range_set(int min, int max) override; void *read(int mip, eGPUDataFormat type) override; - void check_feedback_loop(void); + void check_feedback_loop(); /* TODO(fclem): Legacy. Should be removed at some point. */ - uint gl_bindcode_get(void) const override; + uint gl_bindcode_get() const override; - static void samplers_init(void); - static void samplers_free(void); - static void samplers_update(void); + static void samplers_init(); + static void samplers_free(); + static void samplers_update(); protected: /** Return true on success. */ - bool init_internal(void) override; + bool init_internal() override; /** Return true on success. */ bool init_internal(GPUVertBuf *vbo) override; @@ -97,7 +97,7 @@ class GLTexture : public Texture { void ensure_mipmaps(int mip); void update_sub_direct_state_access( int mip, int offset[3], int extent[3], GLenum gl_format, GLenum gl_type, const void *data); - GPUFrameBuffer *framebuffer_get(void); + GPUFrameBuffer *framebuffer_get(); MEM_CXX_CLASS_ALLOC_FUNCS("GLTexture") }; diff --git a/source/blender/gpu/opengl/gl_uniform_buffer.hh b/source/blender/gpu/opengl/gl_uniform_buffer.hh index 6cc525a2b7a..d7b9982dfb8 100644 --- a/source/blender/gpu/opengl/gl_uniform_buffer.hh +++ b/source/blender/gpu/opengl/gl_uniform_buffer.hh @@ -48,10 +48,10 @@ class GLUniformBuf : public UniformBuf { void update(const void *data) override; void bind(int slot) override; - void unbind(void) override; + void unbind() override; private: - void init(void); + void init(); MEM_CXX_CLASS_ALLOC_FUNCS("GLUniformBuf"); }; diff --git a/source/blender/gpu/opengl/gl_vertex_buffer.hh b/source/blender/gpu/opengl/gl_vertex_buffer.hh index 27e4cc4f8e2..d347b6d56ca 100644 --- a/source/blender/gpu/opengl/gl_vertex_buffer.hh +++ b/source/blender/gpu/opengl/gl_vertex_buffer.hh @@ -46,7 +46,7 @@ class GLVertBuf : public VertBuf { size_t vbo_size_ = 0; public: - void bind(void); + void bind(); void update_sub(uint start, uint len, const void *data) override; @@ -56,10 +56,10 @@ class GLVertBuf : public VertBuf { void wrap_handle(uint64_t handle) override; protected: - void acquire_data(void) override; - void resize_data(void) override; - void release_data(void) override; - void upload_data(void) override; + void acquire_data() override; + void resize_data() override; + void release_data() override; + void upload_data() override; void duplicate_data(VertBuf *dst) override; void bind_as_ssbo(uint binding) override; |