Cleanup: style
This commit is contained in:
parent
ee5eb2a26a
commit
d12378da11
@ -352,7 +352,7 @@ MALWAYS_INLINE __m128 _bli_math_improve_5throot_solution(
|
||||
__m128 approx4 = _mm_mul_ps(approx2, approx2);
|
||||
__m128 t = _mm_div_ps(x, approx4);
|
||||
__m128 summ = _mm_add_ps(_mm_mul_ps(_mm_set1_ps(4.0f), old_result), t); /* fma */
|
||||
return _mm_mul_ps(summ, _mm_set1_ps(1.0f/5.0f));
|
||||
return _mm_mul_ps(summ, _mm_set1_ps(1.0f / 5.0f));
|
||||
}
|
||||
|
||||
/* Calculate powf(x, 2.4). Working domain: 1e-10 < x < 1e+10 */
|
||||
|
@ -44,10 +44,10 @@
|
||||
MALWAYS_INLINE __m128 srgb_to_linearrgb_v4_simd(const __m128 c)
|
||||
{
|
||||
__m128 cmp = _mm_cmplt_ps(c, _mm_set1_ps(0.04045f));
|
||||
__m128 lt = _mm_max_ps(_mm_mul_ps(c, _mm_set1_ps(1.0f/12.92f)),
|
||||
__m128 lt = _mm_max_ps(_mm_mul_ps(c, _mm_set1_ps(1.0f / 12.92f)),
|
||||
_mm_set1_ps(0.0f));
|
||||
__m128 gtebase = _mm_mul_ps(_mm_add_ps(c, _mm_set1_ps(0.055f)),
|
||||
_mm_set1_ps(1.0f/1.055f)); /* fma */
|
||||
_mm_set1_ps(1.0f / 1.055f)); /* fma */
|
||||
__m128 gte = _bli_math_fastpow24(gtebase);
|
||||
return _bli_math_blend_sse(cmp, lt, gte);
|
||||
}
|
||||
|
@ -5824,9 +5824,9 @@ static int curve_dissolve_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
for (int axis = 0; axis < dims; axis++) {
|
||||
BKE_curve_forward_diff_bezier(
|
||||
bezt_a->vec[1][axis], bezt_a->vec[2][axis],
|
||||
bezt_b->vec[0][axis], bezt_b->vec[1][axis],
|
||||
points_stride + axis, points_stride_len, dims * sizeof(float));
|
||||
bezt_a->vec[1][axis], bezt_a->vec[2][axis],
|
||||
bezt_b->vec[0][axis], bezt_b->vec[1][axis],
|
||||
points_stride + axis, points_stride_len, dims * sizeof(float));
|
||||
}
|
||||
|
||||
points_stride += dims * points_stride_len;
|
||||
|
@ -485,7 +485,7 @@ static void curve_draw_stroke_3d(const struct bContext *UNUSED(C), ARegion *UNUS
|
||||
selem->location_local[2] - location_prev[2]);
|
||||
location_prev = selem->location_local;
|
||||
const float radius = stroke_elem_radius(cdd, selem);
|
||||
gluSphere(qobj, radius , 12, 8);
|
||||
gluSphere(qobj, radius, 12, 8);
|
||||
|
||||
location_prev = selem->location_local;
|
||||
}
|
||||
|
@ -3393,7 +3393,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
|
||||
#ifdef WITH_INPUT_IME
|
||||
&&
|
||||
!is_ime_composing &&
|
||||
(!WM_event_is_ime_switch(event) || !BLT_lang_is_ime_supported())
|
||||
(!WM_event_is_ime_switch(event) || !BLT_lang_is_ime_supported())
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
@ -5866,7 +5866,7 @@ static int add_simple_uvs_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
ED_mesh_uv_texture_ensure(me, NULL);
|
||||
|
||||
BM_mesh_bm_from_me(
|
||||
bm, me,(&(struct BMeshFromMeshParams){
|
||||
bm, me, (&(struct BMeshFromMeshParams){
|
||||
.calc_face_normal = true,
|
||||
}));
|
||||
/* select all uv loops first - pack parameters needs this to make sure charts are registered */
|
||||
|
@ -423,8 +423,8 @@ static int ui_compatible_sockets(int typeA, int typeB)
|
||||
|
||||
static int ui_node_item_name_compare(const void *a, const void *b)
|
||||
{
|
||||
const bNodeType* type_a = *(const bNodeType**)a;
|
||||
const bNodeType* type_b = *(const bNodeType**)b;
|
||||
const bNodeType *type_a = *(const bNodeType **)a;
|
||||
const bNodeType *type_b = *(const bNodeType **)b;
|
||||
return BLI_natstrcmp(type_a->ui_name, type_b->ui_name);
|
||||
}
|
||||
|
||||
@ -462,7 +462,7 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
|
||||
}
|
||||
NODE_TYPES_END
|
||||
|
||||
qsort(sorted_ntypes, BLI_array_count(sorted_ntypes), sizeof(bNodeType*), ui_node_item_name_compare);
|
||||
qsort(sorted_ntypes, BLI_array_count(sorted_ntypes), sizeof(bNodeType *), ui_node_item_name_compare);
|
||||
|
||||
/* generate UI */
|
||||
for (int j = 0; j < BLI_array_count(sorted_ntypes); j++) {
|
||||
|
@ -958,8 +958,9 @@ static bool snapEditMesh(
|
||||
hit.dist = local_depth;
|
||||
|
||||
if (treedata->tree &&
|
||||
BLI_bvhtree_ray_cast(treedata->tree, ray_start_local, ray_normal_local, 0.0f,
|
||||
&hit, treedata->raycast_callback, treedata) != -1)
|
||||
BLI_bvhtree_ray_cast(
|
||||
treedata->tree, ray_start_local, ray_normal_local, 0.0f,
|
||||
&hit, treedata->raycast_callback, treedata) != -1)
|
||||
{
|
||||
hit.dist += len_diff;
|
||||
hit.dist /= local_scale;
|
||||
@ -989,9 +990,9 @@ static bool snapEditMesh(
|
||||
nearest.index = -1;
|
||||
nearest.dist_sq = local_depth * local_depth;
|
||||
if (treedata->tree &&
|
||||
BLI_bvhtree_find_nearest_to_ray(
|
||||
treedata->tree, ray_start_local, ray_normal_local,
|
||||
&nearest, NULL, NULL) != -1)
|
||||
BLI_bvhtree_find_nearest_to_ray(
|
||||
treedata->tree, ray_start_local, ray_normal_local,
|
||||
&nearest, NULL, NULL) != -1)
|
||||
{
|
||||
const BMVert *v = BM_vert_at_index(em->bm, nearest.index);
|
||||
retval = snapVertex(
|
||||
@ -1009,8 +1010,8 @@ static bool snapEditMesh(
|
||||
BMEdge *eed = BM_edge_at_index(em->bm, i);
|
||||
|
||||
if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) &&
|
||||
!BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) &&
|
||||
!BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))
|
||||
!BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) &&
|
||||
!BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))
|
||||
{
|
||||
short v1no[3], v2no[3];
|
||||
normal_float_to_short_v3(v1no, eed->v1->no);
|
||||
|
@ -390,7 +390,7 @@ static void processor_apply_scanline_func(TaskPool * __restrict pool,
|
||||
void *taskdata,
|
||||
int UNUSED(threadid))
|
||||
{
|
||||
ScanlineGlobalData *data = (ScanlineGlobalData*)BLI_task_pool_userdata(pool);
|
||||
ScanlineGlobalData *data = BLI_task_pool_userdata(pool);
|
||||
int start_scanline = GET_INT_FROM_POINTER(taskdata);
|
||||
int num_scanlines = min_ii(data->scanlines_per_task,
|
||||
data->total_scanlines - start_scanline);
|
||||
|
@ -82,7 +82,7 @@ static int node_shader_gpu_tex_environment(GPUMaterial *mat, bNode *node, bNodeE
|
||||
|
||||
ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, NULL);
|
||||
if (ibuf && (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) == 0 &&
|
||||
GPU_material_do_color_management(mat))
|
||||
GPU_material_do_color_management(mat))
|
||||
{
|
||||
GPU_link(mat, "srgb_to_linearrgb", out[0].link, &out[0].link);
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ static int gpu_shader_texture(GPUMaterial *mat, bNode *node, bNodeExecData *UNUS
|
||||
|
||||
ImBuf *ibuf = BKE_image_acquire_ibuf(tex->ima, &tex->iuser, NULL);
|
||||
if (ibuf && (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) == 0 &&
|
||||
GPU_material_do_color_management(mat))
|
||||
GPU_material_do_color_management(mat))
|
||||
{
|
||||
GPU_link(mat, "srgb_to_linearrgb", out[1].link, &out[1].link);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user