makamys / Neodymium

Reimplements chunk rendering using modern OpenGL features to improve performance (1.7.10)
Other
116 stars 10 forks source link

Blocks do not to render on AMD GPU #24

Open aking4125 opened 1 year ago

aking4125 commented 1 year ago

Hello,

A user on our server is experiencing a bug with this mod on their Radeon RX 6800 XT. No blocks are rendered on their screen. Only entities are rendered.

image

With the mod enabled ^

image

With the mod disabled ^

Tested on Multiple Nvidia-based GPUs here. GTX 1070, RTX 2060, and RTX 2070, and this issue is not present.

Windows 11 AMD Software: Adrenalin Edition Version 23.4.3 Radeon RX 6800 XT Neodymium 0.1.8.2 (Mixinless)

https://gist.github.com/aking4125/3971c6fcddd347702f49edce57b233b1

Any ideas?

makamys commented 1 year ago

Does the same issue happen when no other mods are present?

Tested on Multiple Nvidia-based GPUs here. GTX 1070, RTX 2060, and RTX 2070, and this issue is not present.

This was with the same modpack, right?

aking4125 commented 1 year ago

This was with the same modpack, right?

Yes. The same modpack.

We have some additional information that may lead to a Driver change on AMDs side and/or another mod conflict:

Does the same issue happen when no other mods are present?

Neodymium works with just that and Unimixins: image

The user reported when they still had the old 23.2.2 AMD driver. The pack with Neodymium worked perfectly fine so there's that oddity. Once they updated the driver this problem occurred (though they do not wish to downgrade as the old driver gave them other issues with other 3D applications)

We will attempt to perform another test with the other "Performance" mods installed and see if there's some type of conflict OR if a mod is doing it. Though it's quite a lot to comb through.

As of now, Removing Neodymium with this custom pack on their AMD GPU works best overall. Apologies for this as this may take some time to diagnose.

aking4125 commented 1 year ago

Update from a second user with an AMD RX 480

Driver: Adrenaline Edition Version 23.4.3

They are experiencing the exact same thing:

With Neodymium: image

Removing Neodymium:

image

However, on their setup, having just Neodymium and Unimixins produce the exact same result:

image

Here is the log of the first run with all mods enabled:

latest.log

makamys commented 1 year ago

However, on their setup, having just Neodymium and Unimixins produce the exact same result:

That screenshot looks like it has additional mods, the chat background isn't supposed to be transparent in vanilla. A log from that run would be helpful.


I've thought of a way I could potentially debug this, but it's slightly complicated. We need to use a tool called apitrace. Here's how to do this:

Also, I'd like to see the F3 overlay while the bug is happening (doesn't have to be in the trace necessarily, I just want a screenshot.)

aking4125 commented 1 year ago

Copy that. Apologies for the slow response. Currently on bereavement leave. I left these instructions to the users with the AMD GPU and I'll let you know if or when they get back to me.

That screenshot looks like it has additional mods, the chat background isn't supposed to be transparent in vanilla. A log from that run would be helpful.

You're correct, the user made a mistake with disabling mods as that is a side effect of Hodgepodge or GTNHLib. I forwarded them the information to retry again. It's possible this might not be directly related to Neodymium but Neodymium might be one of the conflicting causes, perhaps paired with something else.

aking4125 commented 1 year ago

Alright. The user with the 6800 XT attempted to perform the above steps. Sorry for the delay:

The trace file is huge. We cannot upload it here so here is the mediafire link: https://www.mediafire.com/file/whukwp5yrezjg15/minecraft.trace/file

Note: They updated the AMD Adrenalin Drivers in the meantime again when there was a new update [23.5.2]; so that’s the drivers it’s on now

SilearFlare commented 1 year ago

Odd, I have an AMD GPU and I haven't noticed any issues with neodymium in my own modpack, either now or in the past year.

makamys commented 1 year ago

Thanks! Unfortunately, that turned out to be less useful than I had hoped. When I play back the trace on my computer, the world renders correctly. I also can't see any useful warning messages. So it's necessary to collect more data on the same computer that has the issue.

To accomplish this, I added a feature to D-Tools which makes it log OpenGL debug messages. Once enabled (by setting logGlDebug to true in the config,) log messages like this should appear when in-game:

[23:37:29] [Client thread/DEBUG] [dtools-gldebug/]: [LWJGL] KHR_debug message
[23:37:29] [Client thread/DEBUG] [dtools-gldebug/]:     Stack trace: org.lwjgl.opengl.GL15.nglBufferSubData:-2 < org.lwjgl.opengl.GL15.glBufferSubData:179 < makamys.neodymium.renderer.GPUMemoryManager.sendMeshToGPU:156 < makamys.neodymium.renderer.NeoRenderer.setMeshVisible:584 < makamys.neodymium.renderer.NeoRenderer.neoChunkChanged:565 < makamys.neodymium.renderer.NeoChunk.putChunkMeshes:54 < makamys.neodymium.renderer.NeoRenderer.onWorldRendererPost:524 < net.minecraft.client.renderer.WorldRenderer.postUpdateRenderer:579 < net.minecraft.client.renderer.WorldRenderer.handler$postUpdateRenderer$zzi000:565 < net.minecraft.client.renderer.WorldRenderer.func_147892_a:228 < net.minecraft.client.renderer.RenderGlobal.func_72716_a:1530 < net.minecraft.client.renderer.EntityRenderer.func_78471_a:1187 < net.minecraft.client.renderer.EntityRenderer.func_78480_b:1015 < net.minecraft.client.Minecraft.func_71411_J:1001 < net.minecraft.client.Minecraft.func_99999_d:898 < net.minecraft.client.main.Main.main:148 < sun.reflect.NativeMethodAccessorImpl.invoke0:-2 < sun.reflect.NativeMethodAccessorImpl.invoke:62 < sun.reflect.DelegatingMethodAccessorImpl.invoke:43 < java.lang.reflect.Method.invoke:498 < net.minecraft.launchwrapper.Launch.launch:135 < net.minecraft.launchwrapper.Launch.main:28 < sun.reflect.NativeMethodAccessorImpl.invoke0:-2 < sun.reflect.NativeMethodAccessorImpl.invoke:62 < sun.reflect.DelegatingMethodAccessorImpl.invoke:43 < java.lang.reflect.Method.invoke:498 < org.multimc.onesix.OneSixLauncher.launchWithMainClass:210 < org.multimc.onesix.OneSixLauncher.launch:245 < org.multimc.EntryPoint.listen:143 < org.multimc.EntryPoint.main:34
[23:37:29] [Client thread/DEBUG] [dtools-gldebug/]:     ID: 131185
[23:37:29] [Client thread/DEBUG] [dtools-gldebug/]:     Source: API
[23:37:29] [Client thread/DEBUG] [dtools-gldebug/]:     Type: OTHER
[23:37:29] [Client thread/DEBUG] [dtools-gldebug/]:     Severity: NOTIFICATION
[23:37:29] [Client thread/DEBUG] [dtools-gldebug/]:     Message: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.

I want to ask the user to run the game with it enabled, press F3+A at least once while in-game, and send me the resulting log.

Also, I looked at the mod list again, and I'd recommend disabling the following mods while testing. They affect rendering, so they might add noise to the log, and one of them could even be the cause of the issue:


Odd, I have an AMD GPU and I haven't noticed any issues with neodymium in my own modpack, either now or in the past year.

We know the issue only happens with certain AMD driver versions. Can you tell me your GPU model, driver version and OS?

SilearFlare commented 1 year ago

Sure thing t1

Uh, I'm hoping everything's there because when checking, the driver just registers as "amdgpu" which honestly isn't saying much.

Minepolz320 commented 7 months ago

I had a similar problem due to the fast-render(ON) option in Optifine

Cooliosity commented 6 months ago

I am also able to reproduce this issue by enabling fast render in the optifine options. With fast render turned off, everything works normally