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 54a5dd7e06
commit 5fbca293ef
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 static void clientInit() {
CrashReportCallables.registerCrashCallable("Flywheel Backend", () -> Backend.getEngine().getProperName());
CrashReportCallables.registerCrashCallable("Flywheel Backend", Backend::getBackendDescriptor);
OptifineHandler.init();
Backend.init();

View File

@ -29,6 +29,14 @@ public class Backend {
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
public static ProgramSpec getSpec(ResourceLocation name) {
return loader.get(name);