From 4167b7d51f22f58dc5d0eccd1fc40e31330b76e4 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: --- src/intel/isl/isl_surface_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } }