summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-09-19 15:04:48 +0100
committerDave Airlie <[email protected]>2011-10-08 17:44:59 +0100
commita441feb757b1be4845ba378f0207dcdc5cc1a407 (patch)
tree63a6b44c082a8850a0001fa8e772d58042123dc4 /src/gallium/include/pipe
parentc2060c0af7de4678d55962369244451fe678c4e8 (diff)
gallium: add initial pure integer support (v2)
This add support for unsigned/signed integer types via adding a 'pure' bit in the format description table. It adds 4 new u_format get/put hooks, for get/put uint and get/put sint so that accessors can get native access to the integer bits. This is used to avoid precision loss via float converting paths. It doesn't add any float fetchers for these types at the moment, GL doesn't require float fetching from these types and I expect we'll introduce a lot of hidden bugs if we start allowing such conversions without an API mandating it. It adds all formats from EXT_texture_integer and EXT_texture_rg. 0 regressions on llvmpipe here with this. (there is some more follow on code in my gallium-int-work branch, bringing softpipe and mesa to a pretty integer clean state) v2: fixup python generator to get signed->unsigned and unsigned->signed fetches working. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_format.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index 3d1c9975384..1b8ad97d498 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -251,6 +251,66 @@ enum pipe_format {
PIPE_FORMAT_B10G10R10A2_SSCALED = 175,
PIPE_FORMAT_B10G10R10A2_SNORM = 176,
+ PIPE_FORMAT_R8_UINT = 177,
+ PIPE_FORMAT_R8G8_UINT = 178,
+ PIPE_FORMAT_R8G8B8_UINT = 179,
+ PIPE_FORMAT_R8G8B8A8_UINT = 180,
+
+ PIPE_FORMAT_R8_SINT = 181,
+ PIPE_FORMAT_R8G8_SINT = 182,
+ PIPE_FORMAT_R8G8B8_SINT = 183,
+ PIPE_FORMAT_R8G8B8A8_SINT = 184,
+
+ PIPE_FORMAT_R16_UINT = 185,
+ PIPE_FORMAT_R16G16_UINT = 186,
+ PIPE_FORMAT_R16G16B16_UINT = 187,
+ PIPE_FORMAT_R16G16B16A16_UINT = 188,
+
+ PIPE_FORMAT_R16_SINT = 189,
+ PIPE_FORMAT_R16G16_SINT = 190,
+ PIPE_FORMAT_R16G16B16_SINT = 191,
+ PIPE_FORMAT_R16G16B16A16_SINT = 192,
+
+ PIPE_FORMAT_R32_UINT = 193,
+ PIPE_FORMAT_R32G32_UINT = 194,
+ PIPE_FORMAT_R32G32B32_UINT = 195,
+ PIPE_FORMAT_R32G32B32A32_UINT = 196,
+
+ PIPE_FORMAT_R32_SINT = 197,
+ PIPE_FORMAT_R32G32_SINT = 198,
+ PIPE_FORMAT_R32G32B32_SINT = 199,
+ PIPE_FORMAT_R32G32B32A32_SINT = 200,
+
+ PIPE_FORMAT_A8_UINT = 201,
+ PIPE_FORMAT_I8_UINT = 202,
+ PIPE_FORMAT_L8_UINT = 203,
+ PIPE_FORMAT_L8A8_UINT = 204,
+
+ PIPE_FORMAT_A8_SINT = 205,
+ PIPE_FORMAT_I8_SINT = 206,
+ PIPE_FORMAT_L8_SINT = 207,
+ PIPE_FORMAT_L8A8_SINT = 208,
+
+ PIPE_FORMAT_A16_UINT = 209,
+ PIPE_FORMAT_I16_UINT = 210,
+ PIPE_FORMAT_L16_UINT = 211,
+ PIPE_FORMAT_L16A16_UINT = 212,
+
+ PIPE_FORMAT_A16_SINT = 213,
+ PIPE_FORMAT_I16_SINT = 214,
+ PIPE_FORMAT_L16_SINT = 215,
+ PIPE_FORMAT_L16A16_SINT = 216,
+
+ PIPE_FORMAT_A32_UINT = 217,
+ PIPE_FORMAT_I32_UINT = 218,
+ PIPE_FORMAT_L32_UINT = 219,
+ PIPE_FORMAT_L32A32_UINT = 220,
+
+ PIPE_FORMAT_A32_SINT = 221,
+ PIPE_FORMAT_I32_SINT = 222,
+ PIPE_FORMAT_L32_SINT = 223,
+ PIPE_FORMAT_L32A32_SINT = 224,
+
PIPE_FORMAT_COUNT
};