From 2aa77f2777ad35d7fe249939b0d828306f13eade Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Thu, 20 Mar 2014 16:27:57 +0100 Subject: gallium: add b5g6r5 srgb format GL generally doesn't seem to allow srgb formats with less (or more) than 8 bit for the rgb channels, though some hw could easily do it (typically for formats with up to 10 bits for the rgb channels, at least for formats with less than 8 bits support is likely widespread even). While it may be true there aren't really any benefits for such formats, we need for it for d3d, though luckily only for b5g6r5_srgb it seems. So add this format along with the util code for conversion - since that util code is heavily tuned for 8bit srgb this isn't really all that well optimized and rounding doesn't seem right but at least it should give some halfway meaningful results. Reviewed-by: Jose Fonseca --- src/gallium/auxiliary/util/u_format.csv | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/auxiliary/util/u_format.csv') diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv index 8fb068b..8aa5c36 100644 --- a/src/gallium/auxiliary/util/u_format.csv +++ b/src/gallium/auxiliary/util/u_format.csv @@ -373,3 +373,6 @@ PIPE_FORMAT_R16A16_SINT , plain, 1, 1, sp16 , sp16 , , , x00 PIPE_FORMAT_R32A32_UINT , plain, 1, 1, up32 , up32 , , , x00y, rgb PIPE_FORMAT_R32A32_SINT , plain, 1, 1, sp32 , sp32 , , , x00y, rgb PIPE_FORMAT_R10G10B10A2_UINT , plain, 1, 1, up10 , up10 , up10, up2 , xyzw, rgb + +PIPE_FORMAT_B5G6R5_SRGB , plain, 1, 1, un5 , un6 , un5 , , zyx1, srgb + -- cgit v1.1