From 73ae6b9adfa1352f21e1caa0837b71989f6a91cc Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Mon, 27 Apr 2026 15:24:22 -0700 Subject: [PATCH] intel/isl: warn about excessive num_elements only once Commit f3c7e14f091a ("isl: don't assert(num_elements > (1ull << 27))") replaced an assert(num_elements <= (1 << 27)) with a mesa_logw(). At that time, the only games I knew that printed this message (Marvel's Spider-Man Remastered and Assassin's Creed: Valhalla) only printed it a few times during startup. It turns out that The Last Of Us Part II Remastered constantly prints this message during gameplay. Downgrade it to mesa_logw_once() so we don't spam the terminal, don't fill disks with log messages and don't make things slower in general. Fixes: f3c7e14f091a ("isl: don't assert(num_elements > (1ull << 27))") Reviewed-by: Dylan Baker Signed-off-by: Paulo Zanoni Part-of: (cherry picked from commit 4167b7d51f22f58dc5d0eccd1fc40e31330b76e4) --- .pick_status.json | 2 +- src/intel/isl/isl_surface_state.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 6b896cd0ad1..6cd309f9077 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2274,7 +2274,7 @@ "description": "intel/isl: warn about excessive num_elements only once", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f3c7e14f091a21aebb9449f32e3483c28d39fa9c", "notes": null diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index b1a3ca4074a..492069949f7 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -1063,8 +1063,8 @@ isl_genX(buffer_fill_state_s)(const struct isl_device *dev, void *state, * newer are enough to fit 32bit num_elements. */ if (num_elements > (1 << 27)) { - mesa_logw("%s: num_elements is too big: %"PRIu64" (buffer size: %"PRIu64")\n", - __func__, num_elements, buffer_size); + mesa_logw_once("%s: num_elements is too big: %"PRIu64" (buffer size: %"PRIu64")\n", + __func__, num_elements, buffer_size); } }