Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.caffeinemc.mods.sodium.client.gui.SodiumOptions;
import net.caffeinemc.mods.sodium.client.services.PlatformRuntimeInformation;
import net.caffeinemc.mods.sodium.mixin.features.gui.hooks.debug.DebugScreenEntriesAccessor;
import net.minecraft.client.gui.components.debug.DebugEntryNoop;
import net.minecraft.resources.Identifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -20,6 +21,7 @@ public class SodiumClientMod {
private static final Logger LOGGER = LoggerFactory.getLogger("Sodium");
public static final Identifier SODIUM_DEBUG_ENTRY_FULL = Identifier.fromNamespaceAndPath("sodium", "debug_full");
public static final Identifier SODIUM_DEBUG_ENTRY_REDUCED = Identifier.fromNamespaceAndPath("sodium", "debug_reduced");
public static final Identifier SODIUM_DEBUG_ENTRY_BUFFER_ARENA = Identifier.fromNamespaceAndPath("sodium", "buffer_arena");
public static final Identifier SODIUM_FPS_PERCENTILES = Identifier.fromNamespaceAndPath("sodium", "fps_percentiles");

private static String MOD_VERSION;
Expand All @@ -28,6 +30,7 @@ public static void onInitialization(String version) {
var entries = DebugScreenEntriesAccessor.sodium$getEntries();
entries.put(SODIUM_DEBUG_ENTRY_FULL, new SodiumDebugEntry(true));
entries.put(SODIUM_DEBUG_ENTRY_REDUCED, new SodiumDebugEntry(false));
entries.put(SODIUM_DEBUG_ENTRY_BUFFER_ARENA, new DebugEntryNoop());
entries.put(SODIUM_FPS_PERCENTILES, new SodiumFpsPercentilesEntry());

MOD_VERSION = version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ protected MixinConfig() {
// You must manually add a rule for any new mixins not covered by an existing package rule.
this.addMixinRule("core", true); // TODO: Don't actually allow the user to disable this

this.addMixinRule("debug", true);

this.addMixinRule("features", true);

this.addMixinRule("features.gui", true);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package net.caffeinemc.mods.sodium.client.gpu.arena;

import com.mojang.blaze3d.buffers.GpuBuffer;

public interface AllocatorBase {
long getDeviceUsedMemory();

long getDeviceAllocatedMemory();

void free(BufferSegment entry);

boolean isEmpty();

GpuBuffer getBufferObject();
}

Large diffs are not rendered by default.

Loading