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>
#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:
}
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;
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;