diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/util/DownloadStream.java b/src/main/java/me/cortex/voxy/client/core/rendering/util/DownloadStream.java index 77df45e4..de10f7a7 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/util/DownloadStream.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/util/DownloadStream.java @@ -4,6 +4,7 @@ import it.unimi.dsi.fastutil.longs.LongArrayList; import me.cortex.voxy.client.core.gl.GlBuffer; import me.cortex.voxy.client.core.gl.GlFence; import me.cortex.voxy.client.core.gl.GlPersistentMappedBuffer; +import me.cortex.voxy.common.Logger; import me.cortex.voxy.common.util.AllocationArena; import me.cortex.voxy.common.util.MemoryBuffer; @@ -72,6 +73,7 @@ public class DownloadStream { if (this.caddr == -1 || !this.allocationArena.expand(this.caddr, (int) size)) { this.caddr = this.allocationArena.alloc((int) size);//TODO: replace with allocFromLargest if (this.caddr == SIZE_LIMIT) { + Logger.warn("Download stream full, preemptively committing, this could cause bad things to happen"); this.commit(); int attempts = 10; while (--attempts != 0 && this.caddr == SIZE_LIMIT) { diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/util/RawDownloadStream.java b/src/main/java/me/cortex/voxy/client/core/rendering/util/RawDownloadStream.java index 226126e2..cd22413e 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/util/RawDownloadStream.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/util/RawDownloadStream.java @@ -3,6 +3,7 @@ package me.cortex.voxy.client.core.rendering.util; import me.cortex.voxy.client.core.gl.GlFence; import me.cortex.voxy.client.core.gl.GlPersistentMappedBuffer; +import me.cortex.voxy.common.Logger; import me.cortex.voxy.common.util.AllocationArena; import java.util.ArrayDeque; @@ -33,6 +34,7 @@ public class RawDownloadStream { public int download(int size, IDownloadCompletedCallback callback) { int allocation = (int) this.allocationArena.alloc(size); if (allocation == AllocationArena.SIZE_LIMIT) { + Logger.warn("Raw download stream full, preemptively committing, this could cause bad things to happen"); //Hit the download limit, attempt to free glFinish(); this.tick(); diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/util/UploadStream.java b/src/main/java/me/cortex/voxy/client/core/rendering/util/UploadStream.java index 56492b17..ecf7dc01 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/util/UploadStream.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/util/UploadStream.java @@ -4,6 +4,7 @@ import it.unimi.dsi.fastutil.longs.LongArrayList; import me.cortex.voxy.client.core.gl.GlBuffer; import me.cortex.voxy.client.core.gl.GlFence; import me.cortex.voxy.client.core.gl.GlPersistentMappedBuffer; +import me.cortex.voxy.common.Logger; import me.cortex.voxy.common.util.AllocationArena; import java.util.ArrayDeque; @@ -48,7 +49,7 @@ public class UploadStream { //Note! we dont commit here, we only try to flush existing memory copies, we dont commit // since commit is an explicit op saying we are done any to push upload everything //We dont commit since we dont want to invalidate existing upload pointers - + Logger.warn("Upload stream full, preemptively committing, this could cause bad things to happen"); int attempts = 10; while (--attempts != 0 && this.caddr == SIZE_LIMIT) { glFinish();