Fix black patches covering the world (#2325)

This commit is contained in:
Jason Mitchell authored and GitHub committed 2026-11-01 12:45:06 -08:00
1 parent 85bde5827f
commit 5da38c9180
2 files changed
+34 -28

No files matched your search

@@ -34,7 +34,8 @@ public final class BatchDrawDefaults {
}
public void apply() {
if (passFramebuffer >= 0 && TesrBatchRenderer.deferredPipeline() == null) {
final boolean pack = TesrBatchRenderer.deferredPipeline() != null;
if (passFramebuffer >= 0 && !pack) {
final int framebuffer = GLSMFramebuffer.getDrawFramebuffer();
if (framebuffer != passFramebuffer) {
callerFramebuffer = framebuffer;
@@ -42,7 +43,7 @@ public final class BatchDrawDefaults {
}
}
final int program = GLSMPrograms.getActiveProgram();
if (program != 0 && !Program.isManagedBind(program) && !DepthColorStorage.isOwnedProgram(program)) {
if (program != 0 && !Program.isManagedBind(program) && !(pack && DepthColorStorage.isOwnedProgram(program))) {
callerProgram = program;
GLSMPrograms.glUseProgram(0);
}