panfrost: Add panfrost_batch_write_bo

Needed when writing to a BO from a compute shader when the BO isn't
assigned to a resource yet.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
This commit is contained in:
Louis-Francis Ratté-Boulianne 2023-08-31 11:47:48 -04:00 committed by Marge Bot
parent 113d88f94d
commit 542c44ffde
2 changed files with 12 additions and 0 deletions

View file

@ -350,6 +350,14 @@ panfrost_batch_add_bo(struct panfrost_batch *batch, struct panfrost_bo *bo,
batch, bo, PAN_BO_ACCESS_READ | panfrost_access_for_stage(stage));
}
void
panfrost_batch_write_bo(struct panfrost_batch *batch, struct panfrost_bo *bo,
enum pipe_shader_type stage)
{
panfrost_batch_add_bo_old(
batch, bo, PAN_BO_ACCESS_WRITE | panfrost_access_for_stage(stage));
}
void
panfrost_batch_read_rsrc(struct panfrost_batch *batch,
struct panfrost_resource *rsrc,

View file

@ -205,6 +205,10 @@ panfrost_get_fresh_batch_for_fbo(struct panfrost_context *ctx,
void panfrost_batch_add_bo(struct panfrost_batch *batch, struct panfrost_bo *bo,
enum pipe_shader_type stage);
void panfrost_batch_write_bo(struct panfrost_batch *batch,
struct panfrost_bo *bo,
enum pipe_shader_type stage);
void panfrost_batch_read_rsrc(struct panfrost_batch *batch,
struct panfrost_resource *rsrc,
enum pipe_shader_type stage);