Iris icon indicating copy to clipboard operation
Iris copied to clipboard

Weird crash with gbuffers_terrain.vsh using core

Open Luracasmus opened this issue 2 years ago • 2 comments

Minecraft Version

Minecraft 1.19.4/Quilt Loader 0.19.0-beta.11

Iris Version

iris-mc1.19.4-1.6.0

Sodium Version

sodium-fabric-mc1.19.4-0.4.10+build.24.jar

Operating System

Windows 11

What is your GPU?

Nvidia Geforce GTX 1060 6GB

Java Version

Java 17 (bundled with Minecraft Launcher)

Reproduction Steps

  1. Make a shader pack with this gbuffers_terrain.fsh shader:
#version 460

void main() {}

and this gbuffers_terrain.vsh shader:

#version 460

in ivec2 vaUV2;

void main() {
	gl_Position = vec4(0);
}

(no other files are needed)

  1. Load the shader pack and observe that the game works

  2. Add this to the vertex shader:

#version 460

float zero() {
	return 0.0;
} // it doesn't crash when this isn't here????

in ivec2 vaUV2;

void main() {
	gl_Position = vec4(0);
}
  1. Reload shaders
  2. The game crashes

You can download the working and crashing shaderpacks here:

Crash Report file and latest.log

Log: https://mclo.gs/L51xCmO

Crash report: https://mclo.gs/bWtAGQi

Additional context

I was only using Sodium and Iris, no other mods

It might have something to do with this: [Render thread/WARN]: Removing unused function zero

Luracasmus avatar Apr 10 '23 12:04 Luracasmus

Moving in ivec2 vaUV2; above the zero function will temporarily fix it. This is a bug with how Iris handles functions.

IMS212 avatar Apr 15 '23 13:04 IMS212

Moving in ivec2 vaUV2; above the zero function will temporarily fix it. This is a bug with how Iris handles functions.

@IMS212 Can the new 1.20.1 backward-compatible iris fix this issue? Iris 1.8 does not cause the game to crash.

OrzMiku avatar Feb 22 '25 09:02 OrzMiku