diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2021-12-08 08:31:20 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2021-12-08 08:31:20 +0300 |
commit | c1279768a77d093e1747f4954c9c0a959feefdf0 (patch) | |
tree | 1def9c880322764b4fe090677dfb66cab0c380d9 /source/blender/gpu/intern | |
parent | cbcd74de226778a9da980c8c6081793452dd5cbc (diff) |
Cleanup: Clang-Tidy modernize-redundant-void-arg
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch.cc | 6 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_capabilities.cc | 46 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_context.cc | 8 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_debug.cc | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_framebuffer.cc | 10 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_index_buffer.cc | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_matrix.cc | 22 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_platform.cc | 10 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_select_sample_query.cc | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_uniform_buffer.cc | 2 |
10 files changed, 55 insertions, 55 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.cc b/source/blender/gpu/intern/gpu_batch.cc index 0e5c7900da9..6ff67e1f043 100644 --- a/source/blender/gpu/intern/gpu_batch.cc +++ b/source/blender/gpu/intern/gpu_batch.cc @@ -50,7 +50,7 @@ using namespace blender::gpu; /** \name Creation & Deletion * \{ */ -GPUBatch *GPU_batch_calloc(void) +GPUBatch *GPU_batch_calloc() { GPUBatch *batch = GPUBackend::get()->batch_alloc(); memset(batch, 0, sizeof(*batch)); @@ -315,12 +315,12 @@ void GPU_batch_program_set_imm_shader(GPUBatch *batch) /** \name Init/Exit * \{ */ -void gpu_batch_init(void) +void gpu_batch_init() { gpu_batch_presets_init(); } -void gpu_batch_exit(void) +void gpu_batch_exit() { gpu_batch_presets_exit(); } diff --git a/source/blender/gpu/intern/gpu_capabilities.cc b/source/blender/gpu/intern/gpu_capabilities.cc index c6e9dc210cb..fe04d1db03c 100644 --- a/source/blender/gpu/intern/gpu_capabilities.cc +++ b/source/blender/gpu/intern/gpu_capabilities.cc @@ -44,7 +44,7 @@ using namespace blender::gpu; /** \name Capabilities * \{ */ -int GPU_max_texture_size(void) +int GPU_max_texture_size() { return GCaps.max_texture_size; } @@ -57,27 +57,27 @@ int GPU_texture_size_with_limit(int res, bool limit_gl_texture_size) return min_ii(reslimit, res); } -int GPU_max_texture_layers(void) +int GPU_max_texture_layers() { return GCaps.max_texture_layers; } -int GPU_max_textures_vert(void) +int GPU_max_textures_vert() { return GCaps.max_textures_vert; } -int GPU_max_textures_geom(void) +int GPU_max_textures_geom() { return GCaps.max_textures_geom; } -int GPU_max_textures_frag(void) +int GPU_max_textures_frag() { return GCaps.max_textures_frag; } -int GPU_max_textures(void) +int GPU_max_textures() { return GCaps.max_textures; } @@ -92,37 +92,37 @@ int GPU_max_work_group_size(int index) return GCaps.max_work_group_size[index]; } -int GPU_max_uniforms_vert(void) +int GPU_max_uniforms_vert() { return GCaps.max_uniforms_vert; } -int GPU_max_uniforms_frag(void) +int GPU_max_uniforms_frag() { return GCaps.max_uniforms_frag; } -int GPU_max_batch_indices(void) +int GPU_max_batch_indices() { return GCaps.max_batch_indices; } -int GPU_max_batch_vertices(void) +int GPU_max_batch_vertices() { return GCaps.max_batch_vertices; } -int GPU_max_vertex_attribs(void) +int GPU_max_vertex_attribs() { return GCaps.max_vertex_attribs; } -int GPU_max_varying_floats(void) +int GPU_max_varying_floats() { return GCaps.max_varying_floats; } -int GPU_extensions_len(void) +int GPU_extensions_len() { return GCaps.extensions_len; } @@ -132,43 +132,43 @@ const char *GPU_extension_get(int i) return GCaps.extension_get ? GCaps.extension_get(i) : "\0"; } -bool GPU_mip_render_workaround(void) +bool GPU_mip_render_workaround() { return GCaps.mip_render_workaround; } -bool GPU_depth_blitting_workaround(void) +bool GPU_depth_blitting_workaround() { return GCaps.depth_blitting_workaround; } -bool GPU_use_main_context_workaround(void) +bool GPU_use_main_context_workaround() { return GCaps.use_main_context_workaround; } -bool GPU_crappy_amd_driver(void) +bool GPU_crappy_amd_driver() { /* Currently are the same drivers with the `unused_fb_slot` problem. */ return GCaps.broken_amd_driver; } -bool GPU_use_hq_normals_workaround(void) +bool GPU_use_hq_normals_workaround() { return GCaps.use_hq_normals_workaround; } -bool GPU_compute_shader_support(void) +bool GPU_compute_shader_support() { return GCaps.compute_shader_support; } -bool GPU_shader_storage_buffer_objects_support(void) +bool GPU_shader_storage_buffer_objects_support() { return GCaps.shader_storage_buffer_objects_support; } -bool GPU_shader_image_load_store_support(void) +bool GPU_shader_image_load_store_support() { return GCaps.shader_image_load_store_support; } @@ -179,7 +179,7 @@ bool GPU_shader_image_load_store_support(void) /** \name Memory statistics * \{ */ -bool GPU_mem_stats_supported(void) +bool GPU_mem_stats_supported() { return GCaps.mem_stats_support; } @@ -190,7 +190,7 @@ void GPU_mem_stats_get(int *totalmem, int *freemem) } /* Return support for the active context + window. */ -bool GPU_stereo_quadbuffer_support(void) +bool GPU_stereo_quadbuffer_support() { return Context::get()->front_right != nullptr; } diff --git a/source/blender/gpu/intern/gpu_context.cc b/source/blender/gpu/intern/gpu_context.cc index 943a6151ced..85be7b593eb 100644 --- a/source/blender/gpu/intern/gpu_context.cc +++ b/source/blender/gpu/intern/gpu_context.cc @@ -133,7 +133,7 @@ void GPU_context_active_set(GPUContext *ctx_) } } -GPUContext *GPU_context_active_get(void) +GPUContext *GPU_context_active_get() { return wrap(Context::get()); } @@ -146,12 +146,12 @@ GPUContext *GPU_context_active_get(void) static std::mutex main_context_mutex; -void GPU_context_main_lock(void) +void GPU_context_main_lock() { main_context_mutex.lock(); } -void GPU_context_main_unlock(void) +void GPU_context_main_unlock() { main_context_mutex.unlock(); } @@ -180,7 +180,7 @@ void GPU_backend_init(eGPUBackendType backend_type) } } -void GPU_backend_exit(void) +void GPU_backend_exit() { /* TODO: assert no resource left. Currently UI textures are still not freed in their context * correctly. */ diff --git a/source/blender/gpu/intern/gpu_debug.cc b/source/blender/gpu/intern/gpu_debug.cc index 2d9fb7822ae..5f061bd1bee 100644 --- a/source/blender/gpu/intern/gpu_debug.cc +++ b/source/blender/gpu/intern/gpu_debug.cc @@ -45,7 +45,7 @@ void GPU_debug_group_begin(const char *name) ctx->debug_group_begin(name, stack.size()); } -void GPU_debug_group_end(void) +void GPU_debug_group_end() { if (!(G.debug & G_DEBUG_GPU)) { return; diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc index 9099a6e4245..ea37afd2885 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.cc +++ b/source/blender/gpu/intern/gpu_framebuffer.cc @@ -240,19 +240,19 @@ void GPU_backbuffer_bind(eGPUBackBuffer buffer) } } -void GPU_framebuffer_restore(void) +void GPU_framebuffer_restore() { Context::get()->back_left->bind(false); } -GPUFrameBuffer *GPU_framebuffer_active_get(void) +GPUFrameBuffer *GPU_framebuffer_active_get() { Context *ctx = Context::get(); return wrap(ctx ? ctx->active_fb : nullptr); } /* Returns the default frame-buffer. Will always exists even if it's just a dummy. */ -GPUFrameBuffer *GPU_framebuffer_back_get(void) +GPUFrameBuffer *GPU_framebuffer_back_get() { Context *ctx = Context::get(); return wrap(ctx ? ctx->back_left : nullptr); @@ -514,14 +514,14 @@ void GPU_framebuffer_push(GPUFrameBuffer *fb) FrameBufferStack.top++; } -GPUFrameBuffer *GPU_framebuffer_pop(void) +GPUFrameBuffer *GPU_framebuffer_pop() { BLI_assert(FrameBufferStack.top > 0); FrameBufferStack.top--; return FrameBufferStack.framebuffers[FrameBufferStack.top]; } -uint GPU_framebuffer_stack_level_get(void) +uint GPU_framebuffer_stack_level_get() { return FrameBufferStack.top; } diff --git a/source/blender/gpu/intern/gpu_index_buffer.cc b/source/blender/gpu/intern/gpu_index_buffer.cc index be7470e79c1..3472cc24a74 100644 --- a/source/blender/gpu/intern/gpu_index_buffer.cc +++ b/source/blender/gpu/intern/gpu_index_buffer.cc @@ -349,7 +349,7 @@ uint32_t *IndexBuf::unmap(const uint32_t *mapped_memory) const /** \name C-API * \{ */ -GPUIndexBuf *GPU_indexbuf_calloc(void) +GPUIndexBuf *GPU_indexbuf_calloc() { return wrap(GPUBackend::get()->indexbuf_alloc()); } diff --git a/source/blender/gpu/intern/gpu_matrix.cc b/source/blender/gpu/intern/gpu_matrix.cc index bbcc241f5e3..0cc0e944301 100644 --- a/source/blender/gpu/intern/gpu_matrix.cc +++ b/source/blender/gpu/intern/gpu_matrix.cc @@ -67,7 +67,7 @@ struct GPUMatrixState { #define ProjectionStack Context::get()->matrix_state->projection_stack #define Projection ProjectionStack.stack[ProjectionStack.top] -GPUMatrixState *GPU_matrix_state_create(void) +GPUMatrixState *GPU_matrix_state_create() { #define MATRIX_4X4_IDENTITY \ { \ @@ -99,7 +99,7 @@ static void gpu_matrix_state_active_set_dirty(bool value) state->dirty = value; } -void GPU_matrix_reset(void) +void GPU_matrix_reset() { GPUMatrixState *state = Context::get()->matrix_state; state->model_view_stack.top = 0; @@ -132,28 +132,28 @@ static void checkmat(cosnt float *m) #endif -void GPU_matrix_push(void) +void GPU_matrix_push() { BLI_assert(ModelViewStack.top + 1 < MATRIX_STACK_DEPTH); ModelViewStack.top++; copy_m4_m4(ModelView, ModelViewStack.stack[ModelViewStack.top - 1]); } -void GPU_matrix_pop(void) +void GPU_matrix_pop() { BLI_assert(ModelViewStack.top > 0); ModelViewStack.top--; gpu_matrix_state_active_set_dirty(true); } -void GPU_matrix_push_projection(void) +void GPU_matrix_push_projection() { BLI_assert(ProjectionStack.top + 1 < MATRIX_STACK_DEPTH); ProjectionStack.top++; copy_m4_m4(Projection, ProjectionStack.stack[ProjectionStack.top - 1]); } -void GPU_matrix_pop_projection(void) +void GPU_matrix_pop_projection() { BLI_assert(ProjectionStack.top > 0); ProjectionStack.top--; @@ -167,7 +167,7 @@ void GPU_matrix_set(const float m[4][4]) gpu_matrix_state_active_set_dirty(true); } -void GPU_matrix_identity_projection_set(void) +void GPU_matrix_identity_projection_set() { unit_m4(Projection); CHECKMAT(Projection3D); @@ -181,7 +181,7 @@ void GPU_matrix_projection_set(const float m[4][4]) gpu_matrix_state_active_set_dirty(true); } -void GPU_matrix_identity_set(void) +void GPU_matrix_identity_set() { unit_m4(ModelView); gpu_matrix_state_active_set_dirty(true); @@ -668,7 +668,7 @@ void GPU_matrix_bind(GPUShader *shader) gpu_matrix_state_active_set_dirty(false); } -bool GPU_matrix_dirty_get(void) +bool GPU_matrix_dirty_get() { GPUMatrixState *state = Context::get()->matrix_state; return state->dirty; @@ -681,13 +681,13 @@ BLI_STATIC_ASSERT(GPU_PY_MATRIX_STACK_LEN + 1 == MATRIX_STACK_DEPTH, "define mis /* Return int since caller is may subtract. */ -int GPU_matrix_stack_level_get_model_view(void) +int GPU_matrix_stack_level_get_model_view() { GPUMatrixState *state = Context::get()->matrix_state; return (int)state->model_view_stack.top; } -int GPU_matrix_stack_level_get_projection(void) +int GPU_matrix_stack_level_get_projection() { GPUMatrixState *state = Context::get()->matrix_state; return (int)state->projection_stack.top; diff --git a/source/blender/gpu/intern/gpu_platform.cc b/source/blender/gpu/intern/gpu_platform.cc index 49dde473300..907dfa0fc1a 100644 --- a/source/blender/gpu/intern/gpu_platform.cc +++ b/source/blender/gpu/intern/gpu_platform.cc @@ -127,31 +127,31 @@ eGPUSupportLevel GPU_platform_support_level() return GPG.support_level; } -const char *GPU_platform_vendor(void) +const char *GPU_platform_vendor() { BLI_assert(GPG.initialized); return GPG.vendor; } -const char *GPU_platform_renderer(void) +const char *GPU_platform_renderer() { BLI_assert(GPG.initialized); return GPG.renderer; } -const char *GPU_platform_version(void) +const char *GPU_platform_version() { BLI_assert(GPG.initialized); return GPG.version; } -const char *GPU_platform_support_level_key(void) +const char *GPU_platform_support_level_key() { BLI_assert(GPG.initialized); return GPG.support_key; } -const char *GPU_platform_gpu_name(void) +const char *GPU_platform_gpu_name() { BLI_assert(GPG.initialized); return GPG.gpu_name; diff --git a/source/blender/gpu/intern/gpu_select_sample_query.cc b/source/blender/gpu/intern/gpu_select_sample_query.cc index 047ce0cfb35..a430d4a9d62 100644 --- a/source/blender/gpu/intern/gpu_select_sample_query.cc +++ b/source/blender/gpu/intern/gpu_select_sample_query.cc @@ -151,7 +151,7 @@ bool gpu_select_query_load_id(uint id) return true; } -uint gpu_select_query_end(void) +uint gpu_select_query_end() { uint hits = 0; const uint maxhits = g_query_state.bufsize; diff --git a/source/blender/gpu/intern/gpu_uniform_buffer.cc b/source/blender/gpu/intern/gpu_uniform_buffer.cc index 3a9269d1753..6f2e9838955 100644 --- a/source/blender/gpu/intern/gpu_uniform_buffer.cc +++ b/source/blender/gpu/intern/gpu_uniform_buffer.cc @@ -245,7 +245,7 @@ void GPU_uniformbuf_unbind(GPUUniformBuf *ubo) unwrap(ubo)->unbind(); } -void GPU_uniformbuf_unbind_all(void) +void GPU_uniformbuf_unbind_all() { /* FIXME */ } |