diff options
Diffstat (limited to 'source/blender/gpu')
28 files changed, 133 insertions, 133 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; }; 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; |