Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
52bc687
pvr/g5p: the Apple A8 (T7000) as a third Apple chip on the A9 paths
brkosebay Nov 19, 2026
6b67487
pvr/g5p: A8 PDS DOUT in Rogue's form, A8 end-of-tile PDS info
brkosebay Nov 20, 2026
c0c7cc0
pvr/g5p: drop has_astc from the A8 entry
brkosebay Nov 20, 2026
b48b7f5
pvr/g5p: A8 compute launch and limits, A8 fragment forms from Apple's…
brkosebay Nov 20, 2026
1baabd7
pvr/g5p: the A8 sample, and one workgroup per task for device atomics
brkosebay Nov 20, 2026
307a5f1
pvr/g5p: the A8's colour target words in the fragment stream
brkosebay Nov 20, 2026
d9da980
pvr/g5p: A8 USC offsets from the shared execution base
brkosebay Nov 20, 2026
56ee976
pvr/g5p: the A8's draw control words from AGXMetalA8
brkosebay Nov 20, 2026
a9001d1
pvr/g5p: refuse indirect draws and depth/stencil on the A8 by name
brkosebay Nov 20, 2026
094691d
pvr/g5p: refuse indirect dispatch on the A8 by name
brkosebay Nov 20, 2026
a10d21e
pvr/g5p: depth/stencil on the A8 from the a8-passcap capture
brkosebay Nov 20, 2026
7e0d586
pvr/g5p: the A8's compute records and pass end, as AGXMetalA8's
brkosebay Nov 20, 2026
249879a
pvr/g9p: the A8's compute load/store form and prologue
brkosebay Nov 20, 2026
3b80e3b
pvr/g9p: the A8's 64-bit buffer address from 32-bit adds
brkosebay Nov 20, 2026
b499519
pvr/g9p: the A8's workgroup-ID load and literal shifts
brkosebay Nov 20, 2026
4f4850c
pvr/g5p: the A8's thread-count DMA source on its own line
brkosebay Nov 20, 2026
0a1ba99
pvr/g5p: RGBA16F and RGB10A2 colour targets on the A8
brkosebay Nov 20, 2026
54950fa
pvr/g5p: R8 and RG8 colour targets on the A8
brkosebay Nov 20, 2026
bcc159a
pvr/g5p: two colour targets on the A8
brkosebay Nov 20, 2026
e46ad13
pvr/g5p: A8 integer clamp and byte-pack encoders, RGBA8UI clear program
brkosebay Nov 20, 2026
7ecb8f7
pvr/g5p: RGBA8UI colour target on the A8
brkosebay Nov 20, 2026
0ce0126
pvr/g5p: R32F colour target on the A8; RGBA8UI keeps the identity swi…
brkosebay Nov 20, 2026
f86cf0d
pvr: the A8's region headers as Apple's mirrored ring
brkosebay Nov 20, 2026
b93015f
g9p/g5p: the A8 address build adds the carry's high half
brkosebay Nov 20, 2026
5df8f66
pvr: size the A8 region-header ring as the kernel checks it
brkosebay Nov 20, 2026
ff882d0
pvr: no VM context for the A8's physical-device winsys
brkosebay Nov 21, 2026
555a31b
pvr/g5p: the A8 samples Rogue texture and sampler state
brkosebay Nov 21, 2026
7fad322
pvr/g5p: colour LOAD on the A8 with Apple's load background
brkosebay Nov 21, 2026
0795d97
pvr/g5p: the A8's one-level texture state has no mipmaps_present
brkosebay Nov 21, 2026
f99a17d
pco/g5p: the A8 waits for a texture coordinate before sampling
brkosebay Nov 21, 2026
521325d
pco/g5p: A8 three- and four-component f32 varyings as captured pieces
brkosebay Nov 21, 2026
20973a1
g5p: the A8's 32-bit-result texture sample
brkosebay Nov 21, 2026
9574b91
g5p: vkCmdClearColorImage on the A8 as a render pass with a clear bac…
brkosebay Nov 21, 2026
723ca54
g5p: the A8 sample's sampler field is three bits (byte 6 bits 4-6 are…
brkosebay Nov 21, 2026
5d3a32b
g5p: refuse an odd sampler dword in the A8 sample
brkosebay Nov 21, 2026
295d2c9
g5p: the A8 offers D32F and D32F_S8 depth attachments only
brkosebay Nov 21, 2026
0c979cc
g5p: the A8 twiddles single-level colour images, as Metal does
brkosebay Nov 21, 2026
c2080de
g5p: the A8 keeps vkCmdBlitImage a CPU transfer
brkosebay Nov 21, 2026
8c60b54
g5p: cube maps on the A8, as AGXMetalA8 samples and lays them out
brkosebay Nov 21, 2026
03badf5
g5p: pack PDS words without building a PDS program each time
brkosebay Nov 21, 2026
8f75907
g5p: read PVR_G5P_TEXDIAG once, not for every texture upload of every…
brkosebay Nov 21, 2026
a048e77
zink/g5p: A8 blits without the no-perspective iterator and texel fetch
brkosebay Nov 21, 2026
cd3bafa
g5p: A8 saturation of a varying in the ALU
brkosebay Nov 21, 2026
fbabc80
g5p: the A8 LOADs a linear colour target through its stride texture s…
brkosebay Nov 21, 2026
c564075
g5p: the A9's sample form for the A8's other texture slots
brkosebay Nov 22, 2026
18c15fe
g5p: the A8 samples two to seven images in Apple's form
brkosebay Nov 22, 2026
a5873a0
g5p: the A8's texture slots after the blend colour and storage pointers
brkosebay Nov 22, 2026
77753d6
g5p: name the fields of a texture sample the A8 refuses
brkosebay Nov 22, 2026
d74fea5
pvr: retry submits and binds while the kernel makes a VM resident
brkosebay Nov 22, 2026
53080b3
pvr: mark idle cached suballocator chunks purgeable
brkosebay Nov 22, 2026
bc493c7
pvr: cache enough render target datasets for multipass batches
brkosebay Nov 22, 2026
3aa7ced
pvr/g5p: skip empty tiles in passes without clears or resolves
brkosebay Nov 22, 2026
6ab0f99
pvr: g5p: ask for the largest parameter manager pool
brkosebay Nov 22, 2026
5db1d9c
pvr: report periodic BO summaries and suballocator occupancy
brkosebay Nov 22, 2026
123a89f
zink: add a drawable count override for G5P
brkosebay Nov 22, 2026
ce61600
pvr: keep command buffer uploads apart from device-lifetime allocations
brkosebay Nov 22, 2026
62cb410
pvr: start a suballocator buffer over when nothing references it
brkosebay Nov 22, 2026
1c82a2e
pvr: A8 sizes for the ported A9 memory caches
brkosebay Nov 22, 2026
a30fdc4
pvr/g5p: the A8 keeps ISP_CTL 0 in the fragment stream
brkosebay Nov 22, 2026
96108fc
pvr: bo_log's periodic summary on queue submissions too
brkosebay Nov 22, 2026
361edb5
pvr: bo_log counts the renders that load or store a depth/stencil att…
brkosebay Nov 22, 2026
f968003
g5p: the A8's depth/stencil planes over the ZLS rectangle, extents ro…
brkosebay Nov 22, 2026
bed48db
g5p: the A8 keeps single-level non-power-of-two colour images linear
brkosebay Nov 22, 2026
5d97a6f
pvr: bo_log's depth/stencil summary by attachment size
brkosebay Nov 22, 2026
c29d580
g5p: the A8's varying reads stay on dependent-read counter 0
brkosebay Nov 22, 2026
778377a
g5p: texelFetch on the A8, as Apple's read
brkosebay Nov 22, 2026
8f3b4fc
g5p: vertex-stage textures on the A8, opt-in and not working yet
brkosebay Nov 22, 2026
778ab41
g5p: skip refused work on the A8; print every distinct refusal reason
brkosebay Nov 22, 2026
f487ba7
g5p: uniform texel buffers in the A8's fragment programs
brkosebay Nov 22, 2026
4ed8087
g5p: Apple's explicit-level sample on the A8, for vertex textures and…
brkosebay Nov 22, 2026
d782c36
g5p: the A8's vertex textures in Apple's captured vertex form (opt-in)
brkosebay Nov 22, 2026
e4483ba
g5p: integer subtract, division and remainder on the A8
brkosebay Nov 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions include/drm-uapi/pvr_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,26 @@ struct drm_pvr_obj_array {
#define DRM_IOCTL_PVR_DESTROY_HWRT_DATASET PVR_IOCTL(0x0c, DRM_IOW, destroy_hwrt_dataset)
#define DRM_IOCTL_PVR_SUBMIT_JOBS PVR_IOCTL(0x0d, DRM_IOW, submit_jobs)

/* Proposed BO_MADVISE UAPI: replace with the merged kernel header. */
#define DRM_IOCTL_PVR_BO_MADVISE PVR_IOCTL(0x0e, DRM_IOWR, bo_madvise)

#define DRM_PVR_MADV_WILLNEED 0
#define DRM_PVR_MADV_DONTNEED 1

/**
* struct drm_pvr_ioctl_bo_madvise_args - Mark an idle BO's contents purgeable
* @handle: GEM handle.
* @madv: DRM_PVR_MADV_WILLNEED or DRM_PVR_MADV_DONTNEED.
* @retained: Output, zero if purged; the caller must free and replace the BO.
* @_pad: Reserved, must be zero.
*/
struct drm_pvr_ioctl_bo_madvise_args {
__u32 handle;
__u32 madv;
__u32 retained;
__u32 _pad;
};

/**
* DOC: PowerVR IOCTL DEV_QUERY interface
*/
Expand Down Expand Up @@ -440,6 +460,13 @@ struct drm_pvr_dev_query_static_data_areas {
*
* Append only. Do not reorder.
*/
/* Proposed capability query UAPI: replace with the merged kernel header. */
#define DRM_PVR_CAP_RETRY_ENOMEM (1ULL << 0)
#define DRM_PVR_CAP_BO_MADVISE (1ULL << 1)
struct drm_pvr_dev_query_caps {
__u64 caps;
};

enum drm_pvr_dev_query {
/**
* @DRM_PVR_DEV_QUERY_GPU_INFO_GET: The dev query args contain a pointer
Expand Down Expand Up @@ -476,6 +503,7 @@ enum drm_pvr_dev_query {
* a pointer to &struct drm_pvr_dev_query_static_data_areas.
*/
DRM_PVR_DEV_QUERY_STATIC_DATA_AREAS_GET,
DRM_PVR_DEV_QUERY_CAPS_GET,
};

/**
Expand Down
10 changes: 9 additions & 1 deletion src/gallium/auxiliary/util/u_blitter.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ struct blitter_context_priv
bool has_stencil_export;
bool has_texture_multisample;
bool has_txf_txq;
bool blit_no_txf; /* util_blitter_set_txf(): single-sample blits sample, never fetch */
bool has_sample_shading;
bool cube_as_2darray;
bool has_texrect;
Expand Down Expand Up @@ -551,6 +552,13 @@ void util_blitter_set_texture_multisample(struct blitter_context *blitter,
ctx->has_texture_multisample = supported;
}

void util_blitter_set_txf(struct blitter_context *blitter, bool supported)
{
struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;

ctx->blit_no_txf = !supported;
}

void util_blitter_set_running_flag(struct blitter_context *blitter)
{
if (blitter->running) {
Expand Down Expand Up @@ -2038,7 +2046,7 @@ bool util_blitter_blit_with_txf(struct blitter_context *blitter,
bool use_txf = false;

/* Don't support scaled blits. The TXF shader uses F2I for rounding. */
if (ctx->has_txf_txq &&
if (ctx->has_txf_txq && !ctx->blit_no_txf &&
!is_scaled &&
filter == PIPE_TEX_FILTER_NEAREST &&
src->target != PIPE_TEXTURE_CUBE &&
Expand Down
7 changes: 7 additions & 0 deletions src/gallium/auxiliary/util/u_blitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@ struct pipe_context *util_blitter_get_pipe(struct blitter_context *blitter)
void util_blitter_set_texture_multisample(struct blitter_context *blitter,
bool supported);

/**
* Override whether single-sample blits may fetch texels (TXF) instead of
* sampling with NEAREST filtering, for a driver whose texel fetch is slower
* or missing. Multisample sources always fetch.
*/
void util_blitter_set_txf(struct blitter_context *blitter, bool supported);

/* The default function to draw a rectangle. This can only be used
* inside of the draw_rectangle callback if the driver overrides it. */
void util_blitter_draw_rectangle(struct blitter_context *blitter,
Expand Down
4 changes: 4 additions & 0 deletions src/gallium/drivers/zink/zink_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -6361,6 +6361,10 @@ zink_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
if (!ctx->blitter)
goto fail;
ctx->blitter->use_single_triangle = screen->driver_workarounds.inconsistent_interpolation;
/* the A8 (G5P): a 1:1 blit samples NEAREST at texel centres, the same texels a fetch reads; the A8's
* texel fetch is not captured, so a fetching blit shader is refused (glReadPixels of an XRGB8888 buffer) */
if (screen->is_g5p_a8)
util_blitter_set_txf(ctx->blitter, false);
}

zink_set_last_vertex_key(ctx)->last_vertex_stage = true;
Expand Down
11 changes: 11 additions & 0 deletions src/gallium/drivers/zink/zink_kopper.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@
*/

#include "util/detect_os.h"
#include "util/u_debug.h"

#include "zink_context.h"
#include "zink_screen.h"
#include "zink_surface.h"
#include "zink_resource.h"
#include "zink_kopper.h"

DEBUG_GET_ONCE_NUM_OPTION(g5p_swapchain_images, "PVR_G5P_SWAPCHAIN_IMAGES", 0)

static void
zink_kopper_set_present_mode_for_interval(struct kopper_displaytarget *cdt, int interval)
{
Expand Down Expand Up @@ -326,6 +329,14 @@ kopper_CreateSwapchain(struct zink_screen *screen, struct kopper_displaytarget *
*/
if (screen->frames_in_flight > 1) {
uint32_t want = MAX2(cswap->scci.minImageCount, screen->frames_in_flight + 2);
if (screen->is_g5p) {
/* A/B knob for the drawable count (CAMetalLayer defaults to 3).
* Keep the default rule until measurements decide the image count.
*/
const int64_t images = debug_get_option_g5p_swapchain_images();
if (images >= 2 && images <= 8)
want = MAX2(cswap->scci.minImageCount, (uint32_t)images);
}
if (cdt->caps.maxImageCount)
want = MIN2(want, cdt->caps.maxImageCount);
cswap->scci.minImageCount = want;
Expand Down
6 changes: 6 additions & 0 deletions src/gallium/drivers/zink/zink_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,11 @@ zink_init_screen_caps(struct zink_screen *screen)

u_init_pipe_screen_caps(&screen->base, screen->is_cpu ? 0 : 1);
caps->r11g11b10f_requires_color_buffer_float = screen->is_g5p;
/* The A8 (G5P): u_blitter's texture-fetch shaders iterate their coordinate with perspective. Its quads have
* w = 1 at every vertex, where perspective-correct and screen-linear interpolation give the same value (the
* 1/w plane is the constant 1.0). The A8 has no captured no-perspective iterator, and a refused blit shader
* failed every glReadPixels from an XRGB8888 (BGRX) buffer: the desktop's GPU probe. */
caps->prefer_persp = screen->is_g5p_a8;
caps->throttle_frames = screen->frames_in_flight;

/* Vulkan spec says the builtins count, so make GL count them towards
Expand Down Expand Up @@ -3889,6 +3894,7 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
/* Apple A9 (G5P, the PowerVR Vulkan driver): its memory, synchronization and lost-device handling */
screen->is_g5p = screen->info.driver_props.driverID == VK_DRIVER_ID_IMAGINATION_OPEN_SOURCE_MESA &&
!strcmp(screen->info.driver_props.driverName, "Mesa PowerVR G5P");
screen->is_g5p_a8 = screen->is_g5p && !strcmp(screen->info.props.deviceName, "PowerVR Apple A8");
screen->precise_sync = screen->is_g5p;
screen->frames_in_flight = zink_default_frames_in_flight(screen->info.driver_props.driverID);

Expand Down
1 change: 1 addition & 0 deletions src/gallium/drivers/zink/zink_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1506,6 +1506,7 @@ struct zink_screen {
unsigned frames_in_flight; /* pipe_caps.throttle_frames */
bool precise_sync;
bool is_g5p;
bool is_g5p_a8; /* the A8 on the G5P driver: no texel fetch (its form is not captured) */

const char *vendor_name;
const char *device_name;
Expand Down
127 changes: 127 additions & 0 deletions src/imagination/common/device_info/apple-a8.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
/*
* SPDX-License-Identifier: MIT
*/

/*
* Apple A8 GPU (T7000, iPod touch 6, iPhone 6, iPad mini 4): a PowerVR
* Rogue 6XT core (GX6450) run by Apple's own firmware (AGXG4P, firmware
* g4p_b0). BVNC 3.10.4.5 as the kernel decodes the legacy CORE_REVISION
* (0x00030a00, measured on an iPod touch 6 under Linux) and CORE_ID
* (0x011b0405) registers, the same rule that gives 9.15.6.2 for the A9 and
* 13.10.6.2 for the A10. Apple's kext also accepts minor 8; no entry is made
* for it until a device reports it.
*
* The A8 takes the A9's paths of the driver (has_apple_g5p): the same
* firmware family and job protocol, Rogue CDM control streams of seven words
* (A10: eight), and a shader ISA of the same Apple family. Apple's LLVM
* backend for these GPUs defines "g4", "g5" and "g9" instruction sets, the
* A8 (g4p) being the base the A9 (g5p) adds to. has_apple_g4p marks where
* the A8 differs from the A9. See g5p/README.md, "The A8".
*
* Values marked "A8" are established on the hardware or from Apple's
* drivers; the others are the A9 entry's placeholders (apple-a9.h) and are
* not verified for this GPU.
*/

#ifndef APPLE_A8_H
#define APPLE_A8_H

#include <stdbool.h>

#include "pvr_device_info.h"

#define PVR_DEVICE_IDENT_3_V_4_5 \
.device_id = 0x7000, .series_name = "Apple", \
.public_name = "A8", .arch = PVR_DEVICE_ARCH_ROGUE

static const struct pvr_device_features pvr_device_features_3_V_4_5 = {
.has_apple_g5p = true,
.has_apple_g4p = true,
.has_apple_compute_dispatch = true,
/* A8: AGXMetalA8 (iOS 12.4) ComputeProgramVariant constructor
* (0x1a13eb034) -> +0x790, what -[AGXA8ComputePipeline
* maxTotalThreadsPerThreadgroup] (0x1a13c5028) returns:
* min(32 * floor((3585 - a) / a), 262144 / b), a = (4t + 28) & ~31,
* b = (64f + 448) & ~511, at most 512 and a multiple of 32; the A9's
* routine is the same with 3329 and 393216. threadExecutionWidth is 32
* (0x1a13c5020). The shared formula's bank-1 term keeps one task in
* reserve (pvr_compute_limits.h), below Apple's for both chips.
*/
.apple_compute_dispatch = {
.bank0_budget = 3585U,
.bank1_budget = 262144U,
.register_granularity = 8U,
.bank0_scale = 4U,
.bank0_rounding_bias = 28U,
.bank0_granularity = 32U,
.bank1_scale = 64U,
.bank1_rounding_bias = 448U,
.bank1_granularity = 512U,
.task_size = 32U,
.max_workgroup_size = 512U,
},
.has_num_clusters = true, /* A8 */

/* A9 placeholders (apple-a9.h) */
.has_tile_size_x = true,
.has_tile_size_y = true,
.has_cluster_grouping = true,
.has_common_store_size_in_dwords = true,
.has_isp_max_tiles_in_flight = true,
.has_isp_samples_per_pixel = true,
.has_max_instances_per_pds_task = true,
.has_max_multisample = true,
.has_max_partitions = true,
.has_max_usc_tasks = true,
.has_num_raster_pipes = true,
.has_slc_cache_line_size_bits = true,
.has_slc_mcu_cache_controls = true,
.has_unified_store_depth = true,
.has_usc_min_output_registers_per_pix = true,
.has_usc_slots = true,
.has_uvs_banks = true,
.has_uvs_pba_entries = true,
.has_uvs_vtx_entries = true,
.has_vdm_cam_size = true,
.has_xt_top_infrastructure = true,

.num_clusters = 4U, /* A8: CORE_ID N = 4; firmware chip info {2, 4, 0, 4} */

.tile_size_x = 32U, /* Rogue 6XT (gx6250.h); A8 unverified */
.tile_size_y = 32U,
.common_store_size_in_dwords = 1280U * 4U * 4U,
.isp_max_tiles_in_flight = 8U,
.isp_samples_per_pixel = 2U,
.max_instances_per_pds_task = 32U,
.max_multisample = 8U,
.max_partitions = 8U,
.max_usc_tasks = 56U,
.num_raster_pipes = 2U,
.slc_cache_line_size_bits = 512U,
.unified_store_depth = 256U,
.usc_min_output_registers_per_pix = 2U,
.usc_slots = 32U,
.uvs_banks = 8U,
.uvs_pba_entries = 320U,
.uvs_vtx_entries = 288U,
.vdm_cam_size = 256U,
};

static const struct pvr_device_enhancements pvr_device_enhancements_3_10_4_5 = { 0 };

static const struct pvr_device_quirks pvr_device_quirks_3_10_4_5 = { 0 };

static const struct pvr_device_info pvr_device_info_3_10_4_5 = {
.ident = {
PVR_DEVICE_IDENT_3_V_4_5,
.b = 3,
.v = 10,
.n = 4,
.c = 5,
},
.features = pvr_device_features_3_V_4_5,
.enhancements = pvr_device_enhancements_3_10_4_5,
.quirks = pvr_device_quirks_3_10_4_5,
};

#endif /* APPLE_A8_H */
2 changes: 2 additions & 0 deletions src/imagination/common/pvr_device_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "device_info/bxs-4-64.h"
#include "device_info/apple-a10.h"
#include "device_info/apple-a9.h"
#include "device_info/apple-a8.h"

#include "util/u_string.h"

Expand Down Expand Up @@ -84,6 +85,7 @@ int pvr_device_info_init(struct pvr_device_info *info, uint64_t bvnc)
return 0

switch (bvnc) {
CASE_PACKED_BVNC_DEVICE_INFO(3, 10, 4, 5);
CASE_PACKED_BVNC_DEVICE_INFO(4, 40, 2, 51);
CASE_PACKED_BVNC_DEVICE_INFO(4, 45, 2, 58);
CASE_PACKED_BVNC_DEVICE_INFO(4, 46, 6, 62);
Expand Down
6 changes: 6 additions & 0 deletions src/imagination/common/pvr_device_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,12 @@ struct pvr_device_features {
*/
bool has_apple_g5p : 1;

/*
* Apple A8 GPU (G4P): set together with has_apple_g5p by the A8 entry,
* which takes the A9's paths; marks where the A8 differs from the A9.
*/
bool has_apple_g4p : 1;

/* Only set where Apple's compute residency parameters are established. */
bool has_apple_compute_dispatch : 1;
struct pvr_apple_compute_dispatch_limits apple_compute_dispatch;
Expand Down
37 changes: 37 additions & 0 deletions src/imagination/g5p/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,43 @@ its A9 mode (`g9p/g9p_a9*.h`).
None of this is proposed upstream. It was written by AI agents (every commit
carries `Generated-by: LLM`).

## The A8

The Apple A8's GPU (T7000, BVNC 3.10.4.5, `common/device_info/apple-a8.h`)
takes these paths too: its entry sets `apple_g5p` and `apple_g4p`. The
evidence for sharing them:

- Apple's LLVM backend for these GPUs (`libLLVM.dylib`, iOS 16) has one
processor table with `g4p-b1` (A8), `g5p-b0` (A9) and `g9p-a0`/`g9p-b0`
(A10), and the features "Enable G4 instructions", "Enable G5
instructions" and "Enable G9 instructions". The A8 is the base set; the
A9 adds to it. The A8 has its own scheduling model, the A9 and A10 share
one.
- On an A8 (iPadOS 15) Metal's compute kernels end the A10 way (`0x8000` at
a 64-byte boundary after `0xc000` padding), its empty kernel is the A10's,
and its CDM control stream has the seven-word records this driver writes
for the A9 (`g5p_cdm.h`).

Where the A8 is known to differ, `apple_g4p` selects its form:

- PDS programs encode DOUT the Rogue way, not in Apple's extended form
(`PVR_G5P_PDS_FEATURES()`, `vulkan/pvr_g5p.h`): Metal's compute PDS
programs on an A8 decode to the A10's operands in Rogue's field layout.
- The end of tile's EVENT_PIXEL_PDS_INFO counts the USC shared size in
Rogue's unit: 0x202 for one target on the A8, 0x402 on the A9
(`g5p_mrt_eot_info_g4p()`).

- Compute: Apple's A8 residency limits (`apple-a8.h`), the PDS in Rogue's
layout (`G5P_PDS_DOUT()`), the kernel launch and KERNEL8 max_instances
as AGXMetalA8 builds them (`pvr_arch_g5p_compute.c`, `g5p_cdm.h`).
- USC (`g5p_usc_g4p`, from Apple's A8 compiler output): the long emitpix,
the A8 varying iterator, the A8 end of tile (`1e010070`, fed the target's
address); the background program is the A9's.

Where the A8 differs and this driver has no A8 form yet, it refuses by
name: texture samples other than the narrow implicit-LOD 2D one (`sample_g4p()`),
several colour targets, integer targets, 4x, LOAD.

## Origin

The A9 driver is Berkay Kösebay's: the shader backend, the state packing, the
Expand Down
Loading
Loading