mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-20 21:50:26 +01:00
freedreno/drm: Add FD_BO_PREP_FLUSH
There are a couple cases where we want to use _NOSYNC, but at the same time we want to ensure that rendering related to a bo is actually flushed. This doesn't do anything yet, but when we start deferring/merging submits we'll need a way to trigger anything deferred to flush. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>
This commit is contained in:
parent
8ab227c373
commit
c98ada6ad1
3 changed files with 3 additions and 2 deletions
|
|
@ -72,6 +72,7 @@ enum fd_param_id {
|
|||
#define FD_BO_PREP_READ BITSET_BIT(0)
|
||||
#define FD_BO_PREP_WRITE BITSET_BIT(1)
|
||||
#define FD_BO_PREP_NOSYNC BITSET_BIT(2)
|
||||
#define FD_BO_PREP_FLUSH BITSET_BIT(3)
|
||||
|
||||
|
||||
/* device functions:
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ fd_acc_get_query_result(struct fd_context *ctx, struct fd_query *q, bool wait,
|
|||
}
|
||||
|
||||
ret = fd_resource_wait(
|
||||
ctx, rsc, FD_BO_PREP_READ | FD_BO_PREP_NOSYNC);
|
||||
ctx, rsc, FD_BO_PREP_READ | FD_BO_PREP_NOSYNC | FD_BO_PREP_FLUSH);
|
||||
if (ret)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ fd_hw_get_query_result(struct fd_context *ctx, struct fd_query *q, bool wait,
|
|||
return false;
|
||||
|
||||
ret = fd_resource_wait(
|
||||
ctx, rsc, FD_BO_PREP_READ | FD_BO_PREP_NOSYNC);
|
||||
ctx, rsc, FD_BO_PREP_READ | FD_BO_PREP_NOSYNC | FD_BO_PREP_FLUSH);
|
||||
if (ret)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue