More Caching (#242)

* More Caching
* Pull TextureTracker & TextureInfoCache out of Iris and into GLSM
* Cache more TextureInfo state
* GLSM: glTexParameter, glGetTexParameter(i|f), glGetTexLevelParameteri
* Move IrisRenderSystem -> GLSM.RenderSystem
* Ensure DSA works properly with GLSM
 * Further updates to DSA for texParameter/getTexParameter
* A few more cached fields for TextureInfo
* Properly handle deleteTextures
* Ensure anyone crazy enough to use an Int/FloatBuffer for single value params get redirected
* Add optional runtime disabling of GLSM
* Switch checkGLError from an inject to a redirect, hopefully fewer allocations
* Fewer allocations for clearBufferState
* Microoptimization for (setup|clear)BufferState
This commit is contained in:
Jason Mitchell authored and GitHub committed 2024-01-27 15:52:57 -08:00
1 parent b956a44857
commit 6691511e17
68 files changed
+935 -890

No files matched your search

@@ -1,8 +1,8 @@
package net.coderbot.iris.gl.program;
import com.gtnewhorizons.angelica.glsm.RenderSystem;
import net.coderbot.iris.Iris;
import net.coderbot.iris.gl.GlResource;
import net.coderbot.iris.gl.IrisRenderSystem;
import net.coderbot.iris.pipeline.WorldRenderingPipeline;
import org.joml.Vector2f;
import org.joml.Vector3i;
@@ -28,8 +28,7 @@ public final class ComputeProgram extends GlResource {
super(program);
localSizeBuffer = BufferUtils.createIntBuffer(3);
// localSize = new int[3];
IrisRenderSystem.getProgramiv(program, GL43.GL_COMPUTE_WORK_GROUP_SIZE, localSizeBuffer);
RenderSystem.getProgramiv(program, GL43.GL_COMPUTE_WORK_GROUP_SIZE, localSizeBuffer);
this.uniforms = uniforms;
this.samplers = samplers;
this.images = images;
@@ -65,10 +64,10 @@ public final class ComputeProgram extends GlResource {
images.update();
if (!Iris.getPipelineManager().getPipeline().map(WorldRenderingPipeline::allowConcurrentCompute).orElse(false)) {
IrisRenderSystem.memoryBarrier(40);
RenderSystem.memoryBarrier(40);
}
IrisRenderSystem.dispatchCompute(getWorkGroups(width, height));
RenderSystem.dispatchCompute(getWorkGroups(width, height));
}
public static void unbind() {