This commit is contained in:
mcrcortex
2025-12-18 17:42:16 +10:00
parent b68d5b3c66
commit b5c31478fb
2 changed files with 11 additions and 2 deletions

View File

@@ -20,7 +20,11 @@ public class VoxyClient implements ClientModInitializer {
public static void initVoxyClient() { public static void initVoxyClient() {
Capabilities.init();//Ensure clinit is called Capabilities.init();//Ensure clinit is called
boolean systemSupported = Capabilities.INSTANCE.compute && Capabilities.INSTANCE.indirectParameters; if (Capabilities.INSTANCE.hasBrokenDepthSampler) {
Logger.error("AMD broken depth sampler detected, voxy does not work correctly and has been disabled, this will hopefully be fixed in the future");
}
boolean systemSupported = Capabilities.INSTANCE.compute && Capabilities.INSTANCE.indirectParameters && !Capabilities.INSTANCE.hasBrokenDepthSampler;
if (systemSupported) { if (systemSupported) {
SharedIndexBuffer.INSTANCE.id(); SharedIndexBuffer.INSTANCE.id();

View File

@@ -1,6 +1,7 @@
package me.cortex.voxy.client.core.gl; package me.cortex.voxy.client.core.gl;
import me.cortex.voxy.client.core.gl.shader.ShaderType; import me.cortex.voxy.client.core.gl.shader.ShaderType;
import me.cortex.voxy.common.Logger;
import org.lwjgl.opengl.GL; import org.lwjgl.opengl.GL;
import org.lwjgl.opengl.GL11C; import org.lwjgl.opengl.GL11C;
import org.lwjgl.opengl.GL20C; import org.lwjgl.opengl.GL20C;
@@ -171,7 +172,11 @@ public class Capabilities {
glBindTextureUnit(0,0); glBindTextureUnit(0,0);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0); glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0);
isCorrect &= Math.abs(value - gottenValue)<0.0000001f; boolean localCorrect = Math.abs(value - gottenValue)<0.0000001f;
if (!localCorrect) {
Logger.error("Depth read test failed at value: " + value);
}
isCorrect &= localCorrect;
} }
glDeleteFramebuffers(fb); glDeleteFramebuffers(fb);