From c259e30b4f4570c94cd40f3c0b46d5dda8c88d23 Mon Sep 17 00:00:00 2001 From: Cherry Date: Mon, 12 Jan 2026 18:11:23 +0300 Subject: [PATCH] Prefetch buffers in rlVertex3f --- currentBuffer | 0 src/rlgl.h | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 currentBuffer diff --git a/currentBuffer b/currentBuffer new file mode 100644 index 000000000..e69de29bb diff --git a/src/rlgl.h b/src/rlgl.h index 756656e58..fab7f0a6b 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -1491,6 +1491,9 @@ void rlEnd(void) // NOTE: Vertex position data is the basic information required for drawing void rlVertex3f(float x, float y, float z) { + _mm_prefetch(RLGL.currentBatch->vertexBuffer + RLGL.currentBatch->currentBuffer, 1); + _mm_prefetch(RLGL.currentBatch->draws + RLGL.currentBatch->drawCounter - 1, 0); + float tx = x; float ty = y; float tz = z;