Un-remove getBackendDescriptor

- No point in incorrectly inlining it
 - One useage was replaced by InstancedRenderDispatcher#getDebugString
This commit is contained in:
Jozufozu 2022-01-31 13:26:55 -08:00
parent 24423c56a8
commit a1791399b6
2 changed files with 9 additions and 1 deletions

View file

@ -18,7 +18,7 @@ import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
public class FlywheelClient { public class FlywheelClient {
public static void clientInit() { public static void clientInit() {
CrashReportCallables.registerCrashCallable("Flywheel Backend", () -> Backend.getEngine().getProperName()); CrashReportCallables.registerCrashCallable("Flywheel Backend", Backend::getBackendDescriptor);
OptifineHandler.init(); OptifineHandler.init();
Backend.init(); Backend.init();

View file

@ -29,6 +29,14 @@ public class Backend {
return engine; return engine;
} }
/**
* Get a string describing the Flywheel backend. When there are eventually multiple backends
* (Meshlet, MDI, GL31 Draw Instanced are planned), this will name which one is in use.
*/
public static String getBackendDescriptor() {
return engine == null ? "" : engine.getProperName();
}
@Nullable @Nullable
public static ProgramSpec getSpec(ResourceLocation name) { public static ProgramSpec getSpec(ResourceLocation name) {
return loader.get(name); return loader.get(name);