From 44ea376962823cfbee12babfeed569de7a38f7fe Mon Sep 17 00:00:00 2001 From: IMS212 Date: Tue, 1 Aug 2023 17:52:55 -0700 Subject: [PATCH] Update to RC1 --- buildscript/src/main/java/Buildscript.java | 2 +- .../sodium/impl/vertex_format/entity_xhfp/EntityVertex.java | 3 +-- .../sodium/impl/vertex_format/entity_xhfp/GlyphVertexExt.java | 3 +-- .../iris/compat/sodium/mixin/copyEntity/ModelPartMixin.java | 3 +-- .../mixin/copyEntity/shadows/EntityRenderDispatcherMixin.java | 3 +-- .../iris/compat/sodium/mixin/fast_render/MixinModelPart.java | 3 +-- .../iris/compat/sodium/mixin/font/MixinGlyphRenderer.java | 3 +-- .../vertex_format/entity/MixinEntityRenderDispatcher.java | 3 +-- 8 files changed, 8 insertions(+), 15 deletions(-) diff --git a/buildscript/src/main/java/Buildscript.java b/buildscript/src/main/java/Buildscript.java index ad3dbfbf0f..5122046a27 100644 --- a/buildscript/src/main/java/Buildscript.java +++ b/buildscript/src/main/java/Buildscript.java @@ -46,7 +46,7 @@ public class Buildscript extends SimpleFabricProject { static final boolean SODIUM = true; static final boolean CUSTOM_SODIUM = true; static final String MC_VERSION = "1.20.1"; - static final String customSodiumName = "sodium-fabric-mc1.20.1-0.5.0-beta3+git.c207837.jar"; + static final String customSodiumName = "sodium-fabric-mc1.20.1-0.5.0-rc1.jar"; private static final String[] SOURCE_SETS = new String[] { "main", diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertex.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertex.java index c45cf771c8..99dc7ed331 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertex.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertex.java @@ -3,7 +3,6 @@ import com.mojang.blaze3d.vertex.PoseStack; import me.jellysquid.mods.sodium.client.model.quad.ModelQuadView; import net.caffeinemc.mods.sodium.api.math.MatrixHelper; -import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate; import net.caffeinemc.mods.sodium.api.util.NormI8; import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter; import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription; @@ -91,7 +90,7 @@ public static void writeQuadVertices(VertexBufferWriter writer, PoseStack.Pose m Matrix3f matNormal = matrices.normal(); Matrix4f matPosition = matrices.pose(); - try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) { + try (MemoryStack stack = MemoryStack.stackPush()) { long buffer = stack.nmalloc(4 * STRIDE); long ptr = buffer; diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/GlyphVertexExt.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/GlyphVertexExt.java index da05e964b7..420c150c9b 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/GlyphVertexExt.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/GlyphVertexExt.java @@ -2,7 +2,6 @@ import com.mojang.blaze3d.vertex.PoseStack; import me.jellysquid.mods.sodium.client.model.quad.ModelQuadView; -import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate; import net.caffeinemc.mods.sodium.api.util.NormI8; import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter; import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription; @@ -101,7 +100,7 @@ public static void writeQuadVertices(VertexBufferWriter writer, PoseStack.Pose m Matrix3f matNormal = matrices.normal(); Matrix4f matPosition = matrices.pose(); - try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) { + try (MemoryStack stack = MemoryStack.stackPush()) { long buffer = stack.nmalloc(4 * STRIDE); long ptr = buffer; diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/copyEntity/ModelPartMixin.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/copyEntity/ModelPartMixin.java index 985689c0ff..14081432ce 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/copyEntity/ModelPartMixin.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/copyEntity/ModelPartMixin.java @@ -4,7 +4,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import me.jellysquid.mods.sodium.client.model.ModelCuboidAccessor; import me.jellysquid.mods.sodium.client.render.vertex.VertexConsumerUtils; -import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate; import me.jellysquid.mods.sodium.client.render.immediate.model.ModelCuboid; import net.caffeinemc.mods.sodium.api.util.NormI8; import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription; @@ -79,7 +78,7 @@ private void renderCuboidsFast(PoseStack.Pose matrices, VertexConsumer vertexCon for (ModelCuboid cuboid : this.sodium$cuboids) { cuboid.updateVertices(matrices.pose()); - try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) { + try (MemoryStack stack = MemoryStack.stackPush()) { long buffer = stack.nmalloc(4 * 6 * stride); long ptr = buffer; diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/copyEntity/shadows/EntityRenderDispatcherMixin.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/copyEntity/shadows/EntityRenderDispatcherMixin.java index 12851c20d8..96cdedce93 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/copyEntity/shadows/EntityRenderDispatcherMixin.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/copyEntity/shadows/EntityRenderDispatcherMixin.java @@ -2,7 +2,6 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate; import net.caffeinemc.mods.sodium.api.util.NormI8; import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter; import net.caffeinemc.mods.sodium.api.vertex.format.common.ModelVertex; @@ -112,7 +111,7 @@ private static void renderShadowPart(PoseStack.Pose matrices, VertexConsumer ver int stride = extended ? EntityVertex.STRIDE : ModelVertex.STRIDE; - try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) { + try (MemoryStack stack = MemoryStack.stackPush()) { long buffer = stack.nmalloc(4 * stride); long ptr = buffer; diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/fast_render/MixinModelPart.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/fast_render/MixinModelPart.java index f91512be79..7b62f82667 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/fast_render/MixinModelPart.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/fast_render/MixinModelPart.java @@ -4,7 +4,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import me.jellysquid.mods.sodium.client.model.ModelCuboidAccessor; import me.jellysquid.mods.sodium.client.render.immediate.model.ModelCuboid; -import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate; import net.caffeinemc.mods.sodium.api.util.ColorABGR; import net.caffeinemc.mods.sodium.api.util.NormI8; import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter; @@ -68,7 +67,7 @@ private void compile(PoseStack.Pose matrices, VertexConsumer vertexConsumer, int cuboid.updateVertices(matrices.pose()); - try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) { + try (MemoryStack stack = MemoryStack.stackPush()) { long buffer = stack.nmalloc(4 * 6 * (extend ? EntityVertex.STRIDE : ModelVertex.STRIDE)); long ptr = buffer; diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/font/MixinGlyphRenderer.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/font/MixinGlyphRenderer.java index 7c8bc7e0d2..eb36d14635 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/font/MixinGlyphRenderer.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/font/MixinGlyphRenderer.java @@ -1,7 +1,6 @@ package net.coderbot.iris.compat.sodium.mixin.font; import com.mojang.blaze3d.vertex.VertexConsumer; -import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate; import net.caffeinemc.mods.sodium.api.util.ColorABGR; import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter; import net.caffeinemc.mods.sodium.api.vertex.format.common.GlyphVertex; @@ -72,7 +71,7 @@ public void render(boolean italic, float x, float y, Matrix4f matrix, VertexCons boolean ext = extend(); int stride = ext ? GlyphVertexExt.STRIDE : GlyphVertex.STRIDE; - try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) { + try (MemoryStack stack = MemoryStack.stackPush()) { long buffer = stack.nmalloc(4 * stride); long ptr = buffer; diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/entity/MixinEntityRenderDispatcher.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/entity/MixinEntityRenderDispatcher.java index cb85303431..0fbcb59bbb 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/entity/MixinEntityRenderDispatcher.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/entity/MixinEntityRenderDispatcher.java @@ -3,7 +3,6 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import net.caffeinemc.mods.sodium.api.math.MatrixHelper; -import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate; import net.caffeinemc.mods.sodium.api.util.ColorABGR; import net.caffeinemc.mods.sodium.api.util.NormI8; import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter; @@ -63,7 +62,7 @@ private static void renderShadowPart(PoseStack.Pose matrices, VertexConsumer ver float midV = (v1 + v2) / 2; int stride = extended ? EntityVertex.STRIDE : ModelVertex.STRIDE; - try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) { + try (MemoryStack stack = MemoryStack.stackPush()) { long buffer = stack.nmalloc(4 * stride); long ptr = buffer;