mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-20 20:32:14 +00:00
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:
1 parent
b956a44857
commit
6691511e17
68 files changed
+935
-890
No files matched your search
@@ -3,8 +3,8 @@ package net.coderbot.iris.gl.program;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.gtnewhorizons.angelica.glsm.GLStateManager;
|
||||
import com.gtnewhorizons.angelica.glsm.RenderSystem;
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectMap;
|
||||
import net.coderbot.iris.gl.IrisRenderSystem;
|
||||
import net.coderbot.iris.gl.sampler.SamplerBinding;
|
||||
import net.coderbot.iris.gl.sampler.SamplerHolder;
|
||||
import net.coderbot.iris.gl.sampler.SamplerLimits;
|
||||
@@ -38,7 +38,7 @@ public class ProgramSamplers {
|
||||
|
||||
if (initializer != null) {
|
||||
for (GlUniform1iCall call : initializer) {
|
||||
IrisRenderSystem.uniform1i(call.getLocation(), call.getValue());
|
||||
RenderSystem.uniform1i(call.getLocation(), call.getValue());
|
||||
}
|
||||
|
||||
initializer = null;
|
||||
@@ -126,7 +126,7 @@ public class ProgramSamplers {
|
||||
}
|
||||
|
||||
for (String name : names) {
|
||||
int location = IrisRenderSystem.getUniformLocation(program, name);
|
||||
int location = RenderSystem.getUniformLocation(program, name);
|
||||
|
||||
if (location == -1) {
|
||||
// There's no active sampler with this particular name in the program.
|
||||
@@ -141,7 +141,7 @@ public class ProgramSamplers {
|
||||
|
||||
@Override
|
||||
public boolean hasSampler(String name) {
|
||||
return IrisRenderSystem.getUniformLocation(program, name) != -1;
|
||||
return RenderSystem.getUniformLocation(program, name) != -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -175,7 +175,7 @@ public class ProgramSamplers {
|
||||
|
||||
private boolean addDynamicSampler(IntSupplier sampler, boolean used, ValueUpdateNotifier notifier, String... names) {
|
||||
for (String name : names) {
|
||||
int location = IrisRenderSystem.getUniformLocation(program, name);
|
||||
int location = RenderSystem.getUniformLocation(program, name);
|
||||
|
||||
if (location == -1) {
|
||||
// There's no active sampler with this particular name in the program.
|
||||
|
||||
Reference in new issue
Block a user