diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-16 17:48:21 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-18 22:30:10 +0300 |
commit | 298329554a5a0ae40bc4a64ca9c1490d22edc947 (patch) | |
tree | c472a8a8f711e4de331b6cedafb9adc74014becd /source/blender/editors | |
parent | bf1b622dd962416fef94ccb2f47878eced31e20d (diff) |
Cleanup: GPUState: remove double GPU_blend calls
Diffstat (limited to 'source/blender/editors')
29 files changed, 0 insertions, 58 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 656ff844948..0a464e6709a 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -4387,7 +4387,6 @@ void ANIM_channel_draw( /* set blending again, as may not be set in previous step */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); /* step 1) draw backdrop ........................................... */ if (acf->draw_backdrop) { diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 0bebc25863b..73df0518f06 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -99,7 +99,6 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width) /* only draw this if preview range is set */ if (PRVRANGEON) { GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); @@ -133,7 +132,6 @@ void ANIM_draw_framerange(Scene *scene, View2D *v2d) { /* draw darkened area outside of active timeline frame range */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 5f755b9f4d9..3bfa3b9d5be 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -500,7 +500,6 @@ static void draw_marker( marker_color_get(marker, text_color, line_color); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); draw_marker_line(line_color, xpos, UI_DPI_FAC * 20, region_height); @@ -529,7 +528,6 @@ static void draw_markers_background(rctf *rect) immUniformColor4ubv(shade); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); immRectf(pos, rect->xmin, rect->ymin, rect->xmax, rect->ymax); diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c index 1690c9e3bba..0615e21c4a5 100644 --- a/source/blender/editors/animation/time_scrub_ui.c +++ b/source/blender/editors/animation/time_scrub_ui.c @@ -67,7 +67,6 @@ static void draw_background(const rcti *rect) immUniformThemeColor(TH_TIME_SCRUB_BACKGROUND); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); immRectf(pos, rect->xmin, rect->ymin, rect->xmax, rect->ymax); diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c index 78f4df8f71a..654d1b87918 100644 --- a/source/blender/editors/gpencil/annotate_draw.c +++ b/source/blender/editors/gpencil/annotate_draw.c @@ -735,7 +735,6 @@ static void annotation_draw_data( /* turn on alpha-blending */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); /* Do not write to depth (avoid self-occlusion). */ bool prev_depth_mask = GPU_depth_mask_get(); diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 56f554e5b7c..8237e6cfd62 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -1701,7 +1701,6 @@ static void annotation_draw_eraser(bContext *UNUSED(C), int x, int y, void *p_pt GPU_line_smooth(true); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); immUniformColor4ub(255, 100, 100, 20); imm_draw_circle_fill_2d(shdr_pos, x, y, p->radius, 40); diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 251d1b22846..3f62c3ec8c0 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -2269,7 +2269,6 @@ static void gpencil_draw_eraser(bContext *UNUSED(C), int x, int y, void *p_ptr) GPU_line_smooth(true); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); immUniformColor4ub(255, 100, 100, 20); imm_draw_circle_fill_2d(shdr_pos, x, y, p->radius, 40); diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 46de164f381..8b77709bacb 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -1761,7 +1761,6 @@ void ED_gpencil_brush_draw_eraser(Brush *brush, int x, int y) GPU_line_smooth(true); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); immUniformColor4ub(255, 100, 100, 20); imm_draw_circle_fill_2d(shdr_pos, x, y, radius, 40); diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 8ebc8e60993..ba878be3dc7 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -752,7 +752,6 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(region), GPU_scissor(rect->xmin, rect->ymin, w, h); # endif - GPU_blend(GPU_BLEND_ALPHA); /* Combine with premultiplied alpha. */ GPU_blend(GPU_BLEND_ALPHA_PREMULT); @@ -781,8 +780,6 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(region), col); GPU_blend(GPU_BLEND_NONE); - /* Reset default. */ - GPU_blend(GPU_BLEND_ALPHA); # if 0 // restore scissortest @@ -925,7 +922,6 @@ void ui_draw_but_HISTOGRAM(ARegion *UNUSED(region), float h = BLI_rctf_size_y(&rect) * hist->ymax; GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); float color[4]; UI_GetThemeColor4fv(TH_PREVIEW_BACK, color); @@ -1068,7 +1064,6 @@ void ui_draw_but_WAVEFORM(ARegion *UNUSED(region), BLF_batch_draw_flush(); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); float color[4]; UI_GetThemeColor4fv(TH_PREVIEW_BACK, color); @@ -1096,7 +1091,6 @@ void ui_draw_but_WAVEFORM(ARegion *UNUSED(region), BLF_batch_draw_flush(); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); @@ -1399,7 +1393,6 @@ void ui_draw_but_VECTORSCOPE(ARegion *UNUSED(region), float alpha = scopes->vecscope_alpha * scopes->vecscope_alpha * scopes->vecscope_alpha; GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); float color[4]; UI_GetThemeColor4fv(TH_PREVIEW_BACK, color); @@ -1956,7 +1949,6 @@ void ui_draw_but_CURVE(ARegion *region, uiBut *but, const uiWidgetColors *wcol, if (but->a1 == UI_GRAD_H) { /* grid, hsv uses different grid */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); ARRAY_SET_ITEMS(color_backdrop, 0, 0, 0, 48.0 / 255.0); immUniformColor4fv(color_backdrop); ui_draw_but_curve_grid(pos, rect, zoomx, zoomy, offsx, offsy, 0.1666666f); @@ -2460,7 +2452,6 @@ void ui_draw_but_TRACKPREVIEW(ARegion *UNUSED(region), int height = BLI_rctf_size_y(&rect); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); /* need scissor test, preview image can draw outside of boundary */ int scissor[4]; diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index e946aec2176..5410eed9915 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2785,7 +2785,6 @@ static void widget_menu_back(uiWidgetColors *wcol, rcti *rect, int flag, int dir } GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); widget_softshadow(rect, roundboxalign, wcol->roundness * U.widget_unit); round_box_edges(&wtb, roundboxalign, rect, wcol->roundness * U.widget_unit); @@ -5164,7 +5163,6 @@ static void ui_draw_widget_back_color(uiWidgetTypeEnum type, if (use_shadow) { GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); widget_softshadow(rect, UI_CNR_ALL, 0.25f * U.widget_unit); GPU_blend(GPU_BLEND_NONE); } diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index b5db7b3d37e..dbaa335a9bf 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -595,7 +595,6 @@ static void draw_mask_layers(const bContext *C, const int height) { GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPU_program_point_size(true); MaskLayer *mask_layer; @@ -739,7 +738,6 @@ void ED_mask_draw_region( if (overlay_mode != MASK_OVERLAY_ALPHACHANNEL) { /* More blending types could be supported in the future. */ - GPU_blend(GPU_BLEND_ALPHA); GPU_blend(GPU_BLEND_MULTIPLY); } diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 1c1b69ca719..94cd7650abe 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1129,7 +1129,6 @@ static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), v float fcol[4]; GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPUVertBuf *vert = GPU_vertbuf_create_with_format(format); GPU_vertbuf_data_alloc(vert, kcd->totlinehit); diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 784a933d494..5004b0132c2 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -94,7 +94,6 @@ static void region_draw_emboss(const ARegion *region, const rcti *scirct, int si /* set transp line */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); float color[4] = {0.0f, 0.0f, 0.0f, 0.25f}; UI_GetThemeColor3fv(TH_EDITOR_OUTLINE, color); @@ -311,7 +310,6 @@ static void region_draw_azones(ScrArea *area, ARegion *region) GPU_line_width(1.0f); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPU_matrix_push(); GPU_matrix_translate_2f(-region->winrct.xmin, -region->winrct.ymin); @@ -3270,7 +3268,6 @@ void ED_region_info_draw_multiline(ARegion *region, GPU_scissor(rect.xmin, rect.ymin, BLI_rcti_size_x(&rect) + 1, BLI_rcti_size_y(&rect) + 1); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); diff --git a/source/blender/editors/screen/screen_draw.c b/source/blender/editors/screen/screen_draw.c index a9e38244f62..a5d3c4842e6 100644 --- a/source/blender/editors/screen/screen_draw.c +++ b/source/blender/editors/screen/screen_draw.c @@ -411,7 +411,6 @@ void ED_screen_draw_edges(wmWindow *win) edge_thickness = corner_scale * 0.21f; GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPUBatch *batch = batch_screen_edges_get(&verts_per_corner); GPU_batch_program_set_builtin(batch, GPU_SHADER_2D_AREA_EDGES); @@ -484,7 +483,6 @@ void ED_screen_draw_split_preview(ScrArea *area, const int dir, const float fac) /* splitpoint */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); immUniformColor4ub(255, 255, 255, 100); diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index bb4139cc510..4115b5e51d6 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -634,7 +634,6 @@ static bool paint_draw_tex_overlay(UnifiedPaintSettings *ups, uint texCoord = GPU_vertformat_attr_add(format, "texCoord", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); /* Premultiplied alpha blending. */ - GPU_blend(GPU_BLEND_ALPHA); GPU_blend(GPU_BLEND_ALPHA_PREMULT); immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_COLOR); @@ -727,7 +726,6 @@ static bool paint_draw_cursor_overlay( uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); uint texCoord = GPU_vertformat_attr_add(format, "texCoord", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); - GPU_blend(GPU_BLEND_ALPHA); GPU_blend(GPU_BLEND_ALPHA_PREMULT); immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_COLOR); diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 38c668acd37..17539b2c423 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -154,7 +154,6 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *region, MovieClip *clip MovieTrackingReconstruction *reconstruction = BKE_tracking_get_active_reconstruction(tracking); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); /* cache background */ ED_region_cache_draw_background(region); @@ -330,7 +329,6 @@ static void draw_movieclip_buffer(const bContext *C, /* checkerboard for case alpha */ if (ibuf->planes == 32) { GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); imm_draw_box_checker_2d(x, y, x + zoomx * ibuf->x, y + zoomy * ibuf->y); } @@ -1211,7 +1209,6 @@ static void draw_plane_marker_image(Scene *scene, if (plane_track->image_opacity != 1.0f || ibuf->planes == 32) { transparent = true; GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); } GPUTexture *texture = GPU_texture_create_nD(ibuf->x, diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c index 0de1497a1af..bcbf843f51c 100644 --- a/source/blender/editors/space_clip/clip_utils.c +++ b/source/blender/editors/space_clip/clip_utils.c @@ -416,7 +416,6 @@ void clip_draw_sfra_efra(View2D *v2d, Scene *scene) /* currently clip editor supposes that editing clip length is equal to scene frame range */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 0be3d8665cf..ac860b72e84 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -1263,7 +1263,6 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *region) /* set blending again, as may not be set in previous step */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); for (ale = anim_data.first; ale; ale = ale->next, ymax -= ACHANNEL_STEP(ac), channel_index++) { float ymin = ymax - ACHANNEL_HEIGHT(ac); diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 6b79151da3f..d58f5ede7d7 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -176,7 +176,6 @@ void ED_image_draw_info(Scene *scene, float col[4], finalcol[4]; GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); uint pos = GPU_vertformat_attr_add( immVertexFormat(), "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT); @@ -540,7 +539,6 @@ static void draw_udim_label(ARegion *region, float fx, float fy, const char *lab UI_view2d_view_to_region(®ion->v2d, fx, fy, &x, &y); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); int textwidth = BLF_width(blf_mono_font, label, strlen(label)) + 10; float stepx = BLI_rcti_size_x(®ion->v2d.mask) / BLI_rctf_size_x(®ion->v2d.cur); @@ -601,7 +599,6 @@ static void draw_image_buffer(const bContext *C, imm_draw_box_checker_2d(x, y, x + ibuf->x * zoomx, y + ibuf->y * zoomy); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); } /* If RGBA display with color management */ @@ -769,7 +766,6 @@ static void draw_image_paint_helpers( } GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR); immDrawPixelsTex( @@ -1055,7 +1051,6 @@ void draw_image_cache(const bContext *C, ARegion *region) const int region_bottom = rect_visible->ymin; GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); /* Draw cache background. */ ED_region_cache_draw_background(region); diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c index 698adf7ee8e..4d9a4fb2706 100644 --- a/source/blender/editors/space_info/textview.c +++ b/source/blender/editors/space_info/textview.c @@ -85,7 +85,6 @@ static void textview_draw_sel(const char *str, const int end = BLI_str_utf8_offset_to_column(str, min_ii(sel[1], str_len_draw)); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT); diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 6d4684e7a17..b0d5360e29b 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -435,7 +435,6 @@ static void nla_draw_strip(SpaceNla *snla, if ((strip->extendmode != NLASTRIP_EXTEND_NOTHING) && (non_solo == 0)) { /* enable transparency... */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); switch (strip->extendmode) { /* since this does both sides, @@ -746,7 +745,6 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *region) * and a second darker rect within which we draw keyframe indicator dots if there's data */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); /* get colors for drawing */ float color[4]; @@ -853,7 +851,6 @@ void draw_nla_channel_list(const bContext *C, bAnimContext *ac, ARegion *region) /* set blending again, as may not be set in previous step */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); /* loop through channels, and set up drawing depending on their type */ for (ale = anim_data.first; ale; diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index d889bcb15d6..fcc02f49d07 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3689,7 +3689,6 @@ void draw_nodespace_back_pix(const bContext *C, } else if (snode->flag & SNODE_USE_ALPHA) { GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); ED_draw_imbuf_ctx(C, ibuf, x, y, false, snode->zoom, snode->zoom); diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 2bc3550413d..b4556017c03 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -383,7 +383,6 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1, } GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); for (seq = seqbase->first; seq; seq = seq->next) { chan_min = min_ii(chan_min, seq->machine); @@ -753,7 +752,6 @@ static void draw_sequence_extensions(Scene *scene, Sequence *seq, uint pos, floa y2 = seq->machine + SEQ_STRIP_OFSTOP; GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); color3ubv_from_seq(scene, seq, col); if (seq->flag & SELECT) { @@ -842,7 +840,6 @@ static void draw_seq_background(Scene *scene, if (seq->flag & SEQ_MUTE) { GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); col[3] = MUTE_ALPHA; } @@ -1592,7 +1589,6 @@ static void sequencer_draw_display_buffer(const bContext *C, if (sseq->mainb == SEQ_DRAW_IMG_IMBUF && sseq->flag & SEQ_USE_ALPHA) { GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); } /* Format needs to be created prior to any immBindShader call. diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index f40cc98d4f7..f1b1d6760f3 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1354,7 +1354,6 @@ static void draw_text_decoration(SpaceText *st, ARegion *region) highlight_color[3] = 0.1f; immUniformColor4fv(highlight_color); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); immRecti(pos, 0, y1, region->winx, y2); GPU_blend(GPU_BLEND_NONE); } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 3c5b5abdefc..6969ecf197e 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -132,7 +132,6 @@ void ED_draw_object_facemap(Depsgraph *depsgraph, const int *facemap_data = CustomData_get_layer(&me->pdata, CD_FACEMAP); if (facemap_data) { GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); const MVert *mvert = me->mvert; const MPoly *mpoly = me->mpoly; diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 6973e55e5ea..33b365b45aa 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -589,7 +589,6 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *region, if (ca->passepartalpha != 1.0f) { GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); alpha = ca->passepartalpha; } @@ -1027,7 +1026,6 @@ static void draw_view_axis(RegionView3D *rv3d, const rcti *rect) GPU_line_width(2.0f); GPU_line_smooth(true); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); @@ -1071,7 +1069,6 @@ static void draw_rotation_guide(const RegionView3D *rv3d) negate_v3_v3(o, rv3d->ofs); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPU_depth_mask(false); /* don't overwrite zbuf */ GPUVertFormat *format = immVertexFormat(); diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index b97145c5f50..2fa291e7ae4 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1545,7 +1545,6 @@ static void drawAutoKeyWarning(TransInfo *UNUSED(t), ARegion *region) /* autokey recording icon... */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); xco -= U.widget_unit; yco -= (int)printable_size[1] / 2; diff --git a/source/blender/editors/transform/transform_mode_edge_slide.c b/source/blender/editors/transform/transform_mode_edge_slide.c index d9fd8880c3f..45debe964f4 100644 --- a/source/blender/editors/transform/transform_mode_edge_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_slide.c @@ -1150,7 +1150,6 @@ void drawEdgeSlide(TransInfo *t) GPU_depth_test(false); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPU_matrix_push(); GPU_matrix_mul(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->obmat); diff --git a/source/blender/editors/transform/transform_mode_vert_slide.c b/source/blender/editors/transform/transform_mode_vert_slide.c index 1de7d219cae..11d0b375e6f 100644 --- a/source/blender/editors/transform/transform_mode_vert_slide.c +++ b/source/blender/editors/transform/transform_mode_vert_slide.c @@ -393,7 +393,6 @@ void drawVertSlide(TransInfo *t) GPU_depth_test(false); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPU_matrix_push(); GPU_matrix_mul(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->obmat); |