diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-02-10 08:47:09 -0500 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2020-02-16 09:16:46 -0500 |
commit | 6dc105555b43695e1de49baf946c6179987f2f4a (patch) | |
tree | 0da37f93032eb10a88a7e65d243e15a8301f4efd /src/gallium/drivers/panfrost | |
parent | 254f40fd535ef57dee2bcc4afd97840749ce5918 (diff) |
panfrost: Unify bifrost_scratchpad with mali_shared_memory
It looks like these are the same structure, so this allows us to reuse
mali_shared_memory across architectures, and dispels with the
Bifrost-specific mystery of the scratchpads... nothing so mysterious
after all, just stack.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
Diffstat (limited to 'src/gallium/drivers/panfrost')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_compute.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/panfrost/pan_context.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/panfrost/pan_compute.c b/src/gallium/drivers/panfrost/pan_compute.c index 33618cb6997..f4c28c36429 100644 --- a/src/gallium/drivers/panfrost/pan_compute.c +++ b/src/gallium/drivers/panfrost/pan_compute.c @@ -131,7 +131,7 @@ panfrost_launch_grid(struct pipe_context *pipe, .shared_workgroup_count = ~0 }; - payload->postfix.framebuffer = + payload->postfix.shared_memory = panfrost_upload_transient(batch, &shared, sizeof(shared)); /* Invoke according to the grid info */ diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 417c900c961..f6f9858e074 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -141,6 +141,9 @@ panfrost_clear( panfrost_batch_clear(batch, buffers, color, depth, stencil); } +/* TODO: Bifrost requires just a mali_shared_memory, without the rest of the + * framebuffer */ + static void panfrost_attach_vt_framebuffer(struct panfrost_context *ctx) { @@ -162,7 +165,7 @@ panfrost_attach_vt_framebuffer(struct panfrost_context *ctx) } for (unsigned i = 0; i < PIPE_SHADER_TYPES; ++i) - ctx->payloads[i].postfix.framebuffer = batch->framebuffer.gpu; + ctx->payloads[i].postfix.shared_memory = batch->framebuffer.gpu; } /* Reset per-frame context, called on context initialisation as well as after @@ -172,7 +175,7 @@ void panfrost_invalidate_frame(struct panfrost_context *ctx) { for (unsigned i = 0; i < PIPE_SHADER_TYPES; ++i) - ctx->payloads[i].postfix.framebuffer = 0; + ctx->payloads[i].postfix.shared_memory = 0; if (ctx->rasterizer) ctx->dirty |= PAN_DIRTY_RASTERIZER; |