diff options
Diffstat (limited to 'video/out/gpu/osd.c')
-rw-r--r-- | video/out/gpu/osd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/video/out/gpu/osd.c b/video/out/gpu/osd.c index 63a04481d2..7892904c74 100644 --- a/video/out/gpu/osd.c +++ b/video/out/gpu/osd.c @@ -31,7 +31,7 @@ static const int blend_factors[SUBBITMAP_COUNT][4] = { [SUBBITMAP_LIBASS] = {RA_BLEND_SRC_ALPHA, RA_BLEND_ONE_MINUS_SRC_ALPHA, RA_BLEND_ONE, RA_BLEND_ONE_MINUS_SRC_ALPHA}, - [SUBBITMAP_RGBA] = {RA_BLEND_ONE, RA_BLEND_ONE_MINUS_SRC_ALPHA, + [SUBBITMAP_BGRA] = {RA_BLEND_ONE, RA_BLEND_ONE_MINUS_SRC_ALPHA, RA_BLEND_ONE, RA_BLEND_ONE_MINUS_SRC_ALPHA}, }; @@ -86,7 +86,7 @@ struct mpgl_osd *mpgl_osd_init(struct ra *ra, struct mp_log *log, }; ctx->fmt_table[SUBBITMAP_LIBASS] = ra_find_unorm_format(ra, 1, 1); - ctx->fmt_table[SUBBITMAP_RGBA] = ra_find_unorm_format(ra, 1, 4); + ctx->fmt_table[SUBBITMAP_BGRA] = ra_find_unorm_format(ra, 1, 4); for (int n = 0; n < MAX_OSD_PARTS; n++) ctx->parts[n] = talloc_zero(ctx, struct mpgl_osd_part); @@ -215,7 +215,7 @@ bool mpgl_osd_draw_prepare(struct mpgl_osd *ctx, int index, gl_sc_uniform_texture(sc, "osdtex", part->texture); switch (fmt) { - case SUBBITMAP_RGBA: { + case SUBBITMAP_BGRA: { GLSL(color = texture(osdtex, texcoord).bgra;) break; } @@ -225,7 +225,7 @@ bool mpgl_osd_draw_prepare(struct mpgl_osd *ctx, int index, break; } default: - abort(); + MP_ASSERT_UNREACHABLE(); } return true; @@ -286,7 +286,7 @@ static void get_3d_side_by_side(int stereo_mode, int div[2]) } void mpgl_osd_draw_finish(struct mpgl_osd *ctx, int index, - struct gl_shader_cache *sc, struct ra_fbo fbo) + struct gl_shader_cache *sc, const struct ra_fbo *fbo) { struct mpgl_osd_part *part = ctx->parts[index]; @@ -312,7 +312,7 @@ void mpgl_osd_draw_finish(struct mpgl_osd *ctx, int index, const int *factors = &blend_factors[part->format][0]; gl_sc_blend(sc, factors[0], factors[1], factors[2], factors[3]); - gl_sc_dispatch_draw(sc, fbo.tex, false, vertex_vao, MP_ARRAY_SIZE(vertex_vao), + gl_sc_dispatch_draw(sc, fbo->tex, false, vertex_vao, MP_ARRAY_SIZE(vertex_vao), sizeof(struct vertex), part->vertices, part->num_vertices); } |