mpv/video/out/gpu
Philip Langdale 3f006eced4 options: Make validation and help possible for all option types
Today, validation is only possible for string type options. But there's
no particular reason why it needs to be restricted in this way, and
there are potential uses, to allow other options to be validated
without forcing the option to have to reimplement parsing from
scratch.

The first part, simply making the validation function an explicit
field instead of overloading priv is simple enough. But if we only do
that, then the validation function still needs to deal with the raw
pre-parsed string. Instead, we want to allow the value to be parsed
before it is validated. That in turn leads to us having validator
functions that should be type aware. Unfortunately, that means we need
to keep the explicit macro like OPT_STRING_VALIDATE() as a way to
enforce the correct typing of the function. Otherwise, we'd have to
have the validator take a void * and hope the implementation can cast
it correctly.

For help, we don't have this problem, as help doesn't look at the
value.

Then, we turn validators that are really help generators into explicit
help functions and where a validator is help + validation, we split
them into two parts.

I have, however, left functions that need to query information for both
help and validation as single functions to avoid code duplication.

In this change, I have not added an other OPT_FOO_VALIDATE() macros as
they are not needed, but I will add some in a separate change to
illustrate the pattern.
2021-03-28 19:46:27 +03:00
..
context.c options: Make validation and help possible for all option types 2021-03-28 19:46:27 +03:00
context.h options: Make validation and help possible for all option types 2021-03-28 19:46:27 +03:00
d3d11_helpers.c vo_gpu/d3d11: add support for configuring swap chain color space 2019-10-30 02:41:25 +02:00
d3d11_helpers.h vo_gpu/d3d11: add support for configuring swap chain color space 2019-10-30 02:41:25 +02:00
error_diffusion.c vo_gpu: process three component together in error diffusion 2019-06-16 11:19:44 +02:00
error_diffusion.h vo_gpu: implement error diffusion for dithering 2019-06-16 11:19:44 +02:00
hwdec.c options: Make validation and help possible for all option types 2021-03-28 19:46:27 +03:00
hwdec.h options: Make validation and help possible for all option types 2021-03-28 19:46:27 +03:00
lcms.c options: Make validation and help possible for all option types 2021-03-28 19:46:27 +03:00
lcms.h
libmpv_gpu.c client API: add software rendering API 2020-07-08 22:42:05 +02:00
libmpv_gpu.h client API: add a new way to pass X11 Display etc. to render API 2018-03-26 19:47:08 +02:00
osd.c Replace uses of FFMIN/MAX with MPMIN/MAX 2019-10-31 11:24:20 +01:00
osd.h vo_gpu: simplify structs / names 2017-09-22 16:58:55 +02:00
ra.c vo_gpu: fix green shit with float yuv input 2020-05-09 18:02:57 +02:00
ra.h vo_gpu: fix green shit with float yuv input 2020-05-09 18:02:57 +02:00
shader_cache.c vo_gpu: cast bvecN to vecN for mix() on older GLSL 2020-12-28 19:39:41 +01:00
shader_cache.h vo_gpu: cast bvecN to vecN for mix() on older GLSL 2020-12-28 19:39:41 +01:00
spirv.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
spirv.h vo_gpu: vulkan: generalize SPIR-V compiler 2017-09-26 17:25:35 +02:00
spirv_shaderc.c vo_gpu: switch to optimization level performance 2018-09-01 16:14:22 +02:00
user_shaders.c vo_gpu: allow user shader to fix texture offset 2019-06-06 20:01:56 +02:00
user_shaders.h vo_gpu: allow user shader to fix texture offset 2019-06-06 20:01:56 +02:00
utils.c vo_gpu: generally allow non-storable FBOs 2020-03-08 21:41:16 +01:00
utils.h vo_gpu: simplify structs / names 2017-09-22 16:58:55 +02:00
video.c options: Make validation and help possible for all option types 2021-03-28 19:46:27 +03:00
video.h vo_gpu: add better gamut clipping option 2020-06-19 08:09:19 +02:00
video_shaders.c vo_gpu: lower default deband threshold 2021-02-05 15:15:55 +01:00
video_shaders.h vo_gpu: improve tone mapping desaturation 2019-02-18 01:54:06 +02:00