mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 05:28:05 +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 a BufferDescriptor instead. This requires first embedding a ConversionDescriptor into some of the currently empty space of the BufferDescriptor, and modifying the compiler so that instead of outputting TEX_FETCH, it will: 1. Load the ConversionDescriptor with LD_PKA 2. Get the buffer address with LEA_BUF[_IMM] 3. Use LD_CVT to get the value Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
105 lines
4.2 KiB
C
105 lines
4.2 KiB
C
/*
|
|
* Copyright (C) 2008 VMware, Inc.
|
|
* Copyright (C) 2014 Broadcom
|
|
* Copyright (C) 2018-2019 Alyssa Rosenzweig
|
|
* Copyright (C) 2019-2020 Collabora, Ltd.
|
|
* Copyright (C) 2025 Arm Ltd.
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
* to deal in the Software without restriction, including without limitation
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice (including the next
|
|
* paragraph) shall be included in all copies or substantial portions of the
|
|
* Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*
|
|
*/
|
|
|
|
#ifndef __PAN_TEXTURE_H
|
|
#define __PAN_TEXTURE_H
|
|
|
|
#ifndef PAN_ARCH
|
|
#error "PAN_ARCH must be defined"
|
|
#endif
|
|
|
|
#include "pan_image.h"
|
|
|
|
struct pan_ptr;
|
|
struct mali_texture_packed;
|
|
struct mali_buffer_packed;
|
|
struct pan_buffer_view;
|
|
|
|
#if PAN_ARCH >= 7
|
|
void GENX(pan_texture_swizzle_replicate_x)(struct pan_image_view *iview);
|
|
#endif
|
|
|
|
#if PAN_ARCH == 7
|
|
void GENX(pan_texture_afbc_reswizzle)(struct pan_image_view *iview);
|
|
#endif
|
|
|
|
unsigned
|
|
GENX(pan_texture_estimate_payload_size)(const struct pan_image_view *iview);
|
|
|
|
void GENX(pan_sampled_texture_emit)(const struct pan_image_view *iview,
|
|
struct mali_texture_packed *out,
|
|
const struct pan_ptr *payload);
|
|
|
|
void GENX(pan_tex_emit_linear_payload_entry)(const struct pan_image_view *iview,
|
|
unsigned mip_level,
|
|
unsigned layer_or_z_slice,
|
|
unsigned sample, void **payload);
|
|
|
|
void GENX(pan_tex_emit_u_tiled_payload_entry)(
|
|
const struct pan_image_view *iview, unsigned mip_level,
|
|
unsigned layer_or_z_slice, unsigned sample, void **payload);
|
|
|
|
void
|
|
GENX(pan_tex_emit_afbc_payload_entry)(const struct pan_image_view *iview,
|
|
unsigned mip_level, unsigned layer_or_z_slice,
|
|
unsigned sample, void **payload);
|
|
|
|
#if PAN_ARCH >= 9
|
|
void GENX(pan_storage_texture_emit)(const struct pan_image_view *iview,
|
|
struct mali_texture_packed *out,
|
|
const struct pan_ptr *payload);
|
|
#endif
|
|
|
|
void GENX(pan_tex_emit_linear_payload_entry)(const struct pan_image_view *iview,
|
|
unsigned mip_level,
|
|
unsigned layer_or_z_slice,
|
|
unsigned sample, void **payload);
|
|
void GENX(pan_tex_emit_u_tiled_payload_entry)(
|
|
const struct pan_image_view *iview, unsigned mip_level,
|
|
unsigned layer_or_z_slice, unsigned sample, void **payload);
|
|
void GENX(pan_tex_emit_afbc_payload_entry)(const struct pan_image_view *iview,
|
|
unsigned mip_level,
|
|
unsigned layer_or_z_slice,
|
|
unsigned sample, void **payload);
|
|
|
|
#if PAN_ARCH >= 10
|
|
void GENX(pan_tex_emit_afrc_payload_entry)(
|
|
const struct pan_image_view *iview, unsigned mip_level,
|
|
unsigned layer_or_z_slice, unsigned sample, void **payload);
|
|
#endif
|
|
|
|
#if PAN_ARCH >= 9
|
|
void GENX(pan_buffer_texture_emit)(const struct pan_buffer_view *bview,
|
|
struct mali_buffer_packed *out);
|
|
#else
|
|
void GENX(pan_buffer_texture_emit)(const struct pan_buffer_view *bview,
|
|
struct mali_texture_packed *out,
|
|
const struct pan_ptr *payload);
|
|
#endif
|
|
|
|
#endif
|