MALI_CHANNEL_RESERVED_1 = 7,
};
-struct mali_channel_swizzle {
- enum mali_channel r : 3;
- enum mali_channel g : 3;
- enum mali_channel b : 3;
- enum mali_channel a : 3;
-} __attribute__((packed));
-
/* Compressed per-pixel formats. Each of these formats expands to one to four
* floating-point or integer numbers, as defined by the OpenGL specification.
* There are various places in OpenGL where the user can specify a compressed
/* For each pointer, there is an address and optionally also a stride */
#define MAX_ELEMENTS (2)
-/* While Midgard texture descriptors are variable length, Bifrost descriptors
- * are fixed like samplers with more pointers to expand if necessary */
-
-struct bifrost_texture_descriptor {
- unsigned format_unk : 4; /* 2 */
- enum mali_texture_dimension type : 2;
- unsigned zero : 4;
- unsigned format_swizzle : 12;
- enum mali_format format : 8;
- unsigned srgb : 1;
- unsigned format_unk3 : 1; /* 0 */
-
- uint16_t width; /* MALI_POSITIVE */
- uint16_t height; /* MALI_POSITIVE */
-
- /* OpenGL swizzle */
- unsigned swizzle : 12;
- enum mali_texture_layout layout : 4;
- uint8_t levels : 8; /* Number of levels-1 if mipmapped, 0 if not */
- unsigned unk1 : 8;
-
- unsigned levels_unk : 24; /* 0 */
- unsigned level_2 : 8; /* Number of levels, again? */
-
- mali_ptr payload;
-
- uint16_t array_size;
- uint16_t unk4;
-
- uint16_t depth;
- uint16_t unk5;
-} __attribute__((packed));
-
/* Used for lod encoding. Thanks @urjaman for pointing out these routines can
* be cleaned up a lot. */
u32 weights[8];
};
-enum mali_block_format {
- MALI_BLOCK_TILED = 0x0,
- MALI_BLOCK_UNKNOWN = 0x1,
- MALI_BLOCK_LINEAR = 0x2,
- MALI_BLOCK_AFBC = 0x3,
-};
-
struct mali_sfbd_format {
/* 0x1 */
unsigned unk1 : 6;
} __attribute__((packed));
-/* SINGLE to disable multisampling, AVERAGE for
- * EXT_multisampled_render_to_texture operation where multiple tilebuffer
- * samples are implicitly resolved before writeout, MULTIPLE to write multiple
- * samples inline, and LAYERED for ES3-style multisampling with each sample in
- * a different buffer.
- */
-
-enum mali_msaa_mode {
- MALI_MSAA_SINGLE = 0,
- MALI_MSAA_AVERAGE = 1,
- MALI_MSAA_MULTIPLE = 2,
- MALI_MSAA_LAYERED = 3,
-};
-
#define MALI_MFBD_FORMAT_SRGB (1 << 0)
struct mali_rt_format {
unsigned unk3 : 4;
unsigned unk4 : 1;
enum mali_block_format block : 2;
- enum mali_msaa_mode msaa : 2;
+ enum mali_msaa msaa : 2;
unsigned flags : 2;
unsigned swizzle : 12;