From 486e6eb861b724598bd8f8519e153f4da35e6c6b Mon Sep 17 00:00:00 2001 From: Ty Date: Fri, 30 Jan 2026 17:19:17 -0500 Subject: [PATCH] make graph_vram_allocate() return an aligned pointer --- ee/graph/src/graph_vram.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ee/graph/src/graph_vram.c b/ee/graph/src/graph_vram.c index 6a7354154d5..ce025ba937f 100644 --- a/ee/graph/src/graph_vram.c +++ b/ee/graph/src/graph_vram.c @@ -14,6 +14,9 @@ int graph_vram_allocate(int width, int height, int psm, int alignment) graph_vram_pointer += size; + // Align the pointer + graph_vram_pointer = -alignment & (graph_vram_pointer + (alignment-1)); + // If the pointer overflows the vram size if (graph_vram_pointer > GRAPH_VRAM_MAX_WORDS) {