22w43a Fixed severe vanilla minecraft GPU memory leak

This commit is contained in:
LAX1DUDE 2022-10-25 23:26:28 -07:00
parent 079c549933
commit 5972ddb855
11 changed files with 54269 additions and 54245 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ public class ConfigConstants {
public static boolean profanity = false; public static boolean profanity = false;
public static final String version = "22w42c"; public static final String version = "22w43a";
public static final String mainMenuString = "eaglercraft " + version; public static final String mainMenuString = "eaglercraft " + version;
public static final String forkMe = "https://github.com/lax1dude/eaglercraft"; public static final String forkMe = "https://github.com/lax1dude/eaglercraft";

View File

@ -773,6 +773,18 @@ public class EaglerAdapterGL30 extends EaglerAdapterImpl2 {
} }
} }
public static final void flushDisplayList(int p1) {
DisplayList d = displayListsInitialized.get(p1);
if (d != null) {
if (d.glbuffer != null) {
_wglDeleteBuffer(d.glbuffer);
_wglDeleteVertexArray(d.glarray);
d.glbuffer = null;
d.glarray = null;
}
}
}
public static final HighPolyMesh loadMesh(String path) { public static final HighPolyMesh loadMesh(String path) {
try { try {
return HighPolyMesh.loadMeshData(EaglerAdapter.loadResourceBytes(path)); return HighPolyMesh.loadMeshData(EaglerAdapter.loadResourceBytes(path));

View File

@ -243,6 +243,13 @@ public class WorldRenderer {
this.tileEntities.removeAll(var21); this.tileEntities.removeAll(var21);
this.isChunkLit = Chunk.isLit; this.isChunkLit = Chunk.isLit;
this.isInitialized = true; this.isInitialized = true;
if(skipRenderPass[0]) {
EaglerAdapter.flushDisplayList(glRenderList);
}
if(skipRenderPass[1]) {
EaglerAdapter.flushDisplayList(glRenderList + 1);
}
} }
} }
@ -263,6 +270,8 @@ public class WorldRenderer {
public void setDontDraw() { public void setDontDraw() {
for (int var1 = 0; var1 < 2; ++var1) { for (int var1 = 0; var1 < 2; ++var1) {
this.skipRenderPass[var1] = true; this.skipRenderPass[var1] = true;
EaglerAdapter.flushDisplayList(glRenderList);
EaglerAdapter.flushDisplayList(glRenderList + 1);
} }
this.isInFrustum = false; this.isInFrustum = false;

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long