mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-21 17:38:08 +02:00
Some panvk objects need to allocate GPU memory but don't have Pool objects to get this memory from. Use device-wide mempools with .owns_bos=false, such that small allocations don't have to pay the 4k granularity price of private BO allocations. 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/29161>
38 lines
758 B
C
38 lines
758 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;
|
|
struct panvk_priv_mem mem;
|
|
|
|
struct {
|
|
struct mali_texture_packed tex;
|
|
|
|
#if PAN_ARCH <= 7
|
|
/* Valhall passes a texture descriptor to the LEA_TEX instruction. */
|
|
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
|