From 719d570cb8c3ee689e85770f49b4952e47d14847 Mon Sep 17 00:00:00 2001 From: Ryan Neph Date: Thu, 3 Mar 2022 10:43:22 -0800 Subject: [PATCH] vrend: simply renames vrend_color_convert_linear_to_srgb Match the terminology of other use cases relating to srgb conversion. no functional change. Signed-off-by: Ryan Neph Reviewed-by: Gert Wollny Part-of: --- src/vrend_renderer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index a00dfa1..16436da 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -3952,7 +3952,7 @@ void vrend_bind_shader(struct vrend_context *ctx, } static float -vrend_color_convert_linear_to_srgb(float color) { +vrend_color_encode_as_srgb(float color) { return color <= 0.0031308f ? 12.92f * color : 1.055f * powf(color, (1.f / 2.4f)) - 0.055f; @@ -3998,7 +3998,7 @@ void vrend_clear(struct vrend_context *ctx, util_format_name(surf->format), util_format_name(surf->texture->base.format)); for (int i = 0; i < 3; ++i) // i < 3: don't convert alpha channel - colorf[i] = vrend_color_convert_linear_to_srgb(colorf[i]); + colorf[i] = vrend_color_encode_as_srgb(colorf[i]); } }