diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bevel.c | 9 | ||||
-rw-r--r-- | source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 8 |
3 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index d1ddceb00b0..720eb34bda7 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -4167,6 +4167,10 @@ static int tri_corner_test(BevelParams *bp, BevVert *bv) if (bv->vmesh->count != 3) { return 0; } + + /* Only use the tri-corner special case if the offset is the same for every edge. */ + float offset = bv->edges[0].offset_l; + totang = 0.0f; for (i = 0; i < bv->edgecount; i++) { e = &bv->edges[i]; @@ -4178,6 +4182,11 @@ static int tri_corner_test(BevelParams *bp, BevVert *bv) else if (absang >= 3.0f * (float)M_PI_4) { return -1; } + + if (e->is_bev && !compare_ff(e->offset_l, offset, BEVEL_EPSILON)) { + return -1; + } + totang += ang; } if (in_plane_e != bv->edgecount - 3) { diff --git a/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl index e6bc4c7bbc6..a4d81393dbc 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl @@ -26,6 +26,10 @@ void curvature_compute(vec2 uv, if ((object_up != object_down) || (object_right != object_left)) { return; } + /* Avoid shading background pixels. */ + if ((object_up == object_right) && (object_right == 0u)) { + return; + } float normal_up = workbench_normal_decode(texture(normalBuffer, uv + offset.zy)).g; float normal_down = workbench_normal_decode(texture(normalBuffer, uv - offset.zy)).g; diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index e3632b82778..ff745787630 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -304,6 +304,14 @@ void gpu_extensions_init(void) GG.context_local_shaders_workaround = GLEW_ARB_get_program_binary; } + /* Special fix for theses specific GPUs. Without thoses workaround, blender crashes on strartup. + * (see T72098) */ + if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_WIN, GPU_DRIVER_OFFICIAL) && + (strstr(renderer, "HD Graphics 620") || strstr(renderer, "HD Graphics 630"))) { + GG.mip_render_workaround = true; + GG.context_local_shaders_workaround = GLEW_ARB_get_program_binary; + } + /* df/dy calculation factors, those are dependent on driver */ GG.dfdyfactors[0] = 1.0; GG.dfdyfactors[1] = 1.0; |