Fix DSA binding restore and liquid colors (#2192)

This commit is contained in:
Jason Mitchell authored and GitHub committed 2026-10-02 21:48:24 -07:00
1 parent 1587a12cd7
commit 85892c0f7f
23 files changed
+374 -494

No files matched your search

@@ -76,7 +76,7 @@ public class ProgramUniforms {
hasDeferredUploads = true;
return;
}
if (active != null) {
if (active != null && active != this) {
active.removeListeners();
}
@@ -0,0 +1,29 @@
package net.coderbot.iris.gl.state;
import java.util.Arrays;
public final class MultiListenerNotifier implements ValueUpdateNotifier {
private Runnable[] listeners = new Runnable[4];
private int count;
@Override
public void setListener(Runnable listener) {
if (listener == null) {
count = 0;
return;
}
for (int i = 0; i < count; i++) {
if (listeners[i] == listener) return;
}
if (count == listeners.length) listeners = Arrays.copyOf(listeners, count << 1);
listeners[count++] = listener;
}
public void run() {
final Runnable[] l = listeners;
for (int i = 0, n = count; i < n; i++) {
l[i].run();
}
}
}