mesa/src/panfrost/vulkan/panvk_buffer_view.h
Boris Brezillon c9e94f92a0 panvk: Don't allocate memory for a buffer descriptor in CreateBufferView()
The buffer descriptor is copied to the descriptor set, and there's no
side-band data to allocate in GPU memory.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00

43 lines
821 B
C

/*
* Copyright © 2021 Collabora Ltd.
* SPDX-License-Identifier: MIT
*/
#ifndef PANVK_BUFFER_VIEW_H
#define PANVK_BUFFER_VIEW_H
#ifndef PAN_ARCH
#error "PAN_ARCH must be defined"
#endif
#include <stdint.h>
#include "panvk_mempool.h"
#include "vk_buffer_view.h"
#include "genxml/gen_macros.h"
struct panvk_buffer_view {
struct vk_buffer_view vk;
#if PAN_ARCH < 9
struct panvk_priv_mem mem;
#endif
struct {
#if PAN_ARCH >= 9
struct mali_buffer_packed buf;
#else
/* TODO: move Bifrost over to using BufferDescriptor as well. */
struct mali_texture_packed tex;
struct mali_attribute_buffer_packed img_attrib_buf[2];
#endif
} descs;
};
VK_DEFINE_NONDISP_HANDLE_CASTS(panvk_buffer_view, vk.base, VkBufferView,
VK_OBJECT_TYPE_BUFFER_VIEW)
#endif