소스 검색

panfrost: Don't double-create scratchpad

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 4f7fddbd71 ("panfrost: Pass size to panfrost_batch_get_scratchpad")
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3119>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3119>
master
Alyssa Rosenzweig 6 년 전
부모
커밋
0eb84eb702
1개의 변경된 파일과 7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7
    1
      src/gallium/drivers/panfrost/pan_job.c

+ 7
- 1
src/gallium/drivers/panfrost/pan_job.c 파일 보기

@@ -646,12 +646,18 @@ panfrost_batch_get_scratchpad(struct panfrost_batch *batch,
thread_tls_alloc,
core_count);

return panfrost_batch_create_bo(batch, size,
if (batch->scratchpad) {
assert(batch->scratchpad->size >= size);
} else {
batch->scratchpad = 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);
}

return batch->scratchpad;
}

struct panfrost_bo *

Loading…
취소
저장