diff --git a/src/asahi/lib/agx_chip.h b/src/asahi/lib/agx_chip.h index c814e3c5b2cc..f31d38fd70e7 100644 --- a/src/asahi/lib/agx_chip.h +++ b/src/asahi/lib/agx_chip.h @@ -244,7 +244,7 @@ enum agx_chip_quirk { /* What the five native AGX3 chips share. */ #define AGX_QUIRKS_NATIVE \ (AGX_QUIRK_NATIVE_INDIRECT_COMPUTE | AGX_QUIRK_NATIVE_IMAGEBLOCK | \ - AGX_QUIRK_UNCOVERED_TILE_MS_DEFECT) + AGX_QUIRK_UNCOVERED_TILE_MS_DEFECT | AGX_QUIRK_VDM_INDIRECT_INDEX_BOUNDS) /* The native chips that are not G17P: G15G, G15S, G15C and G16G. */ #define AGX_QUIRKS_NATIVE_PRE_G17 \ @@ -254,8 +254,7 @@ enum agx_chip_quirk { (AGX_QUIRKS_NATIVE | AGX_QUIRK_NATIVE_RENDER_CONTEXT | \ AGX_QUIRK_USC_HELPER_SLOT_PER_CORE | \ AGX_QUIRK_TRI_MERGE_ACROSS_SIDE_EFFECTS | \ - AGX_QUIRK_IMAGE_LOAD_MISSES_OWN_STORE | AGX_QUIRK_NATIVE_PREAMBLE | \ - AGX_QUIRK_VDM_INDIRECT_INDEX_BOUNDS) + AGX_QUIRK_IMAGE_LOAD_MISSES_OWN_STORE | AGX_QUIRK_NATIVE_PREAMBLE) /* * The chip table: one row per chip, and the only place that says what a chip @@ -333,7 +332,8 @@ enum agx_chip_quirk { __VA_ARGS__) \ X(G16G, AGX3, AGX3B, HAL200, 9, GEN4_HAL200, GPU0, CLASSIC, NATIVE_AGX3, \ AGX_RECORDS_G15_G17 | AGX_RECORD_CDM_BARRIER_WIDE_VISIBILITY, \ - AGX_QUIRKS_NATIVE_PRE_G17 | AGX_QUIRK_NATIVE_PREAMBLE, __VA_ARGS__) \ + AGX_QUIRKS_NATIVE_PRE_G17 | AGX_QUIRK_NATIVE_PREAMBLE | \ + AGX_QUIRK_TRI_MERGE_ACROSS_SIDE_EFFECTS, __VA_ARGS__) \ X(G16S, AGX3, AGX3B, HAL200, 9, GEN4_HAL200, GPU0, DUAL, NONE, \ AGX_RECORDS_G15_G17, 0, __VA_ARGS__) \ X(G16C, AGX3, AGX3B, HAL200, 9, GEN4_HAL200, GPU0, DUAL, NONE, \ diff --git a/src/asahi/lib/agx_chip_caps.h b/src/asahi/lib/agx_chip_caps.h index 8dddf90c0ccb..c887eb376644 100644 --- a/src/asahi/lib/agx_chip_caps.h +++ b/src/asahi/lib/agx_chip_caps.h @@ -247,16 +247,15 @@ enum agx_chip_cap { /* What the five native AGX3 chips (G15G, G15S, G15C, G16G, G17P) share. */ #define AGX_CAPS_NATIVE \ (AGX_CAP_NATIVE_INDIRECT_COMPUTE | AGX_CAP_NATIVE_IMAGEBLOCK | \ - AGX_CAP_ELIDE_APP_DISPATCH_BARRIER | AGX_CAP_COOPERATIVE_MATRIX | \ - AGX_CAP_DESCRIPTOR_BUFFER | AGX_CAP_MOD3_REG_BANK_RA | \ - AGX_CAP_SIGNED_ZERO_MINMAX_SELECT) + AGX_CAP_ELIDE_APP_DISPATCH_BARRIER | AGX_CAP_VDM_INDIRECT_INDEX_BOUNDS | \ + AGX_CAP_COOPERATIVE_MATRIX | AGX_CAP_DESCRIPTOR_BUFFER | \ + AGX_CAP_COALESCE_PURE_GLOBAL_WORKGROUPS | AGX_CAP_CDM_WAR_WEAK_BARRIER | \ + AGX_CAP_MOD3_REG_BANK_RA | AGX_CAP_SIGNED_ZERO_MINMAX_SELECT) #define AGX_CAPS_G17P \ (AGX_CAPS_NATIVE | AGX_CAP_NATIVE_PREAMBLE | \ - AGX_CAP_VDM_INDIRECT_INDEX_BOUNDS | \ AGX_CAP_TRI_MERGE_ACROSS_SIDE_EFFECTS | AGX_CAP_SPARSE_BINDING | \ - AGX_CAP_SPARSE_RESIDENCY_3D | AGX_CAP_COALESCE_PURE_GLOBAL_WORKGROUPS | \ - AGX_CAP_CDM_WAR_WEAK_BARRIER | AGX_CAP_GEN9_2D_COMPRESSION | \ + AGX_CAP_SPARSE_RESIDENCY_3D | AGX_CAP_GEN9_2D_COMPRESSION | \ AGX_CAP_HAL200_LOSSLESS_COMPRESSION | \ AGX_CAP_HAL200_MSAA_COLOR_COMPRESSION | AGX_CAP_CDM_OVERLAP_SPLIT | \ AGX_CAP_CACHED_CMD_MEMORY | AGX_CAP_COMPUTE_COHERENT_STORE) @@ -311,6 +310,7 @@ enum agx_chip_cap { X(G16P, AGX_CAP_COOPERATIVE_MATRIX, __VA_ARGS__) \ X(G16G, \ AGX_CAPS_NATIVE | AGX_CAP_NATIVE_PREAMBLE | \ + AGX_CAP_TRI_MERGE_ACROSS_SIDE_EFFECTS | \ AGX_CAP_HAL200_LOSSLESS_COMPRESSION | \ AGX_CAP_HAL200_MSAA_COLOR_COMPRESSION, \ __VA_ARGS__) \ diff --git a/src/asahi/lib/tests/test-chip-caps.c b/src/asahi/lib/tests/test-chip-caps.c index 6becc9ab27cf..41ec1fe946be 100644 --- a/src/asahi/lib/tests/test-chip-caps.c +++ b/src/asahi/lib/tests/test-chip-caps.c @@ -120,7 +120,9 @@ test_coalesce_pure_global_workgroups(void) { for (unsigned i = 0; i <= AGX_CHIP_UNKNOWN; ++i) { const enum agx_chip c = (enum agx_chip)i; - const bool expected = c == AGX_CHIP_G17P || c == AGX_CHIP_G17G || + const bool expected = c == AGX_CHIP_G15G || c == AGX_CHIP_G15S || + c == AGX_CHIP_G15C || c == AGX_CHIP_G16G || + c == AGX_CHIP_G17P || c == AGX_CHIP_G17G || c == AGX_CHIP_G17S || c == AGX_CHIP_G17C; CHECK_CHIP(agx_chip_has_cap(c, AGX_CAP_COALESCE_PURE_GLOBAL_WORKGROUPS) == expected, @@ -128,15 +130,15 @@ test_coalesce_pure_global_workgroups(void) } } -/* AGX_CAP_CDM_WAR_WEAK_BARRIER is enabled on G17P and M5 only. G15 and G16G - * elide application dispatch barriers too but keep the flush at execution-only - * and WAR barriers until hardware rows qualify them. */ +/* AGX_CAP_CDM_WAR_WEAK_BARRIER is enabled across native AGX3 and M5. */ static void test_cdm_war_weak_barrier(void) { for (unsigned i = 0; i <= AGX_CHIP_UNKNOWN; ++i) { const enum agx_chip c = (enum agx_chip)i; - const bool expected = c == AGX_CHIP_G17P || c == AGX_CHIP_G17G || + const bool expected = c == AGX_CHIP_G15G || c == AGX_CHIP_G15S || + c == AGX_CHIP_G15C || c == AGX_CHIP_G16G || + c == AGX_CHIP_G17P || c == AGX_CHIP_G17G || c == AGX_CHIP_G17S || c == AGX_CHIP_G17C; CHECK_CHIP(agx_chip_has_cap(c, AGX_CAP_CDM_WAR_WEAK_BARRIER) == expected, c); diff --git a/src/asahi/lib/tests/test-chip.c b/src/asahi/lib/tests/test-chip.c index f5ab286a1d0e..1cf8fe5e627c 100644 --- a/src/asahi/lib/tests/test-chip.c +++ b/src/asahi/lib/tests/test-chip.c @@ -138,7 +138,7 @@ static unsigned checks; ROW(agx_chip_usc_base_page_fill_returns_for(c, 4), \ "0000 01110 0100 100000 0 0") \ ROW(agx_chip_explicit_robust_image_bounds(c), "0000 01110 0100 000000 0 0") \ - ROW(agx_chip_vdm_indirect_index_bounds(c), "0000 00000 0000 101110 0 0") \ + ROW(agx_chip_vdm_indirect_index_bounds(c), "0000 01110 0100 101110 0 0") \ ROW(agx_chip_hw_texel_fetch_bounds(c), "0000 00000 0000 001110 0 0") \ ROW(agx_chip_native_imageblock(c), "0000 01110 0100 100000 0 0") \ ROW(agx_chip_uncovered_tile_ms_defect(c), "0000 01110 0100 100000 0 0") \ @@ -154,7 +154,7 @@ static unsigned checks; "0000 01110 0100 000000 0 0") \ ROW(agx_chip_uncovered_tile_ms_reload_defect(c, 0x6041, 4), \ "0000 01110 0100 100000 0 0") \ - ROW(agx_chip_tri_merge_across_side_effects(c), "0000 00000 0000 101110 0 0") \ + ROW(agx_chip_tri_merge_across_side_effects(c), "0000 00000 0100 101110 0 0") \ ROW(agx_chip_image_load_misses_own_store(c), "0000 00000 0000 100000 0 0") \ ROW(agx_chip_exact_fma32(c), "1111 11111 1111 111111 1 1") \ ROW(agx_chip_sampler_has_lod_bias(c), "0000 00000 1111 111111 1 0") \ diff --git a/src/asahi/vulkan/tests/test-hk-index-robustness.c b/src/asahi/vulkan/tests/test-hk-index-robustness.c index e9c3434644ba..42a8c7b287e4 100644 --- a/src/asahi/vulkan/tests/test-hk-index-robustness.c +++ b/src/asahi/vulkan/tests/test-hk-index-robustness.c @@ -34,8 +34,10 @@ main(void) * aligned 16/32-bit indirect draws within 32-bit byte bounds in hardware; * oversized, unaligned, and 8-bit indirect draws take the software rewrite * path. */ - static const enum agx_chip native_chips[] = {AGX_CHIP_G17P, AGX_CHIP_G17G, - AGX_CHIP_G17S, AGX_CHIP_G17C}; + static const enum agx_chip native_chips[] = { + AGX_CHIP_G15G, AGX_CHIP_G15S, AGX_CHIP_G15C, AGX_CHIP_G16G, + AGX_CHIP_G17P, AGX_CHIP_G17G, AGX_CHIP_G17S, AGX_CHIP_G17C, + }; for (unsigned i = 0; i < sizeof(native_chips) / sizeof(native_chips[0]); ++i) { assert(agx_chip_vdm_indirect_index_bounds(native_chips[i])); @@ -83,8 +85,7 @@ main(void) * index bounds are unmeasured) keeps the software rewrite for robust * indirect draws. */ static const enum agx_chip rewrite_chips[] = { - AGX_CHIP_G13G, AGX_CHIP_G14X, AGX_CHIP_G15G, AGX_CHIP_G15S, - AGX_CHIP_G15C, AGX_CHIP_G16G, AGX_CHIP_G18G, + AGX_CHIP_G13G, AGX_CHIP_G14X, AGX_CHIP_G18G, }; for (unsigned i = 0; i < sizeof(rewrite_chips) / sizeof(rewrite_chips[0]); ++i) { diff --git a/src/asahi/vulkan/tests/test-hk-root-size.c b/src/asahi/vulkan/tests/test-hk-root-size.c index 59f6f2e188a6..1ee569a290dc 100644 --- a/src/asahi/vulkan/tests/test-hk-root-size.c +++ b/src/asahi/vulkan/tests/test-hk-root-size.c @@ -526,12 +526,13 @@ int main(void) assert(!hk_split_workgroup_size_ex(wg32x3, g2d_odd, 80, out) && out[0] == 32 && out[1] == 3 && out[2] == 1); - /* Capability table: enabled on G17P and M5 (G17G, G17S, G17C); other - * parts stay off until per-generation same-machine A/B + CTS rows - * qualify them. */ + /* Capability table: enabled across native AGX3 (G15, G16G, G17P) and M5 + * (G17G, G17S, G17C); AGX2 and G18G stay off. */ for (int chip = AGX_CHIP_G13G; chip <= AGX_CHIP_UNKNOWN; ++chip) { const enum agx_chip c = (enum agx_chip)chip; - const bool expected = c == AGX_CHIP_G17P || c == AGX_CHIP_G17G || + const bool expected = c == AGX_CHIP_G15G || c == AGX_CHIP_G15S || + c == AGX_CHIP_G15C || c == AGX_CHIP_G16G || + c == AGX_CHIP_G17P || c == AGX_CHIP_G17G || c == AGX_CHIP_G17S || c == AGX_CHIP_G17C; assert(agx_chip_has_cap(c, AGX_CAP_COALESCE_PURE_GLOBAL_WORKGROUPS) == expected);