panfrost: Add tentative bifrost_texture_descriptor
It looks very similar to the Midgard texture descriptor, just with a bunch of fields moved around and the whole descriptor flattened (so basically just memory access optimizations, from what I can tell). Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4680>
This commit is contained in:
parent
81a31911dd
commit
0167391a1a
|
@ -1238,6 +1238,38 @@ struct mali_texture_descriptor {
|
||||||
uint32_t unknown7;
|
uint32_t unknown7;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
/* 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_type type : 2;
|
||||||
|
unsigned format_unk2 : 16; /* 0 */
|
||||||
|
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;
|
||||||
|
unsigned unk0 : 4; /* 1 */
|
||||||
|
uint8_t levels : 8; /* Number of levels-1 if mipmapped, 0 if not */
|
||||||
|
unsigned unk1 : 4;
|
||||||
|
|
||||||
|
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));
|
||||||
|
|
||||||
/* filter_mode */
|
/* filter_mode */
|
||||||
|
|
||||||
#define MALI_SAMP_MAG_NEAREST (1 << 0)
|
#define MALI_SAMP_MAG_NEAREST (1 << 0)
|
||||||
|
|
Loading…
Reference in New Issue