X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fpanfrost%2Finclude%2Fpanfrost-job.h;h=c4481de51015ed4e9af83f4b0a86ccdb8921133d;hb=99d17fb771b77af5c693ce86aae6a61a05c05843;hp=534e546254527d28ee42a8d2ee06acfe54a3b5cb;hpb=f74186baa5efd1147916b39a819fee9e427c8ecd;p=mesa.git diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index 534e5462545..c4481de5101 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -159,13 +159,6 @@ enum mali_channel { 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 @@ -1139,15 +1132,6 @@ struct bifrost_payload_fused { #define MALI_POSITIVE(dim) (dim - 1) -/* Shared across both command stream and Midgard, and even with Bifrost */ - -enum mali_texture_type { - MALI_TEX_CUBE = 0x0, - MALI_TEX_1D = 0x1, - MALI_TEX_2D = 0x2, - MALI_TEX_3D = 0x3 -}; - /* 8192x8192 */ #define MAX_MIP_LEVELS (13) @@ -1157,103 +1141,6 @@ enum mali_texture_type { /* For each pointer, there is an address and optionally also a stride */ #define MAX_ELEMENTS (2) -/* 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; -} __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 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. */ @@ -1271,35 +1158,6 @@ FIXED_16(float x, bool allow_negative) return (int) (x * 256.0); } -/* Bifrost sampler descriptors look pretty similar */ - -#define BIFROST_SAMP_MIN_NEAREST (1) -#define BIFROST_SAMP_MAG_LINEAR (1) - -struct bifrost_sampler_descriptor { - uint8_t unk1; - - enum mali_wrap_mode wrap_r : 4; - enum mali_wrap_mode wrap_t : 4; - enum mali_wrap_mode wrap_s : 4; - uint8_t unk8 : 4; - - uint8_t unk2 : 1; - uint8_t norm_coords : 1; - uint8_t unk3 : 1; - uint8_t min_filter : 1; - uint8_t zero1 : 1; - uint8_t mag_filter : 1; - uint8_t mip_filter : 1; - - int16_t min_lod; - int16_t max_lod; - - uint64_t zero2; - uint64_t zero3; - uint64_t zero4; -} __attribute__((packed)); - /* From presentations, 16x16 tiles externally. Use shift for fast computation * of tile numbers. */ @@ -1409,13 +1267,6 @@ struct midgard_tiler_descriptor { 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; @@ -1540,20 +1391,6 @@ struct mali_single_framebuffer { } __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 { @@ -1565,7 +1402,7 @@ 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;