Remove Mac state validation option

This commit is contained in:
James Seibel
2025-09-24 07:13:51 -05:00
parent cbfb1625bc
commit 0cdb5cf0ec
3 changed files with 4 additions and 35 deletions
@@ -1059,14 +1059,6 @@ public class Config
+ "")
.build();
public static ConfigEntry<Boolean> enableMacosStateValidation = new ConfigEntry.Builder<Boolean>()
.set(false)
.comment(""
+ "Experimental option \n"
+ "May reduce crashing when Sodium is installed on Mac, may reduce performance, may do nothing. \n"
+ "")
.build();
}
public static class ColumnBuilderDebugging
@@ -23,7 +23,6 @@ import com.seibel.distanthorizons.api.enums.config.EDhApiGLErrorHandlingMode;
import com.seibel.distanthorizons.api.enums.config.EDhApiGpuUploadMethod;
import com.seibel.distanthorizons.core.config.Config;
import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
import com.seibel.distanthorizons.core.jar.EPlatform;
import com.seibel.distanthorizons.core.logging.ConfigBasedLogger;
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
import com.seibel.distanthorizons.core.util.objects.GLMessages.*;
@@ -33,7 +32,10 @@ import com.seibel.distanthorizons.coreapi.util.StringUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.lwjgl.glfw.GLFW;
import org.lwjgl.opengl.*;
import org.lwjgl.opengl.GL;
import org.lwjgl.opengl.GL32;
import org.lwjgl.opengl.GLCapabilities;
import org.lwjgl.opengl.GLUtil;
import java.io.PrintStream;
import java.util.Collections;
@@ -184,27 +186,6 @@ public class GLProxy
GL_LOGGER.info("GPU Vendor [" + vendor + "], Preferred upload method is [" + this.preferredUploadMethod + "].");
// experimental Mac OS validation option
if (Config.Client.Advanced.Debugging.OpenGl.enableMacosStateValidation.get())
{
EPlatform platform = EPlatform.get();
if (platform == EPlatform.MACOS)
{
GL_LOGGER.info("Attempting to enable kCGLCEStateValidation.");
CGL.CGLEnable(CGL.CGLGetCurrentContext(), CGL.kCGLCEStateValidation);
// according to some testing by IMS this may reduce issues with Mac OS,
// however according to the documentation here:
// https://leopard-adc.pepas.com/documentation/GraphicsImaging/Reference/CGL_OpenGL/CGL_OpenGL.pdf#:~:text=If%20enabled%2C%20OpenGL%20inspects%20the,a%20virtual%20screen%20number%20different
// it doesn't make much sense that this validation would fix crashing
// unless Mac's GL implementation does something funky
}
else
{
GL_LOGGER.info("Unable to enable kCGLCEStateValidation due to OS being ["+platform.name()+"].");
}
}
//==========//
// clean up //
@@ -494,10 +494,6 @@
"Validate Buffer IDs Before Rendering",
"distanthorizons.config.client.advanced.debugging.openGl.validateBufferIdsBeforeRendering.@tooltip":
"Massively reduces FPS. \nShould only be used if mysterious EXCEPTION_ACCESS_VIOLATION crashes are happening in DH's rendering code and you're attempting to troubleshoot it.",
"distanthorizons.config.client.advanced.debugging.openGl.enableMacosStateValidation":
"Enable MacOS State Validation",
"distanthorizons.config.client.advanced.debugging.openGl.enableMacosStateValidation.@tooltip":
"Experimental option \nMay reduce crashing when Sodium is installed on Mac, may reduce performance, may do nothing.",