nir/lower_printf: drop default max buffer size

no uses and it doesn't make sense.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
This commit is contained in:
Alyssa Rosenzweig
2025-01-16 09:36:04 -05:00
committed by Marge Bot
parent 621ff262bc
commit 47e16cab5e
+1 -3
View File
@@ -108,10 +108,8 @@ lower_printf_intrin(nir_builder *b, nir_intrinsic_instr *prntf, void *_options)
.atomic_op = nir_atomic_op_iadd);
/* Check if we're still in-bounds */
const unsigned default_buffer_size = 1024 * 1024;
unsigned buffer_size = (options && options->max_buffer_size) ? options->max_buffer_size : default_buffer_size;
int max_valid_offset =
buffer_size - args_size - fmt_str_id_size - counter_size;
options->max_buffer_size - args_size - fmt_str_id_size - counter_size;
assert(max_valid_offset >= 0 && "printf buffer must be sufficiently large");
nir_push_if(b, nir_ult_imm(b, offset, max_valid_offset));