GPU: Fix clang tidy warnings

This commit is contained in:
Clément Foucault
2020-09-07 13:59:22 +02:00
parent aa32e7a2f3
commit 6b91c641e8
5 changed files with 16 additions and 16 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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)

View File

@@ -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);
}
/** \} */

View File

@@ -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);