From 1a906072db5f4d3227f0bd2417754849c40adb23 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 30 Jan 2023 20:11:47 -0600 Subject: [PATCH] nvk/buffer: Add a push_buffer_ref helper Part-of: --- src/nouveau/vulkan/nvk_buffer.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/nouveau/vulkan/nvk_buffer.h b/src/nouveau/vulkan/nvk_buffer.h index 4043705..9120fe3 100644 --- a/src/nouveau/vulkan/nvk_buffer.h +++ b/src/nouveau/vulkan/nvk_buffer.h @@ -5,6 +5,7 @@ #include "nvk_device_memory.h" #include "nouveau_bo.h" +#include "nouveau_push.h" #include "vulkan/runtime/vk_buffer.h" struct nvk_device_memory; @@ -17,6 +18,14 @@ struct nvk_buffer { VK_DEFINE_HANDLE_CASTS(nvk_buffer, vk.base, VkBuffer, VK_OBJECT_TYPE_BUFFER) +static void +nvk_push_buffer_ref(struct nouveau_ws_push *push, + const struct nvk_buffer *buffer, + enum nouveau_ws_bo_map_flags flags) +{ + nouveau_ws_push_ref(push, buffer->mem->bo, flags); +} + static inline uint64_t nvk_buffer_address(struct nvk_buffer *buffer, uint64_t offset) { -- 2.7.4