mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-22 04:28:10 +02:00
Texel buffers are currently described by a TextureDescriptor, which leads to restrictive limits on size and alignment. These limits can be avoided by using AttributeDescriptors + AttributeBufferDescriptors instead. This requires us to access texel buffers using attributes rather than textures, which involves setting up AttributeDescriptors and AttributeBufferDescriptors in their respective allocations, rather than the previous TextureDescriptors in the texture allocation. This is already done for images, so we simply place the texel buffer attributes after the images and ensure the indexing if offset correctly. Accessing a texel buffer thus becomes: 1. Get the buffer address and ConversionDescriptor with LEA_ATTR[_IMM] 2. Use LD_CVT to get the value Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38490>
37 lines
692 B
C
37 lines
692 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 {
|
|
#if PAN_ARCH >= 9
|
|
struct mali_buffer_packed buf;
|
|
#else
|
|
struct mali_attribute_buffer_packed attrib_buf;
|
|
struct mali_attribute_packed attrib;
|
|
#endif
|
|
} descs;
|
|
};
|
|
|
|
VK_DEFINE_NONDISP_HANDLE_CASTS(panvk_buffer_view, vk.base, VkBufferView,
|
|
VK_OBJECT_TYPE_BUFFER_VIEW)
|
|
|
|
#endif
|