summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2014-03-20 16:27:57 +0100
committerRoland Scheidegger <[email protected]>2014-03-21 17:23:38 +0100
commit2aa77f2777ad35d7fe249939b0d828306f13eade (patch)
tree9190683a399a45d0c012f39033c49e0569c1c504 /src/gallium/include
parent19ba573a57ff6125a26ff9ae94cf43c36129645f (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_format.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index 34ab66250fd..a7fdcd0f4a7 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -342,6 +342,8 @@ enum pipe_format {
PIPE_FORMAT_R32A32_SINT = 252,
PIPE_FORMAT_R10G10B10A2_UINT = 253,
+ PIPE_FORMAT_B5G6R5_SRGB = 254,
+
PIPE_FORMAT_COUNT
};