diff --git a/intern/cycles/device/hip/device_impl.cpp b/intern/cycles/device/hip/device_impl.cpp index f96328fb18f..3679275fdd8 100644 --- a/intern/cycles/device/hip/device_impl.cpp +++ b/intern/cycles/device/hip/device_impl.cpp @@ -252,14 +252,14 @@ string HIPDevice::compile_kernel(const uint kernel_features, const char *name, c const char *const kernel_ext = "genco"; std::string options; # ifdef _WIN32 - options.append("Wno-parentheses-equality -Wno-unused-value --hipcc-func-supp -ffast-math"); + options.append("Wno-parentheses-equality -Wno-unused-value -ffast-math"); # else - options.append("Wno-parentheses-equality -Wno-unused-value --hipcc-func-supp -O3 -ffast-math"); + options.append("Wno-parentheses-equality -Wno-unused-value -O3 -ffast-math"); # endif # ifndef NDEBUG options.append(" -save-temps"); # endif - options.append(" --amdgpu-target=").append(arch.c_str()); + options.append(" --offload-arch=").append(arch.c_str()); const string include_path = source_path; const string fatbin_file = string_printf( diff --git a/source/blender/editors/space_sequencer/sequencer_strips_batch.cc b/source/blender/editors/space_sequencer/sequencer_strips_batch.cc index bf1ff23fb40..b483a5b52a5 100644 --- a/source/blender/editors/space_sequencer/sequencer_strips_batch.cc +++ b/source/blender/editors/space_sequencer/sequencer_strips_batch.cc @@ -49,7 +49,7 @@ StripsDrawBatch::StripsDrawBatch(float pixelx, float pixely) : strips_(GPU_SEQ_S context_.pixelsize = U.pixelsize; uchar col[4]; - UI_GetThemeColor3ubv(TH_BACK, col); + UI_GetThemeColorShade3ubv(TH_BACK, -40, col); col[3] = 255; context_.col_back = color_pack(col); diff --git a/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc b/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc index 83db2ec490d..42389a5e3c0 100644 --- a/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc +++ b/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc @@ -1247,15 +1247,10 @@ static void visible_strips_ordered_get(TimelineDrawContext *timeline_ctx, Vector strips = sequencer_visible_strips_get(timeline_ctx->C); r_unselected.clear(); r_selected.clear(); - const bool act_seq_is_selected = act_seq != nullptr && (act_seq->flag & SELECT) != 0; - - if (act_seq_is_selected) { - strips.remove_if([&](Sequence *seq) { return seq == act_seq; }); - } for (Sequence *seq : strips) { - /* Selected active will be added last. */ - if (act_seq_is_selected && seq == act_seq) { + /* Active will be added last. */ + if (seq == act_seq) { continue; } @@ -1267,10 +1262,15 @@ static void visible_strips_ordered_get(TimelineDrawContext *timeline_ctx, r_selected.append(strip_ctx); } } - /* Add selected active, if any. */ - if (act_seq_is_selected) { + /* Add active, if any. */ + if (act_seq) { StripDrawContext strip_ctx = strip_draw_context_get(timeline_ctx, act_seq); - r_selected.append(strip_ctx); + if ((act_seq->flag & SELECT) == 0) { + r_unselected.append(strip_ctx); + } + else { + r_selected.append(strip_ctx); + } } } diff --git a/source/blender/gpu/shaders/gpu_shader_sequencer_strips_frag.glsl b/source/blender/gpu/shaders/gpu_shader_sequencer_strips_frag.glsl index 6b6e8d64947..5440d3f5a37 100644 --- a/source/blender/gpu/shaders/gpu_shader_sequencer_strips_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_sequencer_strips_frag.glsl @@ -46,13 +46,11 @@ void main() /* Transform strip rectangle into pixel coordinates, so that * rounded corners have proper aspect ratio and can be expressed in pixels. - * Make sure strip right side does not include the last pixel. * Also snap to pixel grid coordinates, so that outline/border is clear * non-fractional pixel sizes. */ vec2 view_to_pixel = vec2(context_data.inv_pixelx, context_data.inv_pixely); vec2 pos1 = round(vec2(strip.left_handle, strip.bottom) * view_to_pixel); vec2 pos2 = round(vec2(strip.right_handle, strip.top) * view_to_pixel); - pos2.x -= 1.0; /* Make sure strip is at least 1px wide. */ pos2.x = max(pos2.x, pos1.x + 1.0); vec2 size = (pos2 - pos1) * 0.5; @@ -177,13 +175,6 @@ void main() } } - /* Inset 1px line with background color. */ - if (border && selected) { - /* Inset line should be inside regular border or inside the handles. */ - float d = max(sdf_inner - 2.0 * context_data.pixelsize, sdf); - col = add_outline(d, 2.0, 3.0, col, unpackUnorm4x8(context_data.col_back)); - } - /* Outside of strip rounded rectangle? */ if (sdf > 0.0) { col = vec4(0.0); @@ -191,7 +182,18 @@ void main() /* Outline / border. */ if (border) { - col = add_outline(sdf, 0.0, outline_width, col, col_outline); + + if (selected) { + /* Selection highlight + darker inset line. */ + col = add_outline(sdf, 1.0, 3.0, col, col_outline); + /* Inset line should be inside regular border or inside the handles. */ + float d = max(sdf_inner - 3.0 * context_data.pixelsize, sdf); + col = add_outline(d, 3.0, 4.0, col, vec4(0, 0, 0, 0.33)); + } + + /* Outer 1px outline for all strips. */ + col = add_outline( + sdf, 0.0, 1.0, col, selected ? unpackUnorm4x8(context_data.col_back) : col_outline); } fragColor = col;