Commit 8986ea43 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Remove gallium divergence

parent 0c6e2bf4
......@@ -965,7 +965,7 @@ panfrost_flush(
/* Display the frame in our cute little window */
#ifndef HAVE_DRI3
slowfb_update((uint8_t*) ctx->framebuffer.cpu, ctx->width, ctx->height);
slowfb_update((uint8_t*) ctx->framebuffer.cpu, ctx->stride / 4, ctx->height);
#endif
}
......@@ -1383,12 +1383,8 @@ trans_setup_framebuffer(struct panfrost_context *ctx, uint32_t *addr, int width,
ctx->has_alpha_channel = false;
ctx->flip_vertical = true; /* OpenGL */
#ifdef HAVE_DRI3
/* drisw rounds the stride */
int rw = 16.0 * (int) ceil((float) ctx->width / 16.0);
#else
int rw = ctx->width;
#endif
ctx->stride = rw * ctx->bytes_per_pixel;
......@@ -1401,7 +1397,7 @@ trans_setup_framebuffer(struct panfrost_context *ctx, uint32_t *addr, int width,
ctx->framebuffer.cpu = (uint8_t *) addr;
} else {
posix_memalign((void **) &ctx->framebuffer.cpu, CACHE_LINE_SIZE, framebuffer_sz + offset);
slowfb_init((uint8_t*) (ctx->framebuffer.cpu + offset), ctx->width, ctx->height);
slowfb_init((uint8_t*) (ctx->framebuffer.cpu + offset), rw, ctx->height);
}
struct mali_mem_import_user_buffer framebuffer_handle = { .ptr = (uint64_t) (uintptr_t) ctx->framebuffer.cpu, .length = framebuffer_sz + offset };
......
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