Logging for gpu stream overflow
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user