From e2976e662d9215b5a466b108efc89e19fc718616 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Thu, 13 Jun 2019 12:30:18 -0700 Subject: video/out/gpu: Add a `storable` flag to ra_format While `ra` supports the concept of a texture as a storage destination, it does not support the concept of a texture format being usable for a storage texture. This can lead to us attempting to create a texture from an incompatible format, with undefined results. So, let's introduce an explicit format flag for storage and use it. In `ra_pl` we can simply reflect the `storable` flag. For GL and D3D, we'll need to write some new code to do the compatibility checks. I'm not going to do it here because it's not a regression; we were already implicitly assuming all formats were storable. Fixes #6657 --- video/out/placebo/ra_pl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'video/out/placebo/ra_pl.c') diff --git a/video/out/placebo/ra_pl.c b/video/out/placebo/ra_pl.c index 18d8f37070..28d4297f6f 100644 --- a/video/out/placebo/ra_pl.c +++ b/video/out/placebo/ra_pl.c @@ -88,6 +88,7 @@ struct ra *ra_create_pl(const struct pl_gpu *gpu, struct mp_log *log) .pixel_size = plfmt->texel_size, .linear_filter = plfmt->caps & PL_FMT_CAP_LINEAR, .renderable = plfmt->caps & PL_FMT_CAP_RENDERABLE, + .storable = plfmt->caps & PL_FMT_CAP_STORABLE, .glsl_format = plfmt->glsl_format, }; -- cgit v1.2.3