Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vo_gpu_next: clear renderer cache on options update #15274

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion video/out/vo_gpu_next.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ struct priv {
bool is_interpolated;
bool want_reset;
bool frame_pending;
bool redraw;

pl_options pars;
struct m_config_cache *opts_cache;
Expand Down Expand Up @@ -2134,6 +2133,11 @@ static void update_hook_opts(struct priv *p, char **opts, const char *shaderpath
if (!mp_splitext(basename, &shadername))
shadername = bstr0(basename);

for (int i = 0; i < hook->num_parameters; i++) {
const struct pl_hook_par *hp = &hook->parameters[i];
memcpy(hp->data, &hp->initial, sizeof(*hp->data));
}

for (int n = 0; opts[n * 2]; n++) {
struct bstr k = bstr0(opts[n * 2 + 0]);
struct bstr v = bstr0(opts[n * 2 + 1]);
Expand Down Expand Up @@ -2329,6 +2333,9 @@ AV_NOWARN_DEPRECATED(
}

pars->params.hooks = p->hooks;

MP_DBG(p, "Render options updated, resetting render state.\n");
p->want_reset = true;
}

const struct vo_driver video_out_gpu_next = {
Expand Down
Loading