From db27a10f38ff766ed2171aa8f5de2c37cd22bddd Mon Sep 17 00:00:00 2001 From: Lorenzo Rossi Date: Wed, 15 Apr 2026 18:30:39 +0200 Subject: [PATCH] pan/compiler: Add better documentation for second lower_int64 Signed-off-by: Lorenzo Rossi Reviewed-by: Christoph Pillmayer Reviewed-by: Faith Ekstrand Part-of: --- src/panfrost/compiler/bifrost/bifrost_nir.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/panfrost/compiler/bifrost/bifrost_nir.c b/src/panfrost/compiler/bifrost/bifrost_nir.c index 3364fa52504..fb24ad0f4b6 100644 --- a/src/panfrost/compiler/bifrost/bifrost_nir.c +++ b/src/panfrost/compiler/bifrost/bifrost_nir.c @@ -296,8 +296,11 @@ bi_optimize_late(nir_shader *nir, uint64_t gpu_id, * handle them */ NIR_PASS(_, nir, nir_opt_algebraic); - /* TODO: Why is 64-bit getting rematerialized? - * KHR-GLES31.core.shader_image_load_store.basic-allTargets-atomicFS */ + /* This is only needed because we support iadd64 but not isub64. + * nir_opt_algebraic lowers isub64 into iadd64 + ineg64 and since ineg64 is + * not supported either we lower that too. + * TODO: wire up isub64 and ineg64, then remove this + */ NIR_PASS(_, nir, nir_lower_int64); /* Algebraic can materialize instructions with a bit_size that we need to lower */