From 69678d50d167a553d889687b3a84a260a5fb4e65 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 15 Dec 2021 21:32:58 -0500 Subject: [PATCH] mesa: Remove unused _mesa_get_linear_format_srgb Reviewed-by: Emma Anholt Part-of: --- src/mesa/main/format_fallback.py | 22 ---------------------- src/mesa/main/formats.h | 3 --- 2 files changed, 25 deletions(-) diff --git a/src/mesa/main/format_fallback.py b/src/mesa/main/format_fallback.py index bc752c3ff42..5f174073d82 100644 --- a/src/mesa/main/format_fallback.py +++ b/src/mesa/main/format_fallback.py @@ -101,28 +101,6 @@ _mesa_get_srgb_format_linear(mesa_format format) } } -/** - * For a linear format, return the corresponding sRGB color space format. - * For an sRGB format, return the format as-is. - * Assert-fails if the format is not sRGB and does not have an sRGB equivalent. - */ -mesa_format -_mesa_get_linear_format_srgb(mesa_format format) -{ - switch (format) { -%for unorm, srgb in unorm_to_srgb_map: - case ${unorm}: - return ${srgb}; -%endfor -%for unorm, srgb in unorm_to_srgb_map: - case ${srgb}: -%endfor - return format; - default: - unreachable("Given format does not have an sRGB equivalent"); - } -} - /** * For an intensity format, return the corresponding red format. For other * formats, return the format as-is. diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h index 2c5c03b1820..18139680ef2 100644 --- a/src/mesa/main/formats.h +++ b/src/mesa/main/formats.h @@ -722,9 +722,6 @@ _mesa_test_formats(void); extern mesa_format _mesa_get_srgb_format_linear(mesa_format format); -extern mesa_format -_mesa_get_linear_format_srgb(mesa_format format); - extern mesa_format _mesa_get_intensity_format_red(mesa_format format);