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 <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/725>
macos/master
Ryan Neph 3 years ago committed by Marge Bot
parent bea282334d
commit 719d570cb8
  1. 4
      src/vrend_renderer.c

@ -3952,7 +3952,7 @@ void vrend_bind_shader(struct vrend_context *ctx,
} }
static float static float
vrend_color_convert_linear_to_srgb(float color) { vrend_color_encode_as_srgb(float color) {
return color <= 0.0031308f return color <= 0.0031308f
? 12.92f * color ? 12.92f * color
: 1.055f * powf(color, (1.f / 2.4f)) - 0.055f; : 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->format),
util_format_name(surf->texture->base.format)); util_format_name(surf->texture->base.format));
for (int i = 0; i < 3; ++i) // i < 3: don't convert alpha channel 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]);
} }
} }

Loading…
Cancel
Save