Shimmer

Shimmer

6.6k Downloads

[Forge - 1.19.2]: Framebuffer name must be generated before being bound

SiverDX opened this issue ยท 6 comments

commented

Minecraft Version

1.19.2

ModLoader

Forge

Shimmer version

Shimmer-forge-1.19.2-0.1.14

Modpack info or mod list(please reduce mod range)

Too many to list

The latest.log file and hs_err_pidXXX if exists

N/A

optifine , Rubidium , flywheel or any rendering related mods. mod version is required.

  • Embeddium 0.1.4 for 1.19.2
  • Reforgium 1.0.12a for 1.19.2
  • Flywheel from Create 0.5.1c

Issue description

When reloading resources ingame it can happen that a lot of errors like this occur:

[com.mojang.blaze3d.platform.GlDebug/]: OpenGL debug message: id=1282, source=API, type=ERROR, severity=HIGH, message='GL_INVALID_OPERATION error generated. Framebuffer name must be generated before being bound.'

It can also cause the screen to go black
Reloading the resources again can fix the issue (and then after reloading it can occur again)

I'm also using https://www.curseforge.com/minecraft/texture-packs/blooming-blocks
I don't use Oculus

Steps to reproduce

  1. Reload resources

Other information

No response

commented

Just now it occured randomly without reloading resources
(Though this seems to be much more rare)

commented

I changed it like this for now
No clue about this stuff or the performance impact

But I did not encounter the issue yet - so this fixed it or it's just very inconsistent?
Nevermind, it's just inconsistent, second attempt:
Second attemp might actually fix the issue but kills the performance

    @ModifyReceiver(method = "render(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource$BufferSource;Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;FLnet/minecraft/client/renderer/culling/Frustum;)V",
            at = @At(value = "INVOKE",
                    target = "Lnet/minecraft/client/particle/ParticleRenderType;begin(Lcom/mojang/blaze3d/vertex/BufferBuilder;Lnet/minecraft/client/renderer/texture/TextureManager;)V"))
    private ParticleRenderType injectRenderPre(ParticleRenderType particlerendertype, BufferBuilder bufferBuilder, TextureManager textureManager) {
        if (particlerendertype instanceof IPostParticleType && this.particles.get(particlerendertype).size() > 0) {
            PostProcessing postProcessing = ((IPostParticleType) particlerendertype).getPost();

            CopyDepthColorTarget postTarget = postProcessing.getPostTarget(false);
            postTarget.frameBufferId = GlStateManager.glGenFramebuffers();
            GlStateManager._glBindFramebuffer(GL30.GL_FRAMEBUFFER, postTarget.frameBufferId);
            postTarget.bindWrite(false);

            postProcessing.hasParticle();
        }
        return particlerendertype;
    }
commented

Did an inject at the HEAD of the debug logging, no clue if this helps

Particle render type: POST_WRAPPED_PARTICLE_SHEET_TRANSLUCENT

glBindFramebuffer

  • target is 36160
  • framebuffer is mostly 21 (sometimes 6)

private ParticleRenderType injectRenderPre(ParticleRenderType particlerendertype, BufferBuilder bufferBuilder, TextureManager textureManager) {

handler$dpo000$where_am_i:13, GlDebug (com.mojang.blaze3d.platform)
m_84038_:89, GlDebug (com.mojang.blaze3d.platform)
invoke:-1, GlDebug$$Lambda$4691/0x0000000801a28ab0 (com.mojang.blaze3d.platform)
callback:46, GLDebugMessageCallbackI (org.lwjgl.opengl)
glBindFramebuffer:-1, GL30C (org.lwjgl.opengl)
glBindFramebuffer:1619, GL30 (org.lwjgl.opengl)
m_84486_:361, GlStateManager (com.mojang.blaze3d.platform)
m_83961_:201, RenderTarget (com.mojang.blaze3d.pipeline)
m_83947_:194, RenderTarget (com.mojang.blaze3d.pipeline)
modifyReceiver$hil000$injectRenderPre:83, ParticleEngine (net.minecraft.client.particle)
render:401, ParticleEngine (net.minecraft.client.particle)
m_109599_:1381, LevelRenderer (net.minecraft.client.renderer)
m_109089_:1068, GameRenderer (net.minecraft.client.renderer)
m_109093_:840, GameRenderer (net.minecraft.client.renderer)
m_91383_:1115, Minecraft (net.minecraft.client)
m_91374_:700, Minecraft (net.minecraft.client)
m_239872_:212, Main (net.minecraft.client.main)
main:51, Main (net.minecraft.client.main)
invoke0:-1, NativeMethodAccessorImpl (jdk.internal.reflect)
invoke:-1, NativeMethodAccessorImpl (jdk.internal.reflect)
invoke:-1, DelegatingMethodAccessorImpl (jdk.internal.reflect)
invoke:-1, Method (java.lang.reflect)
lambda$launchService$0:27, CommonClientLaunchHandler (net.minecraftforge.fml.loading.targets)
run:-1, CommonClientLaunchHandler$$Lambda$936/0x0000000800ff1058 (net.minecraftforge.fml.loading.targets)
launch:30, LaunchServiceHandlerDecorator (cpw.mods.modlauncher)
launch:53, LaunchServiceHandler (cpw.mods.modlauncher)
launch:71, LaunchServiceHandler (cpw.mods.modlauncher)
run:106, Launcher (cpw.mods.modlauncher)
main:77, Launcher (cpw.mods.modlauncher)
accept:26, BootstrapLaunchConsumer (cpw.mods.modlauncher)
accept:23, BootstrapLaunchConsumer (cpw.mods.modlauncher)
main:141, BootstrapLauncher (cpw.mods.bootstraplauncher)
invoke0:-1, NativeMethodAccessorImpl (jdk.internal.reflect)
invoke:-1, NativeMethodAccessorImpl (jdk.internal.reflect)
invoke:-1, DelegatingMethodAccessorImpl (jdk.internal.reflect)
invoke:-1, Method (java.lang.reflect)
main:57, Main (io.github.zekerzhayard.forgewrapper.installer)
invokeStaticInit:-1, LambdaForm$DMH/0x0000000800c02400 (java.lang.invoke)
invokeExact_MT:-1, LambdaForm$MH/0x0000000800c02c00 (java.lang.invoke)
launch:88, StandardLauncher (org.prismlauncher.launcher.impl)
listen:126, EntryPoint (org.prismlauncher)
main:71, EntryPoint (org.prismlauncher)

private void injectRenderReturn(PoseStack pMatrixStack, MultiBufferSource.BufferSource pBuffer, LightTexture pLightTexture, Camera pActiveRenderInfo, float pPartialTicks, net.minecraft.client.renderer.culling.Frustum clippingHelper, CallbackInfo ci) {

handler$dpo000$where_am_i:13, GlDebug (com.mojang.blaze3d.platform)
m_84038_:89, GlDebug (com.mojang.blaze3d.platform)
invoke:-1, GlDebug$$Lambda$4691/0x0000000801a28ab0 (com.mojang.blaze3d.platform)
callback:46, GLDebugMessageCallbackI (org.lwjgl.opengl)
glBindFramebuffer:-1, GL30C (org.lwjgl.opengl)
glBindFramebuffer:1619, GL30 (org.lwjgl.opengl)
m_84486_:361, GlStateManager (com.mojang.blaze3d.platform)
m_83961_:201, RenderTarget (com.mojang.blaze3d.pipeline)
m_83947_:194, RenderTarget (com.mojang.blaze3d.pipeline)
renderParticlePost:326, PostProcessing (com.lowdragmc.shimmer.client.postprocessing)
handler$hil000$injectRenderReturn:105, ParticleEngine (net.minecraft.client.particle)
render:425, ParticleEngine (net.minecraft.client.particle)
m_109599_:1381, LevelRenderer (net.minecraft.client.renderer)
m_109089_:1068, GameRenderer (net.minecraft.client.renderer)
m_109093_:840, GameRenderer (net.minecraft.client.renderer)
m_91383_:1115, Minecraft (net.minecraft.client)
m_91374_:700, Minecraft (net.minecraft.client)
m_239872_:212, Main (net.minecraft.client.main)
main:51, Main (net.minecraft.client.main)
invoke0:-1, NativeMethodAccessorImpl (jdk.internal.reflect)
invoke:-1, NativeMethodAccessorImpl (jdk.internal.reflect)
invoke:-1, DelegatingMethodAccessorImpl (jdk.internal.reflect)
invoke:-1, Method (java.lang.reflect)
lambda$launchService$0:27, CommonClientLaunchHandler (net.minecraftforge.fml.loading.targets)
run:-1, CommonClientLaunchHandler$$Lambda$936/0x0000000800ff1058 (net.minecraftforge.fml.loading.targets)
launch:30, LaunchServiceHandlerDecorator (cpw.mods.modlauncher)
launch:53, LaunchServiceHandler (cpw.mods.modlauncher)
launch:71, LaunchServiceHandler (cpw.mods.modlauncher)
run:106, Launcher (cpw.mods.modlauncher)
main:77, Launcher (cpw.mods.modlauncher)
accept:26, BootstrapLaunchConsumer (cpw.mods.modlauncher)
accept:23, BootstrapLaunchConsumer (cpw.mods.modlauncher)
main:141, BootstrapLauncher (cpw.mods.bootstraplauncher)
invoke0:-1, NativeMethodAccessorImpl (jdk.internal.reflect)
invoke:-1, NativeMethodAccessorImpl (jdk.internal.reflect)
invoke:-1, DelegatingMethodAccessorImpl (jdk.internal.reflect)
invoke:-1, Method (java.lang.reflect)
main:57, Main (io.github.zekerzhayard.forgewrapper.installer)
invokeStaticInit:-1, LambdaForm$DMH/0x0000000800c02400 (java.lang.invoke)
invokeExact_MT:-1, LambdaForm$MH/0x0000000800c02c00 (java.lang.invoke)
launch:88, StandardLauncher (org.prismlauncher.launcher.impl)
listen:126, EntryPoint (org.prismlauncher)
main:71, EntryPoint (org.prismlauncher)
commented

I think it's very common with many particles (or at least water drip particles)?
Makes it kinda unplayable atm

commented

Currently trying things out without https://www.curseforge.com/minecraft/mc-mods/fix-gpu-memory-leak
Since it does some tick- / queue-based framebuffer name binding

commented

Closing this since the issue stopped occuring after removing the mentioned mod above