Commit 5c7118c7 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Rename negative_stride

parent 0f84c2ee
......@@ -639,12 +639,15 @@ struct mali_single_framebuffer {
u32 zero3[8];
/* Points to the end of the framebuffer. Compute as "framebuffer
* pointer + width * (height + 1) * pixel_size", where pixel_size = 4
* (for ARGB). No idea what's up with that off-by-one */
* 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. */
mali_ptr framebuffer_end;
int32_t negative_stride;
u64 unknown10;
u32 zero4;
/* Depth and stencil buffers are interleaved, it appears, as they are
* set to the same address in captures. Both fields set to zero if the
......
......@@ -255,8 +255,7 @@ panwrap_replay_sfbd(uint64_t gpu_va, int job_no)
panwrap_prop("height = MALI_POSITIVE(%" PRId16 ")", s->height + 1);
MEMORY_PROP(s, framebuffer_end);
panwrap_prop("unknown10 = 0x%" PRIx64, s->unknown10);
panwrap_prop("negative_stride = %d", s->negative_stride);
/* Earlier in the actual commandstream -- right before width -- but we
* delay to flow nicer */
......@@ -309,6 +308,7 @@ panwrap_replay_sfbd(uint64_t gpu_va, int job_no)
int zero_sum_pun = 0;
zero_sum_pun += s->zero1;
zero_sum_pun += s->zero2;
zero_sum_pun += s->zero4;
for (int i = 0; i < sizeof(s->zero3)/sizeof(s->zero3[0]); ++i) zero_sum_pun += s->zero3[i];
for (int i = 0; i < sizeof(s->zero6)/sizeof(s->zero6[0]); ++i) zero_sum_pun += s->zero6[i];
......
......@@ -136,9 +136,7 @@ trans_new_frag_framebuffer(struct panfrost_context *ctx)
/* Framebuffer start is computed relative to the end */
fb.framebuffer_end = ctx->framebuffer.gpu + ctx->framebuffer.size;
/* It's unclear why this is needed... or what it means */
fb.unknown10 = 0x100000000 - ctx->stride;
fb.negative_stride = -ctx->stride;
fb.unknown2 = 0xb84e0281;
......
......@@ -61,7 +61,7 @@ struct panfrost_context {
/* Common framebuffer settings */
int width;
int height;
int stride;
int32_t stride; /* Must be int32_t for bitwise NOT to be meaningful */
int bytes_per_pixel;
/* Each render job has multiple framebuffer descriptors associated with
......
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