-/* It's not known why there are 4-bits allocated -- this enum is almost
- * certainly incomplete */
-
-enum mali_texture_layout {
- /* For a Z/S texture, this is linear */
- MALI_TEXTURE_TILED = 0x1,
-
- /* Z/S textures cannot be tiled */
- MALI_TEXTURE_LINEAR = 0x2,
-
- /* 16x16 sparse */
- MALI_TEXTURE_AFBC = 0xC
-};
-
-/* Corresponds to the type passed to glTexImage2D and so forth */
-
-struct mali_texture_format {
- unsigned swizzle : 12;
- enum mali_format format : 8;
-
- unsigned srgb : 1;
- unsigned unknown1 : 1;
-
- enum mali_texture_type type : 2;
- enum mali_texture_layout layout : 4;
-
- /* Always set */
- unsigned unknown2 : 1;
-
- /* Set to allow packing an explicit stride */
- unsigned manual_stride : 1;
-
- unsigned zero : 2;
-} __attribute__((packed));
-
-struct mali_texture_descriptor {
- uint16_t width;
- uint16_t height;
- uint16_t depth;
- uint16_t array_size;
-
- struct mali_texture_format format;
-
- uint16_t unknown3;
-
- /* One for non-mipmapped, zero for mipmapped */
- uint8_t unknown3A;
-
- /* Zero for non-mipmapped, (number of levels - 1) for mipmapped */
- uint8_t levels;
-
- /* Swizzling is a single 32-bit word, broken up here for convenience.
- * Here, swizzling refers to the ES 3.0 texture parameters for channel
- * level swizzling, not the internal pixel-level swizzling which is
- * below OpenGL's reach */
-
- unsigned swizzle : 12;
- unsigned swizzle_zero : 20;
-
- uint32_t unknown5;
- uint32_t unknown6;
- uint32_t unknown7;
-
- mali_ptr payload[MAX_MIP_LEVELS * MAX_CUBE_FACES * MAX_ELEMENTS];
-} __attribute__((packed));
-
-/* filter_mode */
-
-#define MALI_SAMP_MAG_NEAREST (1 << 0)
-#define MALI_SAMP_MIN_NEAREST (1 << 1)
-
-/* TODO: What do these bits mean individually? Only seen set together */
-
-#define MALI_SAMP_MIP_LINEAR_1 (1 << 3)
-#define MALI_SAMP_MIP_LINEAR_2 (1 << 4)
-
-/* Flag in filter_mode, corresponding to OpenCL's NORMALIZED_COORDS_TRUE
- * sampler_t flag. For typical OpenGL textures, this is always set. */
-
-#define MALI_SAMP_NORM_COORDS (1 << 5)
-