diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-12-09 11:02:15 -0500 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-12-13 10:26:35 -0500 |
commit | 4f7fddbd7169a2976b56edb39d15c64206e31ebc (patch) | |
tree | bfd786b32611c07b38ed12f0fc5456163e97d21b /src/gallium/drivers/panfrost/pan_job.c | |
parent | bc887e82818ac2c8f2011da70d7bddb8975b66c3 (diff) |
panfrost: Pass size to panfrost_batch_get_scratchpad
We'll compute the size with the new scratchpad helpers.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_job.c')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_job.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index a36edae2a26..dbab1df1b83 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -636,19 +636,21 @@ panfrost_batch_get_polygon_list(struct panfrost_batch *batch, unsigned size) } struct panfrost_bo * -panfrost_batch_get_scratchpad(struct panfrost_batch *batch) +panfrost_batch_get_scratchpad(struct panfrost_batch *batch, + unsigned shift, + unsigned thread_tls_alloc, + unsigned core_count) { - if (batch->scratchpad) - return batch->scratchpad; - - batch->scratchpad = panfrost_batch_create_bo(batch, 64 * 4 * 4096, - PAN_BO_INVISIBLE, - PAN_BO_ACCESS_PRIVATE | - PAN_BO_ACCESS_RW | - PAN_BO_ACCESS_VERTEX_TILER | - PAN_BO_ACCESS_FRAGMENT); - assert(batch->scratchpad); - return batch->scratchpad; + unsigned size = panfrost_get_total_stack_size(shift, + thread_tls_alloc, + core_count); + + return panfrost_batch_create_bo(batch, size, + PAN_BO_INVISIBLE, + PAN_BO_ACCESS_PRIVATE | + PAN_BO_ACCESS_RW | + PAN_BO_ACCESS_VERTEX_TILER | + PAN_BO_ACCESS_FRAGMENT); } struct panfrost_bo * |