diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-10-07 22:28:55 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-10-07 22:28:55 +0300 |
commit | 278a2137f9a5989f8e9ebb30bbfb761608f0de14 (patch) | |
tree | 90feec9111c98761babb74be29f8db99769837f9 /source/blender/gpu | |
parent | 92964a29b5fa6c4bbc42551290e00d5065c146d4 (diff) | |
parent | f63179cc9fef42cc4f8b126d92b08f8b0d07dd87 (diff) |
Merge remote-tracking branch 'origin' into temp-pbvh-split
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_shader.h | 1 | ||||
-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/intern/gpu_shader_interface.hh | 2 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_backend.cc | 2 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_shader.cc | 2 |
6 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h index 2e70bd77205..3f35db42eb9 100644 --- a/source/blender/gpu/GPU_shader.h +++ b/source/blender/gpu/GPU_shader.h @@ -145,6 +145,7 @@ typedef enum { GPU_UNIFORM_BLOCK_DRW_VIEW, GPU_UNIFORM_BLOCK_DRW_MODEL, GPU_UNIFORM_BLOCK_DRW_INFOS, + GPU_UNIFORM_BLOCK_DRW_CLIPPING, GPU_NUM_UNIFORM_BLOCKS, /* Special value, denotes number of builtin uniforms block. */ } GPUUniformBlockBuiltin; 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/intern/gpu_shader_interface.hh b/source/blender/gpu/intern/gpu_shader_interface.hh index 41e06569bdc..d223daa4a61 100644 --- a/source/blender/gpu/intern/gpu_shader_interface.hh +++ b/source/blender/gpu/intern/gpu_shader_interface.hh @@ -228,6 +228,8 @@ inline const char *ShaderInterface::builtin_uniform_block_name(GPUUniformBlockBu return "drw_matrices"; case GPU_UNIFORM_BLOCK_DRW_INFOS: return "drw_infos"; + case GPU_UNIFORM_BLOCK_DRW_CLIPPING: + return "drw_clipping"; default: return nullptr; } 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) { |