Commit 035e9fea authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Merge branch 'cleanup' into develop

parents 8975ac76 8986ea43
......@@ -317,6 +317,16 @@ struct mali_attr {
/* TODO: I'm pretty sure this isn't really right in the presence of more
* complicated metadata, like matrices or varyings */
enum mali_attr_type {
MALI_ATYPE_PACKED = 1,
MALI_ATYPE_UNK1 = 1,
MALI_ATYPE_BYTE = 3,
MALI_ATYPE_SHORT = 4,
MALI_ATYPE_INT = 5,
MALI_ATYPE_GPVARYING = 6,
MALI_ATYPE_FLOAT = 7,
};
struct mali_attr_meta {
u8 index;
u64 unknown1 :14;
......@@ -603,7 +613,7 @@ struct mali_payload_fragment {
/* (Single?) Framebuffer Descriptor */
/* Flags apply to unknown2. With just MSAA_A and MSAA_B, the framebuffer is
/* Flags apply to format. With just MSAA_A and MSAA_B, the framebuffer is
* configured for 4x. With MSAA_8, it is configured for 8x. */
#define MALI_FRAMEBUFFER_MSAA_8 (1 << 3)
......@@ -618,12 +628,16 @@ struct mali_payload_fragment {
struct mali_single_framebuffer {
u32 unknown1;
u32 flags;
u32 unknown2;
u64 unknown_address_0;
u64 zero1;
u64 heap_free_address;
u64 zero0;
/* Exact format is ironically not known, since EGL is finnicky with the
* blob. MSAA, colourspace, etc are configured here. */
u32 format;
u32 unknown2; // 0xB8..
u32 clear_flags;
u32 zero2;
......@@ -635,14 +649,12 @@ struct mali_single_framebuffer {
u32 zero3[8];
/* Points to the end of the framebuffer. Compute as "framebuffer
* pointer + width * height * pixel_size", where pixel_size = 4 (for
* ARGB). Negative stride is computed as -(width * pixel_size), 32-bit
* two's complement. The framebuffer is traversed backwards in the hw,
* it would appear. */
/* By default, the framebuffer is upside down from OpenGL's
* perspective. Set framebuffer to the end and negate the stride to
* flip in the Y direction */
mali_ptr framebuffer_end;
int32_t negative_stride;
mali_ptr framebuffer;
int32_t stride;
u32 zero4;
......@@ -677,7 +689,7 @@ struct mali_single_framebuffer {
/* Very weird format, see generation code in trans_builder.c */
u32 resolution_check;
u32 unknown9;
u32 tiler_flags;
u64 unknown_address_1; /* Pointing towards... a zero buffer? */
u64 unknown_address_2;
......
......@@ -79,7 +79,7 @@ static const struct panwrap_flag_info u4_flag_info[] = {
#undef FLAG_INFO
#define FLAG_INFO(flag) { MALI_FRAMEBUFFER_##flag, "MALI_FRAMEBUFFER_" #flag }
static const struct panwrap_flag_info u2_flag_info[] = {
static const struct panwrap_flag_info fb_fmt_flag_info[] = {
FLAG_INFO(MSAA_A),
FLAG_INFO(MSAA_B),
FLAG_INFO(MSAA_8),
......@@ -244,18 +244,17 @@ panwrap_replay_sfbd(uint64_t gpu_va, int job_no)
panwrap_indent++;
panwrap_prop("unknown1 = 0x%" PRIx32, s->unknown1);
panwrap_prop("flags = 0x%" PRIx32, s->flags);
panwrap_prop("heap_free_address = 0x%" PRIx64, s->heap_free_address);
panwrap_prop("unknown2 = 0x%" PRIx32, s->unknown2);
panwrap_log(".unknown2 = ");
panwrap_log_decoded_flags(u2_flag_info, s->unknown2);
panwrap_log(".format = ");
panwrap_log_decoded_flags(fb_fmt_flag_info, s->format);
panwrap_log_cont(",\n");
panwrap_prop("width = MALI_POSITIVE(%" PRId16 ")", s->width + 1);
panwrap_prop("height = MALI_POSITIVE(%" PRId16 ")", s->height + 1);
MEMORY_PROP(s, framebuffer_end);
panwrap_prop("negative_stride = %d", s->negative_stride);
MEMORY_PROP(s, framebuffer);
panwrap_prop("stride = %d", s->stride);
/* Earlier in the actual commandstream -- right before width -- but we
* delay to flow nicer */
......@@ -297,7 +296,7 @@ panwrap_replay_sfbd(uint64_t gpu_va, int job_no)
MEMORY_PROP(s, unknown_address_2);
panwrap_prop("resolution_check = 0x%" PRIx32, s->resolution_check);
panwrap_prop("unknown9 = 0x%" PRIx32, s->unknown9);
panwrap_prop("tiler_flags = 0x%" PRIx32, s->tiler_flags);
MEMORY_PROP(s, tiler_heap_free);
MEMORY_PROP(s, tiler_heap_end);
......@@ -306,6 +305,7 @@ panwrap_replay_sfbd(uint64_t gpu_va, int job_no)
panwrap_log("};\n");
int zero_sum_pun = 0;
zero_sum_pun += s->zero0;
zero_sum_pun += s->zero1;
zero_sum_pun += s->zero2;
zero_sum_pun += s->zero4;
......
This diff is collapsed.
......@@ -61,8 +61,12 @@ struct panfrost_context {
/* Common framebuffer settings */
int width;
int height;
int32_t stride; /* Must be int32_t for bitwise NOT to be meaningful */
int32_t stride; /* Signed as framebuffers can be flipped vertically */
int bytes_per_pixel;
bool has_alpha_channel;
/* Set for OpenGL's default mode. */
bool flip_vertical;
/* Each render job has multiple framebuffer descriptors associated with
* it, used for various purposes with more or less the same format. The
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment