Not all cached buffers can be mapped, so using map with do-not-wait
is a terrible heuristic. Use an explicit buffer busy callback which
is always false, since buffers are only put into the cache once they're
free.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14933>
FREE(mgr);
}
+static boolean
+d3d12_bufmgr_is_buffer_busy(struct pb_manager *_mgr, struct pb_buffer *_buf)
+{
+ /* We're only asked this on buffers that are known not busy */
+ return false;
+}
+
struct pb_manager *
d3d12_bufmgr_create(struct d3d12_screen *screen)
{
mgr->base.destroy = d3d12_bufmgr_destroy;
mgr->base.create_buffer = d3d12_bufmgr_create_buffer;
mgr->base.flush = d3d12_bufmgr_flush;
+ mgr->base.is_buffer_busy = d3d12_bufmgr_is_buffer_busy;
mgr->dev = screen->dev;