| 1 |
/* |
| 2 |
* Copyright (C) 2008 VMware, Inc. |
| 3 |
* Copyright (C) 2014 Broadcom |
| 4 |
* Copyright (C) 2018-2019 Alyssa Rosenzweig |
| 5 |
* Copyright (C) 2019-2020 Collabora, Ltd. |
| 6 |
* Copyright (C) 2025 Arm Ltd. |
| 7 |
* SPDX-License-Identifier: MIT |
| 8 |
*/ |
| 9 |
|
| 10 |
#ifndef __PAN_TEXTURE_H |
| 11 |
#define __PAN_TEXTURE_H |
| 12 |
|
| 13 |
#ifndef PAN_ARCH |
| 14 |
#error "PAN_ARCH must be defined" |
| 15 |
#endif |
| 16 |
|
| 17 |
#include "pan_image.h" |
| 18 |
|
| 19 |
struct pan_ptr; |
| 20 |
struct mali_texture_packed; |
| 21 |
|
| 22 |
#if PAN_ARCH >= 7 |
| 23 |
void GENX(pan_texture_swizzle_replicate_x)(struct pan_image_view *iview); |
| 24 |
#endif |
| 25 |
|
| 26 |
#if PAN_ARCH == 7 |
| 27 |
void GENX(pan_texture_afbc_reswizzle)(struct pan_image_view *iview); |
| 28 |
#endif |
| 29 |
|
| 30 |
unsigned |
| 31 |
GENX(pan_texture_estimate_payload_size)(const struct pan_image_view *iview); |
| 32 |
|
| 33 |
void GENX(pan_sampled_texture_emit)(const struct pan_image_view *iview, |
| 34 |
struct mali_texture_packed *out, |
| 35 |
const struct pan_ptr *payload); |
| 36 |
|
| 37 |
void GENX(pan_tex_emit_linear_payload_entry)(const struct pan_image_view *iview, |
| 38 |
unsigned mip_level, |
| 39 |
unsigned layer_or_z_slice, |
| 40 |
unsigned sample, void **payload); |
| 41 |
|
| 42 |
void GENX(pan_tex_emit_u_tiled_payload_entry)( |
| 43 |
const struct pan_image_view *iview, unsigned mip_level, |
| 44 |
unsigned layer_or_z_slice, unsigned sample, void **payload); |
| 45 |
|
| 46 |
void |
| 47 |
GENX(pan_tex_emit_afbc_payload_entry)(const struct pan_image_view *iview, |
| 48 |
unsigned mip_level, unsigned layer_or_z_slice, |
| 49 |
unsigned sample, void **payload); |
| 50 |
|
| 51 |
#if PAN_ARCH >= 9 |
| 52 |
void GENX(pan_storage_texture_emit)(const struct pan_image_view *iview, |
| 53 |
struct mali_texture_packed *out, |
| 54 |
const struct pan_ptr *payload); |
| 55 |
#endif |
| 56 |
|
| 57 |
void GENX(pan_tex_emit_linear_payload_entry)(const struct pan_image_view *iview, |
| 58 |
unsigned mip_level, |
| 59 |
unsigned layer_or_z_slice, |
| 60 |
unsigned sample, void **payload); |
| 61 |
void GENX(pan_tex_emit_u_tiled_payload_entry)( |
| 62 |
const struct pan_image_view *iview, unsigned mip_level, |
| 63 |
unsigned layer_or_z_slice, unsigned sample, void **payload); |
| 64 |
void GENX(pan_tex_emit_afbc_payload_entry)(const struct pan_image_view *iview, |
| 65 |
unsigned mip_level, |
| 66 |
unsigned layer_or_z_slice, |
| 67 |
unsigned sample, void **payload); |
| 68 |
|
| 69 |
#if PAN_ARCH >= 10 |
| 70 |
void GENX(pan_tex_emit_interleaved_64k_payload_entry)( |
| 71 |
const struct pan_image_view *iview, unsigned mip_level, |
| 72 |
unsigned layer_or_z_slice, unsigned sample, void **payload); |
| 73 |
|
| 74 |
void GENX(pan_tex_emit_afrc_payload_entry)( |
| 75 |
const struct pan_image_view *iview, unsigned mip_level, |
| 76 |
unsigned layer_or_z_slice, unsigned sample, void **payload); |
| 77 |
#endif |
| 78 |
|
| 79 |
#endif |