diff options
Diffstat (limited to 'video/out/opengl/ra.c')
-rw-r--r-- | video/out/opengl/ra.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/video/out/opengl/ra.c b/video/out/opengl/ra.c index 73f2915f95..9096a50148 100644 --- a/video/out/opengl/ra.c +++ b/video/out/opengl/ra.c @@ -80,6 +80,15 @@ const struct ra_format *ra_find_float16_format(struct ra *ra, int n_components) return NULL; } +const struct ra_format *ra_find_named_format(struct ra *ra, const char *name) +{ + for (int n = 0; n < ra->num_formats; n++) { + const struct ra_format *fmt = ra->formats[n]; + if (strcmp(fmt->name, name) == 0) + return fmt; + } + return NULL; +} // Like ra_find_unorm_format(), but if no fixed point format is available, // return an unsigned integer format. |