summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-12-09 14:22:30 +0100
committerMichal Krol <[email protected]>2009-12-09 14:22:30 +0100
commitdfdf83d714c0d32d9182eb3001cf642aa6cb5c87 (patch)
treea657acb85a10fec64333c7850935de21b3fc696c /src/gallium/auxiliary/util
parenteb926ddf9eee1095c7fc12013f0b8375bbaeca6f (diff)
Revert "Simplify the redundant meaning of format layout."
This reverts commit eb926ddf9eee1095c7fc12013f0b8375bbaeca6f.
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_format.h7
-rwxr-xr-xsrc/gallium/auxiliary/util/u_format_table.py10
2 files changed, 8 insertions, 9 deletions
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index bb7c2add5c6..25a06a8f7db 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -34,8 +34,11 @@
enum util_format_layout {
- UTIL_FORMAT_LAYOUT_PLAIN = 0, /*< RGB, depth-stencil */
- UTIL_FORMAT_LAYOUT_DXT = 1
+ UTIL_FORMAT_LAYOUT_SCALAR = 0,
+ UTIL_FORMAT_LAYOUT_ARITH = 1,
+ UTIL_FORMAT_LAYOUT_ARRAY = 2,
+ UTIL_FORMAT_LAYOUT_YUV = 3,
+ UTIL_FORMAT_LAYOUT_DXT = 4
};
diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py
index c772a75e615..87135943766 100755
--- a/src/gallium/auxiliary/util/u_format_table.py
+++ b/src/gallium/auxiliary/util/u_format_table.py
@@ -35,12 +35,8 @@ import sys
from u_format_parse import *
-layout_map = {
- 'arith': 'UTIL_FORMAT_LAYOUT_PLAIN',
- 'array': 'UTIL_FORMAT_LAYOUT_PLAIN',
- 'yuv': 'UTIL_FORMAT_LAYOUT_PLAIN',
- 'dxt': 'UTIL_FORMAT_LAYOUT_DXT',
-}
+def layout_map(layout):
+ return 'UTIL_FORMAT_LAYOUT_' + str(layout).upper()
def colorspace_map(colorspace):
@@ -108,7 +104,7 @@ def write_format_table(formats):
print " %s," % (format.name,)
print " \"%s\"," % (format.name,)
print " {%u, %u, %u}, /* block */" % (format.block_width, format.block_height, format.block_size())
- print " %s," % (layout_map[format.layout],)
+ print " %s," % (layout_map(format.layout),)
print " {"
for i in range(4):
type = format.in_types[i]