From 45f3397ca9530331231116f4e81aa2a67344bf74 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Mon, 27 Oct 2025 10:13:53 +1000 Subject: [PATCH] batch resize --- .../rendering/section/geometry/BasicSectionGeometryData.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/section/geometry/BasicSectionGeometryData.java b/src/main/java/me/cortex/voxy/client/core/rendering/section/geometry/BasicSectionGeometryData.java index 902398b8..94196a80 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/section/geometry/BasicSectionGeometryData.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/section/geometry/BasicSectionGeometryData.java @@ -71,6 +71,7 @@ public class BasicSectionGeometryData implements IGeometryData { if (this.geometryBuffer.isSparse()) { if (this.sparseCommitment < size) {//if we try to access memory outside the allocation range, allocate it glBindBuffer(GL_ARRAY_BUFFER, this.geometryBuffer.id); + size += 65536L*1024;//increase size by 64mb to prevent driver allocation thrashing glBufferPageCommitmentARB(GL_ARRAY_BUFFER, this.sparseCommitment, size-this.sparseCommitment, true); glBindBuffer(GL_ARRAY_BUFFER, 0); this.sparseCommitment = size;