summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2019-02-05 10:59:42 -0500
committerRob Clark <[email protected]>2019-04-23 17:11:56 +0000
commitea254fcd3c1050d691b43f0e2c5570e32d0783dd (patch)
tree6e9201c01e8c939896460f3e06a41834159a4802 /src/gallium/auxiliary
parent73c1d7e8c9cda09165546d836048e4a2cef89e0d (diff)
gallium: add ATC format support
Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_format.csv4
-rw-r--r--src/gallium/auxiliary/util/u_format.h8
-rw-r--r--src/gallium/auxiliary/util/u_format_pack.py2
-rw-r--r--src/gallium/auxiliary/util/u_format_table.py2
4 files changed, 13 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index 3a2a6331e01..51a08bd6530 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -237,6 +237,10 @@ PIPE_FORMAT_ASTC_10x10_SRGB , astc,10,10, x128, , , , xyzw, sr
PIPE_FORMAT_ASTC_12x10_SRGB , astc,12,10, x128, , , , xyzw, srgb
PIPE_FORMAT_ASTC_12x12_SRGB , astc,12,12, x128, , , , xyzw, srgb
+PIPE_FORMAT_ATC_RGB , atc, 4, 4, x64, , , , xyz1, rgb
+PIPE_FORMAT_ATC_RGBA_EXPLICIT , atc, 4, 4, x128, , , , xyzw, rgb
+PIPE_FORMAT_ATC_RGBA_INTERPOLATED , atc, 4, 4, x128, , , , xyzw, rgb
+
# Straightforward D3D10-like formats (also used for
# vertex buffer element description)
#
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index cb1138947aa..cf69460e050 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -89,9 +89,14 @@ enum util_format_layout {
UTIL_FORMAT_LAYOUT_ASTC = 8,
/**
+ * ATC
+ */
+ UTIL_FORMAT_LAYOUT_ATC = 9,
+
+ /**
* Everything else that doesn't fit in any of the above layouts.
*/
- UTIL_FORMAT_LAYOUT_OTHER = 9
+ UTIL_FORMAT_LAYOUT_OTHER = 10
};
@@ -485,6 +490,7 @@ util_format_is_compressed(enum pipe_format format)
case UTIL_FORMAT_LAYOUT_ETC:
case UTIL_FORMAT_LAYOUT_BPTC:
case UTIL_FORMAT_LAYOUT_ASTC:
+ case UTIL_FORMAT_LAYOUT_ATC:
/* XXX add other formats in the future */
return TRUE;
default:
diff --git a/src/gallium/auxiliary/util/u_format_pack.py b/src/gallium/auxiliary/util/u_format_pack.py
index 62e531716ca..b43851720ad 100644
--- a/src/gallium/auxiliary/util/u_format_pack.py
+++ b/src/gallium/auxiliary/util/u_format_pack.py
@@ -696,7 +696,7 @@ def generate_format_fetch(format, dst_channel, dst_native_type, dst_suffix):
def is_format_hand_written(format):
- return format.layout in ('s3tc', 'rgtc', 'etc', 'bptc', 'astc', 'subsampled', 'other') or format.colorspace == ZS
+ return format.layout in ('s3tc', 'rgtc', 'etc', 'bptc', 'astc', 'atc', 'subsampled', 'other') or format.colorspace == ZS
def generate(formats):
diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py
index 97cd0474382..731e2fbae78 100644
--- a/src/gallium/auxiliary/util/u_format_table.py
+++ b/src/gallium/auxiliary/util/u_format_table.py
@@ -142,7 +142,7 @@ def write_format_table(formats):
u_format_pack.print_channels(format, do_swizzle_array)
print(" %s," % (colorspace_map(format.colorspace),))
access = True
- if format.layout == 'astc':
+ if format.layout == 'astc' or format.layout == 'atc':
access = False
if format.layout == 'etc' and format.short_name() != 'etc1_rgb8':
access = False