diff options
author | Campbell Barton <campbell@blender.org> | 2022-10-07 14:52:53 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-10-07 14:55:03 +0300 |
commit | 331f8500569df9b3b2aa776c5bcaad7b99c57295 (patch) | |
tree | 93547846177ff3415f9564ca54cb8f13433755cf /source/blender/gpu | |
parent | 11abeae99fdbfc8f047c4a3c1d2b9b8c47883516 (diff) |
Cleanup: redundant parenthesis
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_framebuffer.cc | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_immediate_util.c | 8 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_backend.cc | 2 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_shader.cc | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc index 5fe876fc658..6528f39d4ec 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.cc +++ b/source/blender/gpu/intern/gpu_framebuffer.cc @@ -179,7 +179,7 @@ void FrameBuffer::recursive_downsample(int max_lvl, /* Some Intel HDXXX have issue with rendering to a mipmap that is below * the texture GL_TEXTURE_MAX_LEVEL. So even if it not correct, in this case * we allow GL_TEXTURE_MAX_LEVEL to be one level lower. In practice it does work! */ - int mip_max = (GPU_mip_render_workaround()) ? mip_lvl : (mip_lvl - 1); + int mip_max = GPU_mip_render_workaround() ? mip_lvl : (mip_lvl - 1); /* Restrict fetches only to previous level. */ tex->mip_range_set(mip_lvl - 1, mip_max); /* Bind next level. */ diff --git a/source/blender/gpu/intern/gpu_immediate_util.c b/source/blender/gpu/intern/gpu_immediate_util.c index 743bc058b45..39b5a6a93c0 100644 --- a/source/blender/gpu/intern/gpu_immediate_util.c +++ b/source/blender/gpu/intern/gpu_immediate_util.c @@ -195,7 +195,7 @@ static void imm_draw_circle_partial(GPUPrimType prim_type, float sweep) { /* shift & reverse angle, increase 'nsegments' to match gluPartialDisk */ - const float angle_start = -(DEG2RADF(start)) + (float)M_PI_2; + const float angle_start = -DEG2RADF(start) + (float)M_PI_2; const float angle_end = -(DEG2RADF(sweep) - angle_start); nsegments += 1; immBegin(prim_type, nsegments); @@ -219,7 +219,7 @@ static void imm_draw_circle_partial_3d(GPUPrimType prim_type, float sweep) { /* shift & reverse angle, increase 'nsegments' to match gluPartialDisk */ - const float angle_start = -(DEG2RADF(start)) + (float)(M_PI / 2); + const float angle_start = -DEG2RADF(start) + (float)(M_PI / 2); const float angle_end = -(DEG2RADF(sweep) - angle_start); nsegments += 1; immBegin(prim_type, nsegments); @@ -259,7 +259,7 @@ static void imm_draw_disk_partial(GPUPrimType prim_type, CLAMP(sweep, -max_angle, max_angle); /* shift & reverse angle, increase 'nsegments' to match gluPartialDisk */ - const float angle_start = -(DEG2RADF(start)) + (float)M_PI_2; + const float angle_start = -DEG2RADF(start) + (float)M_PI_2; const float angle_end = -(DEG2RADF(sweep) - angle_start); nsegments += 1; immBegin(prim_type, nsegments * 2); @@ -289,7 +289,7 @@ static void imm_draw_disk_partial_3d(GPUPrimType prim_type, CLAMP(sweep, -max_angle, max_angle); /* shift & reverse angle, increase 'nsegments' to match gluPartialDisk */ - const float angle_start = -(DEG2RADF(start)) + (float)M_PI_2; + const float angle_start = -DEG2RADF(start) + (float)M_PI_2; const float angle_end = -(DEG2RADF(sweep) - angle_start); nsegments += 1; immBegin(prim_type, nsegments * 2); diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc index 49a2321af98..ffbba7dcd8c 100644 --- a/source/blender/gpu/opengl/gl_backend.cc +++ b/source/blender/gpu/opengl/gl_backend.cc @@ -351,7 +351,7 @@ static void detect_workarounds() } /* Somehow fixes armature display issues (see T69743). */ if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_WIN, GPU_DRIVER_ANY) && - (strstr(version, "Build 20.19.15.4285"))) { + strstr(version, "Build 20.19.15.4285")) { GCaps.use_main_context_workaround = true; } /* See T70187: merging vertices fail. This has been tested from `18.2.2` till `19.3.0~dev` diff --git a/source/blender/gpu/opengl/gl_shader.cc b/source/blender/gpu/opengl/gl_shader.cc index a1570735723..dafcf4dbf33 100644 --- a/source/blender/gpu/opengl/gl_shader.cc +++ b/source/blender/gpu/opengl/gl_shader.cc @@ -568,7 +568,7 @@ std::string GLShader::fragment_interface_declare(const ShaderCreateInfo &info) c std::string pre_main; ss << "\n/* Interfaces. */\n"; - const Vector<StageInterfaceInfo *> &in_interfaces = (info.geometry_source_.is_empty()) ? + const Vector<StageInterfaceInfo *> &in_interfaces = info.geometry_source_.is_empty() ? info.vertex_out_interfaces_ : info.geometry_out_interfaces_; for (const StageInterfaceInfo *iface : in_interfaces) { |