Iris Shaders

Iris Shaders

36M Downloads

Complementary Shaders crashing on M1 macOS

TeamPuzel opened this issue · 8 comments

commented

What happened?

Complementary Shaders crashes after loading a world.

Relevant log output

WARNING: 0:10: extension 'GL_ARB_shader_texture_lod' is not supported

Minecraft Version

1.18 and 1.18.1

Iris Version

1.18.1 1.1.3

Sodium Version

alpha5-build9

Operating System

macOS 12.1

What is your GPU?

M1

Java Version

Java 17

Additional context

That extension does not sound like it's necessary, maybe it could be disabled? Is it because OpenGL is unsupported in macOS for a while?

commented

The creator of Complementary Shaders said in their Discord that it does not support M1 Macs

commented

Since this points to a specific issue fixable in Iris, I've chosen to rename the report accordingly. Note that Complementary might still not work after patching this specific issue, in that case it will be appropriate to open another report. I will see what I can do to fix this specific issue. Thanks.

commented

Actually, upon further reading, that message is just a warning, not an error. The actual problem is that macOS drivers are broken.

commented

Sorry, maybe I missed something, java is confusing to me. here's all of the log file from the point of loading the world.

[18:47:46] [Server thread/INFO]: Sneaky_PUZEL joined the game
[18:47:46] [Render thread/INFO]: Started 4 worker threads
[18:47:46] [Render thread/INFO]: Creating pipeline OVERWORLD
[18:47:46] [Render thread/WARN]: Shader compilation log for deferred.fsh: WARNING: 0:10: extension 'GL_ARB_shader_texture_lod' is not supported

[18:47:46] [Render thread/WARN]: Program link log for deferred: WARNING: Could not find vertex shader attribute 'at_tangent' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'mc_midTexCoord' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'mc_Entity' to match BindAttributeLocation request.

[18:47:46] [Render thread/WARN]: Shader compilation log for deferred1.fsh: WARNING: 0:10: extension 'GL_ARB_shader_texture_lod' is not supported

 A fatal error has been detected by the Java Runtime Environment:

 SIGSEGV (0xb) at pc=0x000000021beffc58, pid=49722, tid=259

JRE version: OpenJDK Runtime Environment Zulu17.30+15-CA (17.0.1+12) (build 17.0.1+12-LTS)

Java VM: OpenJDK 64-Bit Server VM Zulu17.30+15-CA (17.0.1+12-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)

 Problematic frame:

C  [libGLProgrammability.dylib+0x8cc58]  glpLLVMGetFunctionGlobalVariableUse+0x74

No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

An error report file with more information is saved as:

/Applications/MultiMC.app/Data/instances/1.18/.minecraft/hs_err_pid49722.log

If you would like to submit a bug report, please visit:
   http://www.azul.com/support/

 The crash happened outside the Java Virtual Machine in native code.

 See problematic frame for where to report the bug.


Process exited with code 0.
commented

so uh I somehow made it load into worlds but I'm not sure if maybe I just broke it more. I tried to find out more about the "deferred.fsh" thing from the log

this is shaders>program>deferred1.glsl

image

not including that line prevents the crash but the shaders are not working. I tried... unincluding the other things instead but the game kept crashing, and the original log is referring to this file, so it could be the problem.

image

this is the file it's referencing:

void GetMaterials(out float smoothness, out float metalness, out float f0, 
                  out vec3 normal, out vec3 rawAlbedo, vec2 coord) {
    vec2 specularData = texture2D(colortex3, coord).rg;

	smoothness = specularData.r;

	#ifdef COMPBR
		if (smoothness < 0.5) {
			smoothness /= 0.5;
			f0 = 1.0;
		}
		else {
			smoothness = (smoothness - 0.5) / 0.5;
			f0 = 4.0;
		}
		metalness = specularData.g;
	#else
		#if RP_SUPPORT == 3
			f0 = specularData.g;
			metalness = f0 >= 0.9 ? 1.0 : 0.0;
		#else
			metalness = specularData.g;
			f0 = 0.78 * metalness + 0.02;
		#endif
	#endif

	normal = DecodeNormal(texture2D(colortex6, coord).xy);

	rawAlbedo = texture2D(colortex1, coord).rgb;
}


edit: these files are also present in BSL 8 which is crashing too
I don't see them in BSL 7.0 and there are no crashes

I guess I just broke it more :(

commented

Issues with Iris on Apple M1 are no longer being investigated, we do not officially support Apple M1: https://github.com/IrisShaders/Iris/blob/trunk/docs/usage/drivers.md

commented

Maybe a spry developer, such as the ManyMC developer, can take on the nightmare task of building and supplying a version of LWJGL3 that links against ANGLE instead of OpenGL.framework. That may actually prove to be more usable in the future, since Apple don't give a rat's ass about OpenGL support.

commented

ANGLE does OpenGL ES, not OpenGL. They would need to link against https://github.com/openglonmetal/MGL, which is currently in progress (MC support is being looked into by a few people).