mesa/src/panfrost/vulkan/panvk_device_memory.h
Boris Brezillon c257bf5142 panvk: Conditionally register an host address when tracking user memory
When PANVK_DEBUG=dump, all internal buffers get dumped, but not the user
ones, because they don't have a host address attached to them. Let's
register one when mappings dump is enabled.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:39:00 +00:00

33 lines
666 B
C

/*
* Copyright © 2021 Collabora Ltd.
* SPDX-License-Identifier: MIT
*/
#ifndef PANVK_DEVICE_MEMORY_H
#define PANVK_DEVICE_MEMORY_H
#include <stdint.h>
#include "vk_device_memory.h"
struct panvk_priv_bo;
struct panvk_device_memory {
struct vk_device_memory vk;
struct pan_kmod_bo *bo;
struct {
uint64_t dev;
void *host;
} addr;
struct {
/* Don't use this pointer, it's only to have user memory dumped when
* PANVK_DEBUG=dump. */
void *host_mapping;
} debug;
};
VK_DEFINE_NONDISP_HANDLE_CASTS(panvk_device_memory, vk.base, VkDeviceMemory,
VK_OBJECT_TYPE_DEVICE_MEMORY)
#endif