Iris Shaders

Iris Shaders

36M Downloads

Heavy artifacting started appearing

Oreeeee opened this issue ยท 14 comments

commented

What happened?

On some shaders, I started getting artifacting. With Complementary Shaders 4.5 I get them only underwater after a second, it looks like two triangles with solid colors. With SEUS PTGI HRR 3 it's constant, there are two triangles too, but you can make out the image.

Screenshots

image
image
image
image

Log output

No response

Minecraft Version

1.21

Iris Version

Iris 1.7.3+mc1.21

Operating System

Arch Linux, 6.6.39-1-lts Kernel

What is your GPU?

Gigabyte RX 580 8 GB

Additional context

It used to work like a week ago.

commented

Same problem after upgrading from 1.7.0 to 1.7.2 on the default kernel. On 1.7.0 I only had this problem with some shaders, but my favorite AstraLex worked fine. Now even it has this problem. Also it spams this in the console every frame:

[13:22:18] [Thread-34/INFO]: OpenGL debug message: id=2, source=API, type=ERROR, severity=HIGH, message='GL_INVALID_OPERATION in glBindTexture(non-gen name)'

MC version: 1.20.1
Iris version: 1.7.2
System info:

Operating System: Arch Linux 
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.9.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 ร— AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: AMD Radeon RX 5700 XT
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B450 GAMING X
commented

I am currently investigating; seems most likely to be a Mesa bug. It would be helpful if someone could bisect either Iris or Mesa.

commented

Mesa 24.2 (latest Git) seems to have fixed part of this bug.

commented

After a little bit of digging I found that in AstraLex shaders it is caused by Biome Refract (add haze effect in biomes) option, In 1.7.2 and 1.7.0 versions of iris
image
image
However even when disabled shaders still show artifacts underwater.
Right now I can't try mesa-git, because I don't have the resources to build it, I'll add an update when I get mesa 24.2

commented

I noticed this happens mostly on shaders not designed for 1.21. Latest Complementary Shaders - which are updated to support 1.21 work, but SEUS PTGI HRR3, which is an 1.18 shader doesn't. I won't really take my time to switch to mesa-git, as I'm currently fine with using Complementary over SEUS PTGI until the patch is in stable mesa.

commented

This also happens on 1.6.11, so it certainly isn't a regression.

Does anyone know whether the root cause has been identified yet? Or at least which version of Mesa introduced this bug?

commented

Btw, as a temporary workaround, you can utilise the zink opengl driver implemented atop Vulkan using this env var: MESA_LOADER_DRIVER_OVERRIDE=zink. It renders correctly.

It appears to be a lot less performant though but I don't have a good reference at hand.

This suggests to me that the issue likely lies in radeonsi.

commented

Can confirm that MESA_LOADER_DRIVER_OVERRIDE=zink fixes the artifacts, but the performance hit is not worth it at all. Im on a 5700 XT and shaders that usually had stable 60 fps (capped) are barely hitting 20.

commented

@zmike do you know why Zink perf in MC shaders is at like 1/3 of radeonsi? (I'm sure Big Triangle is behind all this...)

commented

No, but if you file a ticket with simple repro instructions I can probably find out.

commented

Update: This issue has been confirmed on older versions of Optifine under similar conditions, and latest git fixed it. Not sure what I can do here.

(Other than waiting for 24.2, of course.)
sp614x/optifine#7697

commented

I can confirm that mesa 24.2 fixes this issue (somehow...). Though I'd still like to know what actually fixed the issue so that it can be backported to 24.1.

In 24.2, zink now has 90% of the perf of radeonsi istead of ~33% which is within expected margins, so it appears that has been fixed too.

commented

mesa 24.2 just arrived on arch linux mirrors. The issue is finally resolved!
image

commented

Can confirm- issue is fixed by updating Mesa!