From ba00c87fdfbeb3b5b731efb5875e4c6dd81f28d6 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 7 Aug 2025 09:09:26 -0400 Subject: [PATCH] hk: fix pathological RAM use for tess emulation These * 32's got added when debugging this I guess and I never took them out. Ouchie. Reduces memory footprint of tess by 32x. Geez. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/vulkan/hk_cmd_draw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/asahi/vulkan/hk_cmd_draw.c b/src/asahi/vulkan/hk_cmd_draw.c index 47f242fccae..83c820eca1a 100644 --- a/src/asahi/vulkan/hk_cmd_draw.c +++ b/src/asahi/vulkan/hk_cmd_draw.c @@ -1306,13 +1306,13 @@ hk_upload_tess_params(struct hk_cmd_buffer *cmd, struct libagx_tess_args *out, uint32_t alloc = 0; uint32_t tcs_out_offs = alloc; - alloc += unrolled_patches * args.tcs_stride_el * 4 * 32; + alloc += unrolled_patches * args.tcs_stride_el * sizeof(uint32_t); uint32_t patch_coord_offs = alloc; - alloc += unrolled_patches * 4 * 32; + alloc += unrolled_patches * sizeof(uint32_t); uint32_t count_offs = alloc; - alloc += unrolled_patches * sizeof(uint32_t) * 32; + alloc += unrolled_patches * sizeof(uint32_t); /* Single API draw */ uint32_t draw_offs = alloc;