Cleanup: clang-format

This commit is contained in:
Campbell Barton 2019-11-08 11:35:17 +11:00
parent eefd806afc
commit bda58b8a89
9 changed files with 130 additions and 124 deletions

@ -407,7 +407,8 @@ BLI_INLINE eGPUTextureFormat workbench_color_texture_format(const WORKBENCH_Priv
return result;
}
BLI_INLINE bool workbench_background_dither_factor(const WORKBENCH_PrivateData *wpd) {
BLI_INLINE bool workbench_background_dither_factor(const WORKBENCH_PrivateData *wpd)
{
/* Only apply dithering when rendering on a RGBA8 texture.
* The dithering will remove banding when using a gradient as background */
return workbench_color_texture_format(wpd) == GPU_RGBA8;

@ -74,7 +74,8 @@ static int gpu_shader_math(GPUMaterial *mat,
if (ret && node->custom2 & SHD_MATH_CLAMP) {
float min[3] = {0.0f, 0.0f, 0.0f};
float max[3] = {1.0f, 1.0f, 1.0f};
GPU_link(mat, "clamp_value", out[0].link, GPU_constant(min), GPU_constant(max), &out[0].link);
GPU_link(
mat, "clamp_value", out[0].link, GPU_constant(min), GPU_constant(max), &out[0].link);
}
return ret;
}

@ -93,7 +93,8 @@ static int gpu_shader_mix_rgb(GPUMaterial *mat,
if (ret && node->custom2 & SHD_MIXRGB_CLAMP) {
float min[3] = {0.0f, 0.0f, 0.0f};
float max[3] = {1.0f, 1.0f, 1.0f};
GPU_link(mat, "clamp_color", out[0].link, GPU_constant(min), GPU_constant(max), &out[0].link);
GPU_link(
mat, "clamp_color", out[0].link, GPU_constant(min), GPU_constant(max), &out[0].link);
}
return ret;
}

@ -50,7 +50,10 @@ TEST(kdopbvh, Single)
BLI_bvhtree_free(tree);
}
static void optimal_check_callback(void *userdata, int index, const float co[3], BVHTreeNearest *nearest)
static void optimal_check_callback(void *userdata,
int index,
const float co[3],
BVHTreeNearest *nearest)
{
float(*points)[3] = (float(*)[3])userdata;