diff options
author | Niklas Haas <git@haasn.xyz> | 2020-03-08 21:10:09 +0100 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2020-03-08 21:41:16 +0100 |
commit | c05e5d9d78af0c36bc8f54fe00ccf9248d69260a (patch) | |
tree | 4bb1cd6409310f843372ac424a71a856f2461267 /video/out/gpu/utils.c | |
parent | c145c8008580629bd12a009678be16759f125e04 (diff) | |
download | mpv-c05e5d9d78af0c36bc8f54fe00ccf9248d69260a.tar.bz2 mpv-c05e5d9d78af0c36bc8f54fe00ccf9248d69260a.tar.xz |
vo_gpu: generally allow non-storable FBOs
We have this cap now thanks to e2976e662, but we don't actually make
sure our FBOs are storable before we blindly attempt using them with
compute shaders.
There's no more need to unconditionally set `storage_dst = true` as long
as we make sure to include an extra condition on the `fbo_format`
selection to prevent users from accidentally enabling
compute-shader-only features with non-storable FBOs, alongside some
other miscellaneous adjustments to eliminate instances of "assumed
storability" from vo_gpu.
Diffstat (limited to 'video/out/gpu/utils.c')
-rw-r--r-- | video/out/gpu/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/gpu/utils.c b/video/out/gpu/utils.c index b59208776d..2c625dc26a 100644 --- a/video/out/gpu/utils.c +++ b/video/out/gpu/utils.c @@ -185,7 +185,7 @@ bool ra_tex_resize(struct ra *ra, struct mp_log *log, struct ra_tex **tex, mp_dbg(log, "Resizing texture: %dx%d\n", w, h); - if (!fmt || !fmt->renderable || !fmt->linear_filter || !fmt->storable) { + if (!fmt || !fmt->renderable || !fmt->linear_filter) { mp_err(log, "Format %s not supported.\n", fmt ? fmt->name : "(unset)"); return false; } @@ -200,7 +200,7 @@ bool ra_tex_resize(struct ra *ra, struct mp_log *log, struct ra_tex **tex, .src_linear = true, .render_src = true, .render_dst = true, - .storage_dst = true, + .storage_dst = fmt->storable, .blit_src = true, }; |