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:
authorClément Foucault <foucault.clem@gmail.com>2020-09-07 14:59:22 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-07 15:03:03 +0300
commit6b91c641e81ec2256b63e3dc8c0fe9d4e5dcf411 (patch)
tree02423eebd06fe2c1467dd461f2967e7b8fc64504 /source/blender/gpu
parentaa32e7a2f31486503edb430b15ce31a819e02702 (diff)
GPU: Fix clang tidy warnings
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_index_buffer.h4
-rw-r--r--source/blender/gpu/GPU_texture.h8
-rw-r--r--source/blender/gpu/intern/gpu_texture.cc8
-rw-r--r--source/blender/gpu/opengl/gl_debug.cc6
-rw-r--r--source/blender/gpu/opengl/gl_texture.hh6
5 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/gpu/GPU_index_buffer.h b/source/blender/gpu/GPU_index_buffer.h
index 09c12c6e177..df24e07caef 100644
--- a/source/blender/gpu/GPU_index_buffer.h
+++ b/source/blender/gpu/GPU_index_buffer.h
@@ -81,9 +81,9 @@ void GPU_indexbuf_create_subrange_in_place(GPUIndexBuf *elem,
uint start,
uint length);
-void GPU_indexbuf_discard(GPUIndexBuf *);
+void GPU_indexbuf_discard(GPUIndexBuf *elem);
-bool GPU_indexbuf_is_init(GPUIndexBuf *ibo);
+bool GPU_indexbuf_is_init(GPUIndexBuf *elem);
int GPU_indexbuf_primitive_len(GPUPrimType prim_type);
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index 78a4c9d0ac9..bae5bfbaae8 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -218,9 +218,9 @@ void GPU_texture_update_mipmap(GPUTexture *tex,
eGPUDataFormat gpu_data_format,
const void *pixels);
-void GPU_texture_update(GPUTexture *tex, eGPUDataFormat data_format, const void *pixels);
+void GPU_texture_update(GPUTexture *tex, eGPUDataFormat data_format, const void *data);
void GPU_texture_update_sub(GPUTexture *tex,
- eGPUDataFormat gpu_data_format,
+ eGPUDataFormat data_format,
const void *pixels,
int offset_x,
int offset_y,
@@ -229,8 +229,8 @@ void GPU_texture_update_sub(GPUTexture *tex,
int height,
int depth);
-void *GPU_texture_read(GPUTexture *tex, eGPUDataFormat gpu_data_format, int miplvl);
-void GPU_texture_clear(GPUTexture *tex, eGPUDataFormat gpu_data_format, const void *color);
+void *GPU_texture_read(GPUTexture *tex, eGPUDataFormat data_format, int miplvl);
+void GPU_texture_clear(GPUTexture *tex, eGPUDataFormat data_format, const void *data);
void GPU_invalid_tex_init(void);
void GPU_invalid_tex_bind(int mode);
diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc
index a4d0d039c8f..ad9b690683c 100644
--- a/source/blender/gpu/intern/gpu_texture.cc
+++ b/source/blender/gpu/intern/gpu_texture.cc
@@ -331,17 +331,17 @@ GPUTexture *GPU_texture_create_error(int dimension, bool is_array)
void GPU_texture_update_mipmap(GPUTexture *tex_,
int miplvl,
- eGPUDataFormat gpu_data_format,
+ eGPUDataFormat data_format,
const void *pixels)
{
Texture *tex = reinterpret_cast<Texture *>(tex_);
int extent[3] = {1, 1, 1}, offset[3] = {0, 0, 0};
tex->mip_size_get(miplvl, extent);
- reinterpret_cast<Texture *>(tex)->update_sub(miplvl, offset, extent, gpu_data_format, pixels);
+ reinterpret_cast<Texture *>(tex)->update_sub(miplvl, offset, extent, data_format, pixels);
}
void GPU_texture_update_sub(GPUTexture *tex,
- eGPUDataFormat gpu_data_format,
+ eGPUDataFormat data_format,
const void *pixels,
int offset_x,
int offset_y,
@@ -352,7 +352,7 @@ void GPU_texture_update_sub(GPUTexture *tex,
{
int offset[3] = {offset_x, offset_y, offset_z};
int extent[3] = {width, height, depth};
- reinterpret_cast<Texture *>(tex)->update_sub(0, offset, extent, gpu_data_format, pixels);
+ reinterpret_cast<Texture *>(tex)->update_sub(0, offset, extent, data_format, pixels);
}
void *GPU_texture_read(GPUTexture *tex_, eGPUDataFormat data_format, int miplvl)
diff --git a/source/blender/gpu/opengl/gl_debug.cc b/source/blender/gpu/opengl/gl_debug.cc
index 5915b3ea226..d54ea0919b6 100644
--- a/source/blender/gpu/opengl/gl_debug.cc
+++ b/source/blender/gpu/opengl/gl_debug.cc
@@ -207,7 +207,7 @@ void check_gl_resources(const char *info)
/* NOTE: This only check binding. To be valid, the bound texture needs to
* be the same format/target the shader expects. */
uint64_t tex_needed = interface->enabled_tex_mask_;
- tex_needed &= ~ctx->state_manager_active_get()->bound_texture_slots();
+ tex_needed &= ~GLContext::state_manager_active_get()->bound_texture_slots();
if (ubo_needed == 0 && tex_needed == 0) {
return;
@@ -236,9 +236,9 @@ void check_gl_resources(const char *info)
}
}
-void raise_gl_error(const char *msg)
+void raise_gl_error(const char *info)
{
- debug_callback(0, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, 0, msg, NULL);
+ debug_callback(0, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, 0, info, NULL);
}
/** \} */
diff --git a/source/blender/gpu/opengl/gl_texture.hh b/source/blender/gpu/opengl/gl_texture.hh
index 0f241a6f57b..bdb8a4df4b7 100644
--- a/source/blender/gpu/opengl/gl_texture.hh
+++ b/source/blender/gpu/opengl/gl_texture.hh
@@ -66,14 +66,14 @@ class GLTexture : public Texture {
~GLTexture();
void update_sub(
- int mip, int offset[3], int extent[3], eGPUDataFormat format, const void *data) override;
+ int mip, int offset[3], int extent[3], eGPUDataFormat type, const void *data) override;
void generate_mipmap(void) override;
- void copy_to(Texture *tex) 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 format) override;
+ void *read(int mip, eGPUDataFormat type) override;
void check_feedback_loop(void);