Commit d503d9dd authored by Niklas Haas's avatar Niklas Haas
Browse files

renderer: fix plane merging code for cropped images

The late call to `img_tex` meant that this ran after the code that
updates `st->img.rect` based on `image->crop`. Technically, this also
resulted in minor chroma misalignment, but practically the only really
obvious breakage was when combining it with an image crop.
parent 246ee04f
......@@ -1299,6 +1299,12 @@ static bool pass_read_image(struct pl_renderer *rr, struct pass_state *pass,
sti->img.fmt = fmt;
*stj = (struct plane_state) {0};
if (!img_tex(pass, &sti->img)) {
PL_ERR(rr, "Failed dispatching plane merging shader, disabling FBOs!");
memset(rr->fbofmt, 0, sizeof(rr->fbofmt));
return false;
// Compute the sampling rc of each plane
......@@ -1384,7 +1390,7 @@ static bool pass_read_image(struct pl_renderer *rr, struct pass_state *pass,
base_y = st->img.rect.y0 - scale_y * off_y;
struct pl_sample_src src = {
.tex = img_tex(pass, &st->img),
.tex = st->img.tex,
.components = plane->components,
.address_mode = plane->address_mode,
.scale = pl_color_repr_normalize(&st->img.repr),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment