nvk/image: Add image address helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
committed by
Marge Bot
parent
1f42ab6f30
commit
13dca99623
@@ -2,7 +2,10 @@
|
||||
#define NVK_IMAGE_H 1
|
||||
|
||||
#include "nvk_private.h"
|
||||
#include "nvk_device_memory.h"
|
||||
|
||||
#include "nouveau_bo.h"
|
||||
#include "nouveau_push.h"
|
||||
#include "vulkan/runtime/vk_image.h"
|
||||
|
||||
/* x can either be 0x0 or 0xe
|
||||
@@ -39,4 +42,18 @@ struct nvk_image {
|
||||
|
||||
VK_DEFINE_HANDLE_CASTS(nvk_image, vk.base, VkImage, VK_OBJECT_TYPE_IMAGE)
|
||||
|
||||
static void
|
||||
nvk_push_image_ref(struct nouveau_ws_push *push,
|
||||
const struct nvk_image *image,
|
||||
enum nouveau_ws_bo_map_flags flags)
|
||||
{
|
||||
nouveau_ws_push_ref(push, image->mem->bo, flags);
|
||||
}
|
||||
|
||||
static inline uint64_t
|
||||
nvk_image_base_address(struct nvk_image *image)
|
||||
{
|
||||
return image->mem->bo->offset + image->offset;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user