From ea2b9cfa217ebbb6ea48d3af94b4ad1553f2ad9e Mon Sep 17 00:00:00 2001 From: IMS212 Date: Sun, 2 Jun 2024 16:44:18 -0700 Subject: [PATCH] Iris 1.7 + 1.20.6 --- README.md | 1 + build.gradle | 30 +++++++++---------- gradle.properties | 8 ++--- gradle/wrapper/gradle-wrapper.properties | 2 +- .../acceleration/EntityBlasBuilder.java | 2 +- .../client/rendering/EntityCapture.java | 4 +-- .../client/rendering/VulkanPipeline.java | 16 +++++----- .../compat/RaytracingShaderSource.java | 3 -- .../vulkanite/lib/other/FormatConverter.java | 2 +- .../mixin/iris/MixinCelestialUniforms.java | 2 +- .../mixin/iris/MixinCommonUniforms.java | 2 +- .../vulkanite/mixin/iris/MixinGlResource.java | 7 ++--- .../vulkanite/mixin/iris/MixinGlTexture.java | 14 ++++----- ...e.java => MixinIrisRenderingPipeline.java} | 24 +++++++-------- .../iris/MixinNativeImageBackedTexture.java | 4 +-- .../mixin/iris/MixinPBRAtlasTexture.java | 2 +- .../iris/MixinPackRenderTargetDirectives.java | 2 +- .../vulkanite/mixin/iris/MixinProgramSet.java | 9 +++--- .../mixin/iris/MixinRenderTarget.java | 12 ++++---- .../iris/MixinShaderPackSourceNames.java | 2 +- .../mixin/iris/MixinShaderStorageBuffer.java | 6 ++-- .../iris/MixinShaderStorageBufferHolder.java | 12 ++++---- .../mixin/iris/MixinStandardMacros.java | 6 ++-- .../ShaderStorageBufferHolderAccessor.java | 4 +-- src/main/resources/fabric.mod.json | 4 +-- src/main/resources/vulkanite.mixins.json | 2 +- 26 files changed, 89 insertions(+), 93 deletions(-) rename src/main/java/me/cortex/vulkanite/mixin/iris/{MixinNewWorldRenderingPipeline.java => MixinIrisRenderingPipeline.java} (86%) diff --git a/README.md b/README.md index 19b7410..becb35f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +ol # Work in progress Minecraft mod that adds hardware raytracing support to minecraft using opengl vulkan interop diff --git a/build.gradle b/build.gradle index a73c356..8828762 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.2-SNAPSHOT' + id 'fabric-loom' version '1.6-SNAPSHOT' id 'maven-publish' } @@ -38,8 +38,8 @@ dependencies { modImplementation("net.fabricmc.fabric-api:fabric-rendering-data-attachment-v1:0.3.38+73761d2e9a") modImplementation(fabricApi.module("fabric-resource-loader-v0", project.fabric_version)) - modImplementation "maven.modrinth:sodium:mc1.20.2-0.5.5" - modImplementation "maven.modrinth:iris:1.6.14+1.20.2" + modImplementation "maven.modrinth:sodium:mc1.20.6-0.5.8" + modImplementation "maven.modrinth:iris:1.7.0+1.20.6" modRuntimeOnly 'org.anarres:jcpp:1.4.14' modRuntimeOnly 'io.github.douira:glsl-transformer:2.0.0-pre13' @@ -106,7 +106,7 @@ publishing { import org.gradle.internal.os.OperatingSystem -project.ext.lwjglVersion = "3.3.1" +project.ext.lwjglVersion = "3.3.3" switch (OperatingSystem.current()) { case OperatingSystem.LINUX: @@ -134,23 +134,23 @@ dependencies { include(implementation("org.lwjgl:lwjgl-shaderc")) include(implementation("org.lwjgl:lwjgl-spvc")) - include(runtimeOnly("org.lwjgl:lwjgl-meshoptimizer:$lwjglVersion:$lwjglNatives")) - include(runtimeOnly("org.lwjgl:lwjgl-vma:$lwjglVersion:$lwjglNatives")) - include(runtimeOnly("org.lwjgl:lwjgl-shaderc:$lwjglVersion:$lwjglNatives")) - include(runtimeOnly("org.lwjgl:lwjgl-spvc:$lwjglVersion:$lwjglNatives")) + include(runtimeOnly("org.lwjgl:lwjgl-meshoptimizer:$lwjglVersion:natives-linux")) + include(runtimeOnly("org.lwjgl:lwjgl-vma:$lwjglVersion:natives-linux")) + include(runtimeOnly("org.lwjgl:lwjgl-shaderc:$lwjglVersion:natives-linux")) + include(runtimeOnly("org.lwjgl:lwjgl-spvc:$lwjglVersion:natives-linux")) - include(implementation("org.lwjgl:lwjgl-meshoptimizer:$lwjglVersion:$lwjglNatives")) - include(implementation("org.lwjgl:lwjgl-vma:$lwjglVersion:$lwjglNatives")) - include(implementation("org.lwjgl:lwjgl-shaderc:$lwjglVersion:$lwjglNatives")) - include(implementation("org.lwjgl:lwjgl-spvc:$lwjglVersion:$lwjglNatives")) + include(implementation("org.lwjgl:lwjgl-meshoptimizer:$lwjglVersion:natives-linux")) + include(implementation("org.lwjgl:lwjgl-vma:$lwjglVersion:natives-linux")) + include(implementation("org.lwjgl:lwjgl-shaderc:$lwjglVersion:natives-linux")) + include(implementation("org.lwjgl:lwjgl-spvc:$lwjglVersion:natives-linux")) implementation "org.lwjgl:lwjgl" implementation "org.lwjgl:lwjgl-glfw" implementation "org.lwjgl:lwjgl-opengl" - runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives" - runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives" - runtimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives" + runtimeOnly "org.lwjgl:lwjgl::natives-linux" + runtimeOnly "org.lwjgl:lwjgl-glfw::natives-linux" + runtimeOnly "org.lwjgl:lwjgl-opengl::natives-linux" } diff --git a/gradle.properties b/gradle.properties index 4e339e7..72a8854 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,12 +2,12 @@ org.gradle.jvmargs=-Xmx4G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.20.2 -yarn_mappings=1.20.2+build.4 -loader_version=0.15.6 +minecraft_version=1.20.6 +yarn_mappings=1.20.6+build.3 +loader_version=0.15.11 #Fabric api -fabric_version=0.91.6+1.20.2 +fabric_version=0.99.4+1.20.6 # Mod Properties mod_version=0.0.4-pre-alpha maven_group=me.cortex diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0c85a1f..20db9ad 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/me/cortex/vulkanite/acceleration/EntityBlasBuilder.java b/src/main/java/me/cortex/vulkanite/acceleration/EntityBlasBuilder.java index e2b1cb4..a89f3fd 100644 --- a/src/main/java/me/cortex/vulkanite/acceleration/EntityBlasBuilder.java +++ b/src/main/java/me/cortex/vulkanite/acceleration/EntityBlasBuilder.java @@ -7,7 +7,7 @@ import me.cortex.vulkanite.lib.memory.VAccelerationStructure; import me.cortex.vulkanite.lib.memory.VBuffer; import me.cortex.vulkanite.lib.other.VUtil; -import net.coderbot.iris.vertices.IrisVertexFormats; +import net.irisshaders.iris.vertices.IrisVertexFormats; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.BufferBuilder; import net.minecraft.client.render.RenderLayer; diff --git a/src/main/java/me/cortex/vulkanite/client/rendering/EntityCapture.java b/src/main/java/me/cortex/vulkanite/client/rendering/EntityCapture.java index c932711..c11a882 100644 --- a/src/main/java/me/cortex/vulkanite/client/rendering/EntityCapture.java +++ b/src/main/java/me/cortex/vulkanite/client/rendering/EntityCapture.java @@ -8,8 +8,8 @@ import me.cortex.vulkanite.lib.memory.VBuffer; import me.cortex.vulkanite.lib.other.VUtil; import me.cortex.vulkanite.lib.other.sync.VFence; -import net.coderbot.iris.mixin.LevelRendererAccessor; -import net.coderbot.iris.vertices.IrisVertexFormats; +import net.irisshaders.iris.mixin.LevelRendererAccessor; +import net.irisshaders.iris.vertices.IrisVertexFormats; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.*; import net.minecraft.client.texture.TextureManager; diff --git a/src/main/java/me/cortex/vulkanite/client/rendering/VulkanPipeline.java b/src/main/java/me/cortex/vulkanite/client/rendering/VulkanPipeline.java index c544a51..f8cc1f2 100644 --- a/src/main/java/me/cortex/vulkanite/client/rendering/VulkanPipeline.java +++ b/src/main/java/me/cortex/vulkanite/client/rendering/VulkanPipeline.java @@ -25,12 +25,12 @@ import me.cortex.vulkanite.lib.shader.reflection.ShaderReflection; import me.cortex.vulkanite.mixin.iris.MixinCelestialUniforms; import me.cortex.vulkanite.mixin.iris.MixinCommonUniforms; -import net.coderbot.iris.gl.buffer.ShaderStorageBuffer; -import net.coderbot.iris.texture.pbr.PBRTextureHolder; -import net.coderbot.iris.texture.pbr.PBRTextureManager; -import net.coderbot.iris.uniforms.CapturedRenderingState; -import net.coderbot.iris.uniforms.CommonUniforms; -import net.coderbot.iris.uniforms.SystemTimeUniforms; +import net.irisshaders.iris.gl.buffer.ShaderStorageBuffer; +import net.irisshaders.iris.texture.pbr.PBRTextureHolder; +import net.irisshaders.iris.texture.pbr.PBRTextureManager; +import net.irisshaders.iris.uniforms.CapturedRenderingState; +import net.irisshaders.iris.uniforms.CommonUniforms; +import net.irisshaders.iris.uniforms.SystemTimeUniforms; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.Camera; import net.minecraft.client.texture.AbstractTexture; @@ -102,12 +102,12 @@ public VulkanPipeline(VContext ctx, AccelerationManager accelerationManager, Ray this.blockAtlasNormalView = new SharedImageViewTracker(ctx, () -> { AbstractTexture blockAtlas = MinecraftClient.getInstance().getTextureManager().getTexture(new Identifier("minecraft", "textures/atlas/blocks.png")); PBRTextureHolder holder = PBRTextureManager.INSTANCE.getOrLoadHolder(blockAtlas.getGlId());//((TextureAtlasExtension)blockAtlas).getPBRHolder() - return ((IVGImage) holder.getNormalTexture()).getVGImage(); + return ((IVGImage) holder.normalTexture()).getVGImage(); }); this.blockAtlasSpecularView = new SharedImageViewTracker(ctx, () -> { AbstractTexture blockAtlas = MinecraftClient.getInstance().getTextureManager().getTexture(new Identifier("minecraft", "textures/atlas/blocks.png")); PBRTextureHolder holder = PBRTextureManager.INSTANCE.getOrLoadHolder(blockAtlas.getGlId());//((TextureAtlasExtension)blockAtlas).getPBRHolder() - return ((IVGImage) holder.getSpecularTexture()).getVGImage(); + return ((IVGImage) holder.specularTexture()).getVGImage(); }); this.placeholderSpecular = ctx.memory.createImage2D(4, 4, 1, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); this.placeholderSpecularView = VImageView.create(ctx, placeholderSpecular); diff --git a/src/main/java/me/cortex/vulkanite/compat/RaytracingShaderSource.java b/src/main/java/me/cortex/vulkanite/compat/RaytracingShaderSource.java index 1c50628..833c6d5 100644 --- a/src/main/java/me/cortex/vulkanite/compat/RaytracingShaderSource.java +++ b/src/main/java/me/cortex/vulkanite/compat/RaytracingShaderSource.java @@ -1,8 +1,5 @@ package me.cortex.vulkanite.compat; -import net.coderbot.iris.shaderpack.ProgramDirectives; -import net.coderbot.iris.shaderpack.ProgramSet; - public class RaytracingShaderSource { public record RayHitSource(String close, String any, String intersection) {} public final String name; diff --git a/src/main/java/me/cortex/vulkanite/lib/other/FormatConverter.java b/src/main/java/me/cortex/vulkanite/lib/other/FormatConverter.java index ee0e778..fedd1de 100644 --- a/src/main/java/me/cortex/vulkanite/lib/other/FormatConverter.java +++ b/src/main/java/me/cortex/vulkanite/lib/other/FormatConverter.java @@ -1,6 +1,6 @@ package me.cortex.vulkanite.lib.other; -import net.coderbot.iris.gl.texture.InternalTextureFormat; +import net.irisshaders.iris.gl.texture.InternalTextureFormat; import static org.lwjgl.opengl.GL11C.GL_RGB8; import static org.lwjgl.opengl.GL11C.GL_RGBA16; diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinCelestialUniforms.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinCelestialUniforms.java index 660ab9e..f810a3f 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinCelestialUniforms.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinCelestialUniforms.java @@ -1,6 +1,6 @@ package me.cortex.vulkanite.mixin.iris; -import net.coderbot.iris.uniforms.CelestialUniforms; +import net.irisshaders.iris.uniforms.CelestialUniforms; import org.joml.Vector4f; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Invoker; diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinCommonUniforms.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinCommonUniforms.java index 4d07ce4..b7a4069 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinCommonUniforms.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinCommonUniforms.java @@ -1,6 +1,6 @@ package me.cortex.vulkanite.mixin.iris; -import net.coderbot.iris.uniforms.CommonUniforms; +import net.irisshaders.iris.uniforms.CommonUniforms; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Invoker; diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinGlResource.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinGlResource.java index 87e4d0f..b6cb42c 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinGlResource.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinGlResource.java @@ -3,10 +3,9 @@ import me.cortex.vulkanite.client.Vulkanite; import me.cortex.vulkanite.compat.IRenderTargetVkGetter; import me.cortex.vulkanite.lib.memory.VGImage; -import net.coderbot.iris.gl.GlResource; -import net.coderbot.iris.gl.texture.InternalTextureFormat; -import net.coderbot.iris.gl.texture.PixelFormat; -import net.coderbot.iris.rendertarget.RenderTarget; +import net.irisshaders.iris.gl.GlResource; +import net.irisshaders.iris.gl.texture.InternalTextureFormat; +import net.irisshaders.iris.gl.texture.PixelFormat; import org.spongepowered.asm.mixin.*; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinGlTexture.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinGlTexture.java index 5b43d0c..90eb669 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinGlTexture.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinGlTexture.java @@ -6,11 +6,11 @@ import me.cortex.vulkanite.lib.base.VRef; import me.cortex.vulkanite.lib.memory.VGImage; import me.cortex.vulkanite.lib.other.FormatConverter; -import net.coderbot.iris.gl.IrisRenderSystem; -import net.coderbot.iris.gl.texture.GlTexture; -import net.coderbot.iris.gl.texture.InternalTextureFormat; -import net.coderbot.iris.gl.texture.TextureType; -import net.coderbot.iris.shaderpack.texture.TextureFilteringData; +import net.irisshaders.iris.gl.IrisRenderSystem; +import net.irisshaders.iris.gl.texture.GlTexture; +import net.irisshaders.iris.gl.texture.InternalTextureFormat; +import net.irisshaders.iris.gl.texture.TextureType; +import net.irisshaders.iris.shaderpack.texture.TextureFilteringData; import org.lwjgl.opengl.GL30; import org.spongepowered.asm.mixin.*; import org.spongepowered.asm.mixin.injection.At; @@ -31,7 +31,7 @@ private static int redirectGen() { return -1; } - @Redirect(method = "", at = @At(value = "INVOKE", target = "Lnet/coderbot/iris/gl/texture/GlTexture;getGlId()I", ordinal = 0)) + @Redirect(method = "", at = @At(value = "INVOKE", target = "Lnet/irisshaders/iris/gl/texture/GlTexture;getGlId()I", ordinal = 0)) private int redirectTextureCreation(GlTexture instance, TextureType target, int sizeX, int sizeY, int sizeZ, int internalFormat, int format, int pixelType, byte[] pixels, TextureFilteringData filteringData) { // Before getting the texture id, create the texture that wasn't created earlier @@ -65,7 +65,7 @@ private int redirectTextureCreation(GlTexture instance, TextureType target, int return sharedImage.get().glId; } - @Redirect(method="", at = @At(value = "INVOKE", target = "Lnet/coderbot/iris/gl/texture/TextureType;apply(IIIIIIILjava/nio/ByteBuffer;)V")) + @Redirect(method="", at = @At(value = "INVOKE", target = "Lnet/irisshaders/iris/gl/texture/TextureType;apply(IIIIIIILjava/nio/ByteBuffer;)V")) private void redirectUpload(TextureType instance, int glId, int width, int height, int depth, int internalFormat, int format, int pixelType, ByteBuffer data) { int target = instance.getGlType(); diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinNewWorldRenderingPipeline.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinIrisRenderingPipeline.java similarity index 86% rename from src/main/java/me/cortex/vulkanite/mixin/iris/MixinNewWorldRenderingPipeline.java rename to src/main/java/me/cortex/vulkanite/mixin/iris/MixinIrisRenderingPipeline.java index 370e96a..adf5a72 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinNewWorldRenderingPipeline.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinIrisRenderingPipeline.java @@ -8,16 +8,16 @@ import me.cortex.vulkanite.lib.base.VContext; import me.cortex.vulkanite.lib.base.VRef; import me.cortex.vulkanite.lib.memory.VGImage; -import net.coderbot.iris.gl.buffer.ShaderStorageBuffer; -import net.coderbot.iris.gl.texture.TextureAccess; -import net.coderbot.iris.gl.buffer.ShaderStorageBufferHolder; -import net.coderbot.iris.mixin.LevelRendererAccessor; -import net.coderbot.iris.pipeline.CustomTextureManager; -import net.coderbot.iris.pipeline.newshader.NewWorldRenderingPipeline; -import net.coderbot.iris.rendertarget.RenderTargets; -import net.coderbot.iris.shaderpack.ProgramSet; -import net.coderbot.iris.shaderpack.texture.TextureStage; -import net.coderbot.iris.uniforms.CelestialUniforms; +import net.irisshaders.iris.gl.buffer.ShaderStorageBuffer; +import net.irisshaders.iris.gl.texture.TextureAccess; +import net.irisshaders.iris.gl.buffer.ShaderStorageBufferHolder; +import net.irisshaders.iris.mixin.LevelRendererAccessor; +import net.irisshaders.iris.pipeline.CustomTextureManager; +import net.irisshaders.iris.pipeline.IrisRenderingPipeline; +import net.irisshaders.iris.shaderpack.programs.ProgramSet; +import net.irisshaders.iris.shaderpack.texture.TextureStage; +import net.irisshaders.iris.targets.RenderTargets; +import net.irisshaders.iris.uniforms.CelestialUniforms; import net.minecraft.client.render.Camera; import net.minecraft.client.MinecraftClient; import org.spongepowered.asm.mixin.Final; @@ -33,8 +33,8 @@ import java.util.Comparator; import java.util.List; -@Mixin(value = NewWorldRenderingPipeline.class, remap = false) -public class MixinNewWorldRenderingPipeline { +@Mixin(value = IrisRenderingPipeline.class, remap = false) +public class MixinIrisRenderingPipeline { @Shadow @Final private RenderTargets renderTargets; @Shadow @Final private CustomTextureManager customTextureManager; diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinNativeImageBackedTexture.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinNativeImageBackedTexture.java index 5aa9c01..941d698 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinNativeImageBackedTexture.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinNativeImageBackedTexture.java @@ -7,8 +7,8 @@ import me.cortex.vulkanite.compat.IVGImage; import me.cortex.vulkanite.lib.base.VRef; import me.cortex.vulkanite.mixin.minecraft.MixinAbstractTexture; -import net.coderbot.iris.gl.IrisRenderSystem; -import net.coderbot.iris.rendertarget.NativeImageBackedCustomTexture; +import net.irisshaders.iris.gl.IrisRenderSystem; +import net.irisshaders.iris.targets.backed.NativeImageBackedCustomTexture; import net.minecraft.client.texture.AbstractTexture; import net.minecraft.client.texture.NativeImage; import net.minecraft.client.texture.NativeImageBackedTexture; diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinPBRAtlasTexture.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinPBRAtlasTexture.java index 709c0b9..579538b 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinPBRAtlasTexture.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinPBRAtlasTexture.java @@ -4,7 +4,7 @@ import me.cortex.vulkanite.client.Vulkanite; import me.cortex.vulkanite.compat.IVGImage; import me.cortex.vulkanite.lib.base.VRef; -import net.coderbot.iris.texture.pbr.PBRAtlasTexture; +import net.irisshaders.iris.texture.pbr.PBRAtlasTexture; import net.minecraft.client.texture.AbstractTexture; import net.minecraft.client.texture.SpriteAtlasTexture; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinPackRenderTargetDirectives.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinPackRenderTargetDirectives.java index 81608b4..e5c70f8 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinPackRenderTargetDirectives.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinPackRenderTargetDirectives.java @@ -1,7 +1,7 @@ package me.cortex.vulkanite.mixin.iris; import com.google.common.collect.ImmutableSet; -import net.coderbot.iris.shaderpack.PackRenderTargetDirectives; +import net.irisshaders.iris.shaderpack.properties.PackRenderTargetDirectives; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinProgramSet.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinProgramSet.java index f301105..618032d 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinProgramSet.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinProgramSet.java @@ -2,11 +2,10 @@ import me.cortex.vulkanite.compat.IGetRaytracingSource; import me.cortex.vulkanite.compat.RaytracingShaderSource; -import net.coderbot.iris.shaderpack.ProgramSet; -import net.coderbot.iris.shaderpack.ProgramSource; -import net.coderbot.iris.shaderpack.ShaderPack; -import net.coderbot.iris.shaderpack.ShaderProperties; -import net.coderbot.iris.shaderpack.include.AbsolutePackPath; +import net.irisshaders.iris.shaderpack.ShaderPack; +import net.irisshaders.iris.shaderpack.include.AbsolutePackPath; +import net.irisshaders.iris.shaderpack.programs.ProgramSet; +import net.irisshaders.iris.shaderpack.properties.ShaderProperties; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinRenderTarget.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinRenderTarget.java index 6418abd..5377830 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinRenderTarget.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinRenderTarget.java @@ -5,9 +5,9 @@ import me.cortex.vulkanite.lib.base.VRef; import me.cortex.vulkanite.lib.memory.VGImage; import me.cortex.vulkanite.lib.other.FormatConverter; -import net.coderbot.iris.gl.texture.InternalTextureFormat; -import net.coderbot.iris.gl.texture.PixelFormat; -import net.coderbot.iris.rendertarget.RenderTarget; +import net.irisshaders.iris.gl.texture.InternalTextureFormat; +import net.irisshaders.iris.gl.texture.PixelFormat; +import net.irisshaders.iris.targets.RenderTarget; import org.spongepowered.asm.mixin.*; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -33,15 +33,15 @@ private void redirectGen(int[] textures) { } - @Redirect(method = "", at = @At(value = "INVOKE", target = "Lnet/coderbot/iris/rendertarget/RenderTarget;setupTexture(IIIZ)V", ordinal = 0)) + @Redirect(method = "", at = @At(value = "INVOKE", target = "Lnet/irisshaders/iris/targets/RenderTarget;setupTexture(IIIZ)V", ordinal = 0)) private void redirectMain(RenderTarget instance, int id, int width, int height, boolean allowsLinear) { setupTextures(width, height, allowsLinear); } - @Redirect(method = "", at = @At(value = "INVOKE", target = "Lnet/coderbot/iris/rendertarget/RenderTarget;setupTexture(IIIZ)V", ordinal = 1)) + @Redirect(method = "", at = @At(value = "INVOKE", target = "Lnet/irisshaders/iris/targets/RenderTarget;setupTexture(IIIZ)V", ordinal = 1)) private void redirectAlt(RenderTarget instance, int id, int width, int height, boolean allowsLinear) {} - @Redirect(method = "setupTexture", at = @At(value = "INVOKE",target = "Lnet/coderbot/iris/rendertarget/RenderTarget;resizeTexture(III)V")) + @Redirect(method = "setupTexture", at = @At(value = "INVOKE",target = "Lnet/irisshaders/iris/targets/RenderTarget;resizeTexture(III)V")) private void redirectResize(RenderTarget instance, int t, int w, int h) {} @Overwrite diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinShaderPackSourceNames.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinShaderPackSourceNames.java index 14b6d02..f75a4df 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinShaderPackSourceNames.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinShaderPackSourceNames.java @@ -1,7 +1,7 @@ package me.cortex.vulkanite.mixin.iris; import com.google.common.collect.ImmutableList; -import net.coderbot.iris.shaderpack.include.ShaderPackSourceNames; +import net.irisshaders.iris.shaderpack.include.ShaderPackSourceNames; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinShaderStorageBuffer.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinShaderStorageBuffer.java index 5d15cae..2ba5ba1 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinShaderStorageBuffer.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinShaderStorageBuffer.java @@ -4,8 +4,8 @@ import me.cortex.vulkanite.compat.IVGBuffer; import me.cortex.vulkanite.lib.base.VRef; import me.cortex.vulkanite.lib.memory.VGBuffer; -import net.coderbot.iris.gl.IrisRenderSystem; -import net.coderbot.iris.gl.buffer.ShaderStorageBuffer; +import net.irisshaders.iris.gl.IrisRenderSystem; +import net.irisshaders.iris.gl.buffer.ShaderStorageBuffer; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Unique; @@ -36,7 +36,7 @@ public void setBuffer(VRef buffer) { } } - @Redirect(method = "destroy", at = @At(value = "INVOKE", target = "Lnet/coderbot/iris/gl/IrisRenderSystem;deleteBuffers(I)V")) + @Redirect(method = "destroy", at = @At(value = "INVOKE", target = "Lnet/irisshaders/iris/gl/IrisRenderSystem;deleteBuffers(I)V")) private void redirectDelete(int id) { if (vkBuffer != null) { vkBuffer = null; diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinShaderStorageBufferHolder.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinShaderStorageBufferHolder.java index b436e25..d569e84 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinShaderStorageBufferHolder.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinShaderStorageBufferHolder.java @@ -5,10 +5,10 @@ import me.cortex.vulkanite.compat.IVGBuffer; import me.cortex.vulkanite.lib.base.VRef; import me.cortex.vulkanite.lib.memory.VGBuffer; -import net.coderbot.iris.gl.IrisRenderSystem; -import net.coderbot.iris.gl.buffer.ShaderStorageBuffer; -import net.coderbot.iris.gl.buffer.ShaderStorageBufferHolder; -import net.coderbot.iris.gl.buffer.ShaderStorageInfo; +import net.irisshaders.iris.gl.IrisRenderSystem; +import net.irisshaders.iris.gl.buffer.ShaderStorageBuffer; +import net.irisshaders.iris.gl.buffer.ShaderStorageBufferHolder; +import net.irisshaders.iris.gl.buffer.ShaderStorageInfo; import org.lwjgl.opengl.GL43C; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; @@ -22,7 +22,7 @@ public class MixinShaderStorageBufferHolder { @Unique private ShaderStorageInfo storageInfo; - @Redirect(method = "lambda$new$0", at = @At(value = "INVOKE", target = "Lnet/coderbot/iris/gl/buffer/ShaderStorageInfo;relative()Z")) + @Redirect(method = "lambda$new$0", at = @At(value = "INVOKE", target = "Lnet/irisshaders/iris/gl/buffer/ShaderStorageInfo;relative()Z")) private boolean alwaysReturnTrue(ShaderStorageInfo instance) { this.storageInfo = instance; return true; @@ -32,7 +32,7 @@ private static VRef alloc(int size) { return Vulkanite.INSTANCE.getCtx().memory.createSharedBuffer(size, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); } - @Redirect(method = "lambda$new$0", at = @At(value = "INVOKE", target = "Lnet/coderbot/iris/gl/buffer/ShaderStorageBuffer;resizeIfRelative(II)V")) + @Redirect(method = "lambda$new$0", at = @At(value = "INVOKE", target = "Lnet/irisshaders/iris/gl/buffer/ShaderStorageBuffer;resizeIfRelative(II)V")) private void redirectSizeAllocation(ShaderStorageBuffer instance, int width, int height) { if (storageInfo.relative()) { instance.resizeIfRelative(width, height); diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinStandardMacros.java b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinStandardMacros.java index 4b51cd1..a22d2fa 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/MixinStandardMacros.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/MixinStandardMacros.java @@ -1,7 +1,7 @@ package me.cortex.vulkanite.mixin.iris; -import net.coderbot.iris.gl.shader.StandardMacros; -import net.coderbot.iris.shaderpack.StringPair; +import net.irisshaders.iris.gl.shader.StandardMacros; +import net.irisshaders.iris.helpers.StringPair; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -12,7 +12,7 @@ @Mixin(value = StandardMacros.class, remap = false) public class MixinStandardMacros { - @Inject(method = "createStandardEnvironmentDefines", at = @At(value = "INVOKE", target = "Lnet/coderbot/iris/gl/shader/StandardMacros;define(Ljava/util/List;Ljava/lang/String;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD) + @Inject(method = "createStandardEnvironmentDefines", at = @At(value = "INVOKE", target = "Lnet/irisshaders/iris/gl/shader/StandardMacros;define(Ljava/util/List;Ljava/lang/String;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD) private static void injectVulkaniteDefine(CallbackInfoReturnable> cir, ArrayList defines) { defines.add(new StringPair("VULKANITE", " ")); } diff --git a/src/main/java/me/cortex/vulkanite/mixin/iris/ShaderStorageBufferHolderAccessor.java b/src/main/java/me/cortex/vulkanite/mixin/iris/ShaderStorageBufferHolderAccessor.java index 5d78387..ccba5a1 100644 --- a/src/main/java/me/cortex/vulkanite/mixin/iris/ShaderStorageBufferHolderAccessor.java +++ b/src/main/java/me/cortex/vulkanite/mixin/iris/ShaderStorageBufferHolderAccessor.java @@ -1,7 +1,7 @@ package me.cortex.vulkanite.mixin.iris; -import net.coderbot.iris.gl.buffer.ShaderStorageBuffer; -import net.coderbot.iris.gl.buffer.ShaderStorageBufferHolder; +import net.irisshaders.iris.gl.buffer.ShaderStorageBuffer; +import net.irisshaders.iris.gl.buffer.ShaderStorageBufferHolder; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 2cc756a..84ccda1 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -15,7 +15,7 @@ ], "depends": { "fabricloader": ">=0.14.21", - "iris": "=1.6.14", - "sodium": "=0.5.5" + "iris": "=1.7.0", + "sodium": "=0.5.8" } } diff --git a/src/main/resources/vulkanite.mixins.json b/src/main/resources/vulkanite.mixins.json index 7934e92..36288e0 100644 --- a/src/main/resources/vulkanite.mixins.json +++ b/src/main/resources/vulkanite.mixins.json @@ -9,7 +9,7 @@ "iris.MixinGlResource", "iris.MixinGlTexture", "iris.MixinNativeImageBackedTexture", - "iris.MixinNewWorldRenderingPipeline", + "iris.MixinIrisRenderingPipeline", "iris.MixinPackRenderTargetDirectives", "iris.MixinPBRAtlasTexture", "iris.MixinProgramSet",