Oculus

Oculus

60M Downloads

Attempting to implement SSBO results in failure to load the shader on supported API

EtiTheSpirit opened this issue ยท 1 comments

commented

What happened?

Attempting to implement an SSBO causes my shader to fail to load. A minimal reproduction is possible.

Reproduction:

Create a minimal shader pack. This shader pack should include shader.properties and gbuffers_textured.fsh

The contents of shader.properties should be as follows:

iris.features.required=SSBO
bufferObject.0=16

The contents of gbuffers_textured.fsh should be as follows:

#version 330 compatibility
// #define USE_BUFFERS

#ifdef USE_BUFFERS
layout(std430, binding = 0) buffer testBuffer {
	vec4 testValue;
};
#endif

void main() {
    gl_FragData[0] = vec4(0, 0, 0, 1);
}
  1. This shader should function; all entities and the world should turn matte black.
  2. Edit the shader, and uncomment line 2 #define USE_BUFFERS
  3. This shader will fail to load with the provided error below.

Screenshots

No response

Relevant log output

The error is quite strange. This only ever happens when I have a shader issue, and shaders otherwise work perfectly.

[30Sep2024 15:35:47.735] [Render thread/ERROR] [Oculus/]: Failed to create shader rendering pipeline, disabling shaders!
java.lang.RuntimeException: net.minecraft.server.ChainedJsonException: Invalid shaders/core/textured.json: The call m_166612_ is not cancellable.
	at net.irisshaders.iris.pipeline.IrisRenderingPipeline.lambda$new$12(IrisRenderingPipeline.java:429) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.pipeline.programs.ShaderMap.<init>(ShaderMap.java:21) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.pipeline.IrisRenderingPipeline.<init>(IrisRenderingPipeline.java:413) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.Iris.createPipeline(Iris.java:608) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.pipeline.PipelineManager.preparePipeline(PipelineManager.java:33) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.Iris.reload(Iris.java:559) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.Iris.toggleShaders(Iris.java:214) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.Iris.handleKeybinds(Iris.java:187) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.Iris.onKeyInput(Iris.java:129) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) ~[eventbus-6.0.5.jar%23137!/:?]
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) ~[eventbus-6.0.5.jar%23137!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%23137!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%23137!/:?]
	at net.minecraftforge.client.ForgeHooksClient.onKeyInput(ForgeHooksClient.java:738) ~[forge-1.20.1-47.3.0-universal.jar%23431!/:?]
	at net.minecraft.client.KeyboardHandler.m_90893_(KeyboardHandler.java:431) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.minecraft.client.KeyboardHandler.m_167831_(KeyboardHandler.java:462) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:102) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.minecraft.client.KeyboardHandler.m_90938_(KeyboardHandler.java:461) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at org.lwjgl.glfw.GLFWKeyCallbackI.callback(GLFWKeyCallbackI.java:44) ~[lwjgl-glfw-3.3.1.jar%2386!/:build 7]
	at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.3.1.jar%2398!/:build 7]
	at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3403) ~[lwjgl-glfw-3.3.1.jar%2386!/:build 7]
	at com.mojang.blaze3d.systems.RenderSystem.pollEvents(RenderSystem.java:201) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:219) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at com.mojang.blaze3d.platform.Window.m_85435_(Window.java:274) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1170) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:718) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.minecraft.client.main.Main.main(Main.java:218) ~[minecraft-1.20.1-client.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.3.0.jar:?]
	at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.3.0.jar:?]
	at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.3.0.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:67) ~[?:?]
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100) ~[?:?]
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) ~[?:?]
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) ~[?:?]
Caused by: net.minecraft.server.ChainedJsonException: Invalid shaders/core/textured.json: The call m_166612_ is not cancellable.
	at net.minecraft.server.ChainedJsonException.m_135906_(ChainedJsonException.java:48) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.minecraft.client.renderer.ShaderInstance.<init>(ShaderInstance.java:187) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.minecraft.client.renderer.ShaderInstance.<init>(ShaderInstance.java:103) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.irisshaders.iris.pipeline.programs.ExtendedShader.<init>(ExtendedShader.java:81) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.pipeline.programs.ShaderCreator.create(ShaderCreator.java:111) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.pipeline.IrisRenderingPipeline.createShader(IrisRenderingPipeline.java:699) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.pipeline.IrisRenderingPipeline.createShader(IrisRenderingPipeline.java:676) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.pipeline.IrisRenderingPipeline.lambda$new$12(IrisRenderingPipeline.java:422) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	... 49 more
Caused by: org.spongepowered.asm.mixin.injection.callback.CancellationException: The call m_166612_ is not cancellable.
	at org.spongepowered.asm.mixin.injection.callback.CallbackInfo.cancel(CallbackInfo.java:101) ~[Connector-1.0.0-beta.45+1.20.1.jar%23289%23292!/:0.12.11+mixin.0.8.5]
	at com.mojang.blaze3d.shaders.Program.handler$bdk000$oculus$iris$causeException(Program.java:535) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at com.mojang.blaze3d.shaders.Program.m_166612_(Program.java:68) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at com.mojang.blaze3d.shaders.Program.m_166604_(Program.java:51) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.minecraft.client.renderer.ShaderInstance.m_173340_(ShaderInstance.java:222) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.minecraft.client.renderer.ShaderInstance.<init>(ShaderInstance.java:172) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.minecraft.client.renderer.ShaderInstance.<init>(ShaderInstance.java:103) ~[client-1.20.1-20230612.114412-srg.jar%23426!/:?]
	at net.irisshaders.iris.pipeline.programs.ExtendedShader.<init>(ExtendedShader.java:81) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.pipeline.programs.ShaderCreator.create(ShaderCreator.java:111) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.pipeline.IrisRenderingPipeline.createShader(IrisRenderingPipeline.java:699) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.pipeline.IrisRenderingPipeline.createShader(IrisRenderingPipeline.java:676) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]
	at net.irisshaders.iris.pipeline.IrisRenderingPipeline.lambda$new$12(IrisRenderingPipeline.java:422) ~[oculus-mc1.20.1-1.7.0.jar%23379!/:?]

Minecraft Version

1.20.1

Oculus Version

Oculus 1.7.0

Rubidium / Embeddium Version

Embeddium 0.3.31

Operating System

Windows 10

What is your GPU?

Nvidia RTX 3070TI

Java Version

17.0.1

Additional context

No response

commented

This issue was caused by a #version value which was too old.

Replacing #version 330 compatibility with #version 460 compatibility (the latest, likely a bit much) fixed this issue.