diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-12-16 11:46:32 -0500 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-12-16 12:50:26 -0500 |
commit | caf55e7bfd06b4d1001df4e188ea69bee71d0619 (patch) | |
tree | 8b7d13bd0c8c03fca5a5ec922605691575ce1e1d | |
parent | bc36160ccb07a662b2cfd7f0dec56e9c3f4f5aff (diff) |
panfrost: Fix FBD issue
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Fixes: b0e915b4e65 ("panfrost: Emit SFBD/MFBD after a batch, instead of before")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3118>
-rw-r--r-- | src/gallium/drivers/panfrost/pan_fragment.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/panfrost/pan_job.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/drivers/panfrost/pan_fragment.c b/src/gallium/drivers/panfrost/pan_fragment.c index 438294926fd..88b2db3c949 100644 --- a/src/gallium/drivers/panfrost/pan_fragment.c +++ b/src/gallium/drivers/panfrost/pan_fragment.c @@ -102,10 +102,6 @@ panfrost_fragment_job(struct panfrost_batch *batch, bool has_draws, .framebuffer = framebuffer, }; - /* Normally, there should be no padding. However, fragment jobs are - * shared with 64-bit Bifrost systems, and accordingly there is 4-bytes - * of zero padding in between. */ - struct panfrost_transfer transfer = panfrost_allocate_transient(batch, sizeof(header) + sizeof(payload)); memcpy(transfer.cpu, &header, sizeof(header)); memcpy(transfer.cpu + sizeof(header), &payload, sizeof(payload)); diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index dbab1df1b83..5722f4a1f31 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -623,6 +623,7 @@ panfrost_batch_get_polygon_list(struct panfrost_batch *batch, unsigned size) assert(batch->polygon_list->size >= size); } else { /* Create the BO as invisible, as there's no reason to map */ + size = util_next_power_of_two(size); batch->polygon_list = panfrost_batch_create_bo(batch, size, PAN_BO_INVISIBLE, @@ -962,7 +963,7 @@ panfrost_batch_submit(struct panfrost_batch *batch) /* Now that all draws are in, we can finally prepare the * FBD for the batch */ - if (batch->framebuffer.gpu) { + if (batch->framebuffer.gpu && batch->first_job.gpu) { struct panfrost_context *ctx = batch->ctx; struct pipe_context *gallium = (struct pipe_context *) ctx; struct panfrost_screen *screen = pan_screen(gallium->screen); |