Capture effective terrain quality and shader state at benchmark boundaries
This commit is contained in:
@@ -6,7 +6,7 @@ Client-first performance research for Minecraft Java **26.3**, preserving vanill
|
||||
|
||||
## Play on your Mac
|
||||
|
||||
Download **horizon-mac-starter-0.11.0.zip** from [Releases](https://github.com/ludovic111/minecraft-optimization-lab/releases), extract it and open `Mac-Start.command`. It verifies and installs official universal Prism Launcher in `~/Applications` if needed, then opens the balanced pack import. Sign into Microsoft **inside Prism yourself**. This project needs no credentials.
|
||||
Download **horizon-mac-starter-0.12.0.zip** from [Releases](https://github.com/ludovic111/minecraft-optimization-lab/releases), extract it and open `Mac-Start.command`. It verifies and installs official universal Prism Launcher in `~/Applications` if needed, then opens the balanced pack import. Sign into Microsoft **inside Prism yourself**. This project needs no credentials.
|
||||
|
||||
Use native **Java 25 ARM64**, maximum heap **6144 MiB**, minimum **512 MiB** on your 16 GB M2 Pro. Prism can download Java automatically. Start at 1280×800 or 1920×1200; full Retina resolution is a larger GPU workload. [START-HERE.txt](packs/START-HERE.txt) has details. The same `.mrpack` files import into Prism on Windows and Linux.
|
||||
|
||||
@@ -33,6 +33,10 @@ Distant LOD is simplified terrain. Nearby blocks retain full detail. Initial gen
|
||||
|
||||
The optional `queue-wait` pack yields during pending distant-terrain debounce retries; `adaptive-queue` combines it with the existing controllers. [Queue experiment and measurement limits](docs/debounce-queue.md).
|
||||
|
||||
Version 0.12 captures effective distant-terrain quality, radius, worker budgets,
|
||||
Iris state and field of view. Start/end snapshots flag changed visual settings;
|
||||
[measurement details](docs/terrain-measurements.md) explain their limits.
|
||||
|
||||
Version 0.11 adds combined foreground-first OpenGL/Vulkan profiles with a 120 FPS
|
||||
adaptive goal, plus explicit collector experiments and GC measurement guidance.
|
||||
See [combined controls](docs/foreground-first.md), [Vulkan on your Mac](docs/vulkan.md)
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# Capture terrain quality as well as speed
|
||||
|
||||
Version 0.12 adds effective DH configuration to frame reports: LOD radius,
|
||||
horizontal/vertical quality, maximum horizontal resolution, renderer mode,
|
||||
rendering enable setting, transparency, shading, ambient occlusion, LOD-only
|
||||
mode, camera quality falloff, worker count and runtime ratio. It reads the
|
||||
actual public API values, including active overrides. Pack names and TOML files
|
||||
alone do not establish which settings reached the running game.
|
||||
|
||||
Reports also capture configured field of view and optional Iris enabled state.
|
||||
An enabled Iris pack's name is included when available. Iris is queried through
|
||||
its public API; missing or incompatible APIs are marked unavailable, rather than
|
||||
assumed disabled. Other shader frameworks are not observed by this adapter.
|
||||
|
||||
Visual settings are read at recording start and finish. The final snapshot is
|
||||
stored in `visual_settings_end`; `visual_settings_changed` lists detected changes.
|
||||
The viewer and strict CLI flag these runs as mismatched. An adaptive runtime-ratio
|
||||
change is expected and is displayed separately; it is not treated as a visual
|
||||
quality change. Snapshots cannot detect a change that was restored before the
|
||||
end. Keep settings fixed and avoid menus during the actual comparison.
|
||||
|
||||
The comparison tools check captured DH/Iris quality fields, and report different
|
||||
worker budgets or controller settings as experiment variables. Older reports
|
||||
without these fields show unknown quality/shader equivalence. A vanilla baseline
|
||||
without DH versus a distant-terrain profile intentionally has different visual
|
||||
work: inspect that difference rather than presenting it as equal draw settings.
|
||||
|
||||
These are configuration observations, not counts of visible geometry, completed
|
||||
terrain or GPU timings. A 128-chunk configured radius does not prove every chunk
|
||||
has generated or drawn. Warm-up, world/route equivalence, occlusion, terrain cache,
|
||||
weather, actual visual detail and external shader frameworks still need testing.
|
||||
Base FOV does not capture every transient sprint/zoom camera effect.
|
||||
|
||||
The adapter reads at capture boundaries on the owning client thread. It performs
|
||||
no per-frame polling and changes no settings. Tests exercise the pinned upstream
|
||||
API contracts, effective overrides, absent/unavailable APIs and comparison
|
||||
mismatches. Game smoke checks validate the actual captured values separately.
|
||||
@@ -0,0 +1,46 @@
|
||||
package dev.horizonlab.client;
|
||||
|
||||
import com.seibel.distanthorizons.api.DhApi;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfig;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Read effective API values once at capture boundaries; never change terrain settings. */
|
||||
final class DistantTerrainSettings {
|
||||
private DistantTerrainSettings() {}
|
||||
|
||||
static Map<String, Object> read() { return read(DhApi.Delayed.configs); }
|
||||
|
||||
static Map<String, Object> read(IDhApiConfig configs) {
|
||||
if (configs == null) return Map.of("dh_capture_status", "unavailable");
|
||||
Map<String, Object> values = new LinkedHashMap<>();
|
||||
try {
|
||||
var graphics = configs.graphics();
|
||||
put(values, "dh_rendering_enabled", graphics.renderingEnabled());
|
||||
put(values, "dh_renderer_mode", graphics.renderingMode());
|
||||
put(values, "dh_lod_radius_chunks", graphics.chunkRenderDistance());
|
||||
put(values, "dh_horizontal_quality", graphics.horizontalQuality());
|
||||
put(values, "dh_vertical_quality", graphics.verticalQuality());
|
||||
put(values, "dh_max_horizontal_resolution", graphics.maxHorizontalResolution());
|
||||
put(values, "dh_transparency", graphics.transparency());
|
||||
put(values, "dh_lod_shading", graphics.lodShading());
|
||||
put(values, "dh_lod_only_mode", graphics.lodOnlyMode());
|
||||
put(values, "dh_camera_quality_dropoff", graphics.useCameraPositionForQualityDropOff());
|
||||
put(values, "dh_ambient_occlusion", graphics.ambientOcclusion().enabled());
|
||||
put(values, "dh_thread_count", configs.multiThreading().threadCount());
|
||||
put(values, "dh_runtime_ratio", configs.multiThreading().threadRuntimeRatio());
|
||||
values.put("dh_capture_status", "available");
|
||||
return values;
|
||||
} catch (RuntimeException | LinkageError unavailable) {
|
||||
// Missing/changed APIs must not look like disabled rendering or a zero distance.
|
||||
return Map.of("dh_capture_status", "unavailable");
|
||||
}
|
||||
}
|
||||
|
||||
private static void put(Map<String, Object> target, String name, IDhApiConfigValue<?> setting) {
|
||||
Object value = setting.getValue(); // Includes active overrides; getTrueValue reads only the user base.
|
||||
if (value == null) throw new IllegalStateException("Unavailable configuration value");
|
||||
target.put(name, value instanceof Enum<?> choice ? choice.name() : value);
|
||||
}
|
||||
}
|
||||
@@ -97,6 +97,23 @@ public final class HorizonClient implements ClientModInitializer {
|
||||
context.put("wakeable_idle_wait", dev.horizonlab.mixin.HorizonMixinPlugin.debounceWaitEnabled());
|
||||
context.put("dispatch_retry_backoff", dev.horizonlab.mixin.HorizonMixinPlugin.dispatchRetryEnabled());
|
||||
context.put("adaptive_target_fps", targetFps);
|
||||
context.putAll(visualSettings(client));
|
||||
var device = RenderSystem.getDevice().getDeviceInfo();
|
||||
context.put("gpu", device.name());
|
||||
context.put("graphics_backend", device.backendName());
|
||||
context.put("graphics_driver", device.driverInfo());
|
||||
context.put("mods", FabricLoader.getInstance().getAllMods().stream()
|
||||
.map(mod -> mod.getMetadata().getId() + "@" + mod.getMetadata().getVersion().getFriendlyString())
|
||||
.sorted().toList());
|
||||
frames = new Recording(label, "frames", output, seconds, context);
|
||||
previousStart = 0;
|
||||
if (client.getSingleplayerServer() != null) HorizonLab.startTicks(label, seconds, output, profile);
|
||||
message("Recording " + seconds + " seconds. Close chat, keep the game focused, and run your route.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
private static Map<String, Object> visualSettings(Minecraft client) {
|
||||
Map<String, Object> context = new LinkedHashMap<>();
|
||||
context.put("render_distance", client.options.renderDistance().get());
|
||||
context.put("simulation_distance", client.options.simulationDistance().get());
|
||||
context.put("vsync", client.options.enableVsync().get());
|
||||
@@ -104,10 +121,6 @@ public final class HorizonClient implements ClientModInitializer {
|
||||
context.put("fps_limit_unlimited", client.options.framerateLimit().get() >= Options.UNLIMITED_FRAMERATE_CUTOFF);
|
||||
context.put("framebuffer_width", client.getWindow().getWidth());
|
||||
context.put("framebuffer_height", client.getWindow().getHeight());
|
||||
var device = RenderSystem.getDevice().getDeviceInfo();
|
||||
context.put("gpu", device.name());
|
||||
context.put("graphics_backend", device.backendName());
|
||||
context.put("graphics_driver", device.driverInfo());
|
||||
context.put("graphics_preset", client.options.graphicsPreset().get().toString());
|
||||
context.put("ambient_occlusion", client.options.ambientOcclusion().get());
|
||||
context.put("improved_transparency", client.options.improvedTransparency().get());
|
||||
@@ -117,14 +130,14 @@ public final class HorizonClient implements ClientModInitializer {
|
||||
context.put("particles", client.options.particles().get().toString());
|
||||
context.put("clouds", client.options.cloudStatus().get().toString());
|
||||
context.put("cloud_range", client.options.cloudRange().get());
|
||||
context.put("mods", FabricLoader.getInstance().getAllMods().stream()
|
||||
.map(mod -> mod.getMetadata().getId() + "@" + mod.getMetadata().getVersion().getFriendlyString())
|
||||
.sorted().toList());
|
||||
frames = new Recording(label, "frames", output, seconds, context);
|
||||
previousStart = 0;
|
||||
if (client.getSingleplayerServer() != null) HorizonLab.startTicks(label, seconds, output, profile);
|
||||
message("Recording " + seconds + " seconds. Close chat, keep the game focused, and run your route.");
|
||||
return 1;
|
||||
context.put("fov", client.options.fov().get());
|
||||
var loader = FabricLoader.getInstance();
|
||||
if (loader.isModLoaded("distanthorizons")) {
|
||||
try { context.putAll(DistantTerrainSettings.read()); }
|
||||
catch (RuntimeException | LinkageError unavailable) { context.put("dh_capture_status", "unavailable"); }
|
||||
} else context.put("dh_capture_status", "not_installed");
|
||||
context.putAll(ShaderSettings.read(loader.isModLoaded("iris")));
|
||||
return context;
|
||||
}
|
||||
|
||||
public static void frameStart() {
|
||||
@@ -164,6 +177,20 @@ public final class HorizonClient implements ClientModInitializer {
|
||||
frames = null;
|
||||
previousStart = 0;
|
||||
HorizonLab.finishTicks();
|
||||
Map<String, Object> end = visualSettings(Minecraft.getInstance());
|
||||
java.util.List<String> changed = new java.util.ArrayList<>();
|
||||
for (var setting : end.entrySet()) {
|
||||
// Adaptive duty cycle is expected to change; visual quality changes are separate.
|
||||
if (!setting.getKey().equals("dh_runtime_ratio")
|
||||
&& !java.util.Objects.equals(recording.context.get(setting.getKey()), setting.getValue()))
|
||||
changed.add(setting.getKey());
|
||||
}
|
||||
for (String setting : recording.context.keySet()) {
|
||||
if ((setting.startsWith("dh_") || setting.startsWith("iris_")) && !end.containsKey(setting))
|
||||
changed.add(setting);
|
||||
}
|
||||
recording.context.put("visual_settings_end", end);
|
||||
recording.context.put("visual_settings_changed", changed);
|
||||
Reports.write(recording.finish()).whenComplete((path, error) -> {
|
||||
if (error != null) HorizonLab.LOGGER.error("Frame report failed", error);
|
||||
else {
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package dev.horizonlab.client;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Optional Iris reflection keeps baseline clients independent of shader-mod classes. */
|
||||
final class ShaderSettings {
|
||||
private ShaderSettings() {}
|
||||
|
||||
static Map<String, Object> read(boolean irisPresent) {
|
||||
if (!irisPresent) return Map.of("iris_capture_status", "not_installed", "iris_shaders_enabled", false);
|
||||
try {
|
||||
Class<?> api = Class.forName("net.irisshaders.iris.api.v0.IrisApi");
|
||||
Object instance = api.getMethod("getInstance").invoke(null);
|
||||
boolean enabled = (Boolean) api.getMethod("isShaderPackInUse").invoke(instance);
|
||||
Map<String, Object> result = new LinkedHashMap<>();
|
||||
result.put("iris_capture_status", "available");
|
||||
result.put("iris_shaders_enabled", enabled);
|
||||
if (enabled) {
|
||||
Class<?> iris = Class.forName("net.irisshaders.iris.Iris");
|
||||
result.put("iris_shader_pack", iris.getMethod("getCurrentPackName").invoke(null));
|
||||
}
|
||||
return result;
|
||||
} catch (ReflectiveOperationException | RuntimeException | LinkageError unavailable) {
|
||||
return Map.of("iris_capture_status", "unavailable");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "horizonlab",
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"name": "Horizon Lab",
|
||||
"description": "Client frame pacing and server tick measurements for reproducible optimization experiments.",
|
||||
"authors": [
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package dev.horizonlab.client;
|
||||
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfig;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiAmbientOcclusionConfig;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiGraphicsConfig;
|
||||
import com.seibel.distanthorizons.api.interfaces.config.client.IDhApiMultiThreadingConfig;
|
||||
import com.seibel.distanthorizons.api.enums.config.*;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.*;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.util.Map;
|
||||
|
||||
public final class DistantTerrainSettingsTest {
|
||||
@SuppressWarnings("unchecked")
|
||||
private static <T> T proxy(Class<T> type, java.lang.reflect.InvocationHandler handler) {
|
||||
return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class<?>[]{type}, handler);
|
||||
}
|
||||
|
||||
private static IDhApiConfigValue<?> effective(Object value) {
|
||||
return proxy(IDhApiConfigValue.class, (p, method, args) -> {
|
||||
if (method.getName().equals("getValue")) return value;
|
||||
throw new AssertionError("Capture must read effective overrides, never mutate settings: " + method);
|
||||
});
|
||||
}
|
||||
|
||||
private static void check(boolean condition) { if (!condition) throw new AssertionError(); }
|
||||
|
||||
public static void main(String[] args) {
|
||||
Map<String, Object> settings = Map.ofEntries(
|
||||
Map.entry("renderingEnabled", true), Map.entry("renderingMode", EDhApiRendererMode.DEFAULT),
|
||||
Map.entry("chunkRenderDistance", 256), Map.entry("horizontalQuality", EDhApiHorizontalQuality.MEDIUM),
|
||||
Map.entry("verticalQuality", EDhApiVerticalQuality.HIGH), Map.entry("maxHorizontalResolution", EDhApiMaxHorizontalResolution.BLOCK),
|
||||
Map.entry("transparency", EDhApiTransparency.COMPLETE), Map.entry("lodShading", EDhApiLodShading.AUTO),
|
||||
Map.entry("lodOnlyMode", false), Map.entry("useCameraPositionForQualityDropOff", true));
|
||||
var ao = proxy(IDhApiAmbientOcclusionConfig.class, (p, method, values) -> effective(true));
|
||||
var graphics = proxy(IDhApiGraphicsConfig.class, (p, method, values) ->
|
||||
method.getName().equals("ambientOcclusion") ? ao : effective(settings.get(method.getName())));
|
||||
var threading = proxy(IDhApiMultiThreadingConfig.class, (p, method, values) ->
|
||||
effective(method.getName().equals("threadCount") ? (Object) 2 : 0.05));
|
||||
var configs = proxy(IDhApiConfig.class, (p, method, values) ->
|
||||
method.getName().equals("graphics") ? graphics : threading);
|
||||
Map<String, Object> result = DistantTerrainSettings.read(configs);
|
||||
check(result.get("dh_capture_status").equals("available"));
|
||||
check(result.get("dh_lod_radius_chunks").equals(256));
|
||||
check(result.get("dh_horizontal_quality").equals("MEDIUM"));
|
||||
check(result.get("dh_vertical_quality").equals("HIGH"));
|
||||
check(result.get("dh_runtime_ratio").equals(0.05));
|
||||
check(result.get("dh_thread_count").equals(2));
|
||||
check(DistantTerrainSettings.read(null).equals(Map.of("dh_capture_status", "unavailable")));
|
||||
var missing = proxy(IDhApiConfig.class, (p, method, values) -> { throw new UnsupportedOperationException(); });
|
||||
check(DistantTerrainSettings.read(missing).equals(Map.of("dh_capture_status", "unavailable")));
|
||||
var changedApi = proxy(IDhApiConfig.class, (p, method, values) -> { throw new NoSuchMethodError(); });
|
||||
check(DistantTerrainSettings.read(changedApi).equals(Map.of("dh_capture_status", "unavailable")));
|
||||
check(ShaderSettings.read(false).equals(Map.of("iris_capture_status", "not_installed", "iris_shaders_enabled", false)));
|
||||
// Test classpath deliberately omits Iris; it must report unavailable rather than assume disabled.
|
||||
check(ShaderSettings.read(true).equals(Map.of("iris_capture_status", "unavailable")));
|
||||
System.out.println("Effective terrain settings and absent/unsupported shader APIs checked.");
|
||||
}
|
||||
}
|
||||
@@ -142,3 +142,10 @@ from their publishers with pinned hashes. No decompiled Minecraft is distributed
|
||||
|
||||
Source, build commands and measured validation:
|
||||
https://github.com/ludovic111/minecraft-optimization-lab
|
||||
|
||||
TERRAIN / SHADER COMPARISONS
|
||||
Version 0.12 records actual DH radius/quality, worker count/duty cycle, Iris state
|
||||
and field of view at capture boundaries. If visual settings changed, the viewer
|
||||
flags the run. Older reports without these fields cannot establish quality
|
||||
equivalence. Snapshots cannot detect a change that was restored before the end,
|
||||
and do not prove that all requested distant terrain finished rendering.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"minecraft": "26.3",
|
||||
"java_major": 25,
|
||||
"fabric_loader": "0.19.5",
|
||||
"pack_version": "0.11.0",
|
||||
"pack_version": "0.12.0",
|
||||
"options_data_version": 5023,
|
||||
"projects": {
|
||||
"sodium": {
|
||||
|
||||
@@ -158,6 +158,22 @@ class ComparisonTests(unittest.TestCase):
|
||||
result = compare_benchmarks.compare(baseline, candidate)
|
||||
self.assertTrue(any("not captured" in warning for warning in result["warnings"]))
|
||||
|
||||
def test_terrain_quality_and_shader_changes_cannot_look_like_equal_workloads(self):
|
||||
baseline = self.report()
|
||||
baseline.update(dh_capture_status="available", dh_lod_radius_chunks=128, dh_horizontal_quality="MEDIUM",
|
||||
iris_capture_status="available", iris_shaders_enabled=False, dh_thread_count=2)
|
||||
candidate = copy.deepcopy(baseline)
|
||||
candidate.update(dh_lod_radius_chunks=256, iris_shaders_enabled=True, iris_shader_pack="Example pack",
|
||||
dh_thread_count=1, visual_settings_changed=["render_distance"])
|
||||
result = compare_benchmarks.compare(baseline, candidate)
|
||||
self.assertTrue(any("dh_lod_radius_chunks" in field for field in result["mismatches"]))
|
||||
self.assertTrue(any("iris_shaders_enabled" in field for field in result["mismatches"]))
|
||||
self.assertTrue(any("dh_thread_count differs" in warning for warning in result["warnings"]))
|
||||
self.assertTrue(any("changed between capture boundaries" in warning for warning in result["warnings"]))
|
||||
legacy = self.report()
|
||||
result = compare_benchmarks.compare(legacy, copy.deepcopy(legacy))
|
||||
self.assertTrue(any("terrain configuration was not captured" in warning for warning in result["warnings"]))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</main>
|
||||
<script>
|
||||
'use strict';
|
||||
const SETTINGS=['minecraft','kind','os','os_version','architecture','gpu','graphics_backend','graphics_driver','java_version','heap_max_bytes','framebuffer_width','framebuffer_height','render_distance','simulation_distance','vsync','fps_limit','graphics_preset','ambient_occlusion','improved_transparency','mipmap_levels','entity_distance_scaling','entity_shadows','particles','clouds','cloud_range'];
|
||||
const SETTINGS=['minecraft','kind','os','os_version','architecture','gpu','graphics_backend','graphics_driver','java_version','heap_max_bytes','framebuffer_width','framebuffer_height','render_distance','simulation_distance','vsync','fps_limit','graphics_preset','ambient_occlusion','improved_transparency','mipmap_levels','entity_distance_scaling','entity_shadows','particles','clouds','cloud_range','fov','dh_capture_status','dh_rendering_enabled','dh_renderer_mode','dh_lod_radius_chunks','dh_horizontal_quality','dh_vertical_quality','dh_max_horizontal_resolution','dh_transparency','dh_lod_shading','dh_lod_only_mode','dh_camera_quality_dropoff','dh_ambient_occlusion','iris_capture_status','iris_shaders_enabled','iris_shader_pack'];
|
||||
const state={baseline:null,candidate:null},generation={baseline:0,candidate:0};
|
||||
let comparison=null,chartData=null;
|
||||
const $=id=>document.getElementById(id);
|
||||
@@ -65,6 +65,19 @@ function compareReports(a,b){
|
||||
if(!(key in a)||!(key in b))warnings.push(key+' was not captured in both reports; JVM configuration equivalence is unknown.');
|
||||
else if(JSON.stringify(a[key])!==JSON.stringify(b[key]))warnings.push('JVM '+key+' differs. Treat it as an explicit experiment variable.');
|
||||
}
|
||||
if(a.kind==='frames'){
|
||||
for(const key of ['adaptive_budget_enabled','adaptive_target_fps','precise_worker_pacing','debounce_queue_wait','wakeable_idle_wait','dispatch_retry_backoff','dh_thread_count','dh_runtime_ratio']){
|
||||
if(key in a&&key in b&&JSON.stringify(a[key])!==JSON.stringify(b[key]))warnings.push('Experiment '+key+' differs.');
|
||||
}
|
||||
for(const [label,r] of [['Baseline',a],['Candidate',b]]){
|
||||
if(!['available','not_installed'].includes(r.dh_capture_status))warnings.push(label+' distant-terrain configuration was not captured; quality equivalence is unknown.');
|
||||
if(!['available','not_installed'].includes(r.iris_capture_status))warnings.push(label+' Iris state was not captured; shader equivalence is unknown.');
|
||||
if(Array.isArray(r.visual_settings_changed)&&r.visual_settings_changed.length){
|
||||
differences.push({setting:label+' visual settings changed during recording',baseline:label==='Baseline'?r.visual_settings_changed:null,candidate:label==='Candidate'?r.visual_settings_changed:null});
|
||||
warnings.push(label+' visual settings changed between capture boundaries: '+r.visual_settings_changed.join(', ')+'.');
|
||||
}
|
||||
}
|
||||
}
|
||||
if(Math.abs(a.elapsed_seconds-b.elapsed_seconds)>Math.max(2,Math.min(a.elapsed_seconds,b.elapsed_seconds)*.1))warnings.push('Recording durations differ. Match durations when comparing memory peaks and collection totals.');
|
||||
for(const [label,r] of [['Baseline',a],['Candidate',b]]){
|
||||
if(r.elapsed_seconds<60)warnings.push(label+' recording is shorter than 60 seconds. Use longer repeated runs.');
|
||||
@@ -102,6 +115,10 @@ function renderDetails(side){
|
||||
if(r.kind==='frames')fields.push(['Graphics',[r.gpu,r.graphics_backend].filter(Boolean).join(' · ')||'Not captured'],['Window',number(r.framebuffer_width)?r.framebuffer_width+' × '+r.framebuffer_height:'Not captured'],['Experiments','Adaptive: '+(r.adaptive_budget_enabled?'on':'off')+' · precise pacing: '+(r.precise_worker_pacing?'on':'off')+' · queue wait: '+(r.debounce_queue_wait?'on':'off')]);
|
||||
fields.push(['JVM', 'Compact headers: '+(r.compact_object_headers===true?'on':r.compact_object_headers===false?'off':'not captured')+' · GC: '+(Array.isArray(r.garbage_collectors)?r.garbage_collectors.join(', '):'not captured')]);
|
||||
if(r.kind==='frames'){
|
||||
fields.push(['Distant terrain',r.dh_capture_status==='not_installed'?'Not installed':r.dh_capture_status==='available'?(r.dh_rendering_enabled?'Enabled':'Disabled')+' · '+r.dh_lod_radius_chunks+' chunk radius · '+r.dh_horizontal_quality+'/'+r.dh_vertical_quality+' quality · '+r.dh_max_horizontal_resolution+' resolution':'Not captured']);
|
||||
if(number(r.dh_thread_count))fields.push(['Terrain workers',r.dh_thread_count+' · runtime ratio at start '+format(r.dh_runtime_ratio)+(number(r.visual_settings_end?.dh_runtime_ratio)?' / end '+format(r.visual_settings_end.dh_runtime_ratio):'')]);
|
||||
fields.push(['Iris shaders',r.iris_capture_status==='not_installed'?'Not installed':r.iris_capture_status==='available'?r.iris_shaders_enabled?'Enabled · '+(r.iris_shader_pack||'pack name unavailable'):'Disabled':'Not captured']);
|
||||
if(number(r.fov))fields.push(['Field of view',format(r.fov)]);
|
||||
fields.push(['Frame limit',r.fps_limit_unlimited===true||(r.minecraft==='26.3'&&number(r.fps_limit)&&r.fps_limit>=260)?'Uncapped':number(r.fps_limit)?r.fps_limit+' FPS':'not captured']);
|
||||
if(r.adaptive_budget_enabled&&number(r.adaptive_target_fps))fields.push(['Adaptive frame goal',r.adaptive_target_fps+' FPS (not a cap)']);
|
||||
}
|
||||
|
||||
@@ -92,9 +92,12 @@ def build():
|
||||
subprocess.run(["javac", "--release", "25", "-proc:none", "-classpath", test_classpath,
|
||||
"-d", str(adapter_tests),
|
||||
str(SOURCE / "test/java/dev/horizonlab/client/DistantTerrainBudgetTest.java"),
|
||||
str(SOURCE / "test/java/dev/horizonlab/client/DistantTerrainSettingsTest.java"),
|
||||
str(SOURCE / "test/java/dev/horizonlab/metrics/ResidentMemoryTest.java")], check=True)
|
||||
subprocess.run(["java", "-cp", os.pathsep.join([str(adapter_tests), test_classpath]),
|
||||
"dev.horizonlab.client.DistantTerrainBudgetTest"], check=True)
|
||||
subprocess.run(["java", "-cp", os.pathsep.join([str(adapter_tests), test_classpath]),
|
||||
"dev.horizonlab.client.DistantTerrainSettingsTest"], check=True)
|
||||
subprocess.run(["java", "--enable-native-access=ALL-UNNAMED", "-cp", os.pathsep.join([str(adapter_tests), test_classpath]),
|
||||
"dev.horizonlab.metrics.ResidentMemoryTest"], check=True)
|
||||
output = ROOT / "dist" / f"horizon-lab-{lock['pack_version']}.jar"
|
||||
|
||||
@@ -9,7 +9,10 @@ MATCH_FIELDS = ("minecraft", "kind", "os", "os_version", "architecture", "gpu",
|
||||
"java_version", "heap_max_bytes", "framebuffer_width", "framebuffer_height", "render_distance",
|
||||
"simulation_distance", "vsync", "fps_limit", "graphics_preset", "ambient_occlusion",
|
||||
"improved_transparency", "mipmap_levels", "entity_distance_scaling", "entity_shadows", "particles",
|
||||
"clouds", "cloud_range")
|
||||
"clouds", "cloud_range", "fov", "dh_capture_status", "dh_rendering_enabled", "dh_renderer_mode",
|
||||
"dh_lod_radius_chunks", "dh_horizontal_quality", "dh_vertical_quality", "dh_max_horizontal_resolution",
|
||||
"dh_transparency", "dh_lod_shading", "dh_lod_only_mode", "dh_camera_quality_dropoff",
|
||||
"dh_ambient_occlusion", "iris_capture_status", "iris_shaders_enabled", "iris_shader_pack")
|
||||
|
||||
|
||||
def compare(baseline, candidate):
|
||||
@@ -23,6 +26,19 @@ def compare(baseline, candidate):
|
||||
mismatches = [f"{key}: {baseline.get(key)!r} vs {candidate.get(key)!r}" for key in MATCH_FIELDS
|
||||
if baseline.get(key) != candidate.get(key)]
|
||||
warnings = ["World, route, warm-up, shader state and LOD cache must also match; these are not verified by this tool."]
|
||||
if baseline["kind"] == "frames":
|
||||
for field in ["adaptive_budget_enabled", "adaptive_target_fps", "precise_worker_pacing", "debounce_queue_wait",
|
||||
"wakeable_idle_wait", "dispatch_retry_backoff", "dh_thread_count", "dh_runtime_ratio"]:
|
||||
if field in baseline and field in candidate and baseline[field] != candidate[field]:
|
||||
warnings.append(f"Experiment {field} differs: {baseline[field]!r} vs {candidate[field]!r}.")
|
||||
for name, report in [("baseline", baseline), ("candidate", candidate)]:
|
||||
if report.get("dh_capture_status") not in ["available", "not_installed"]:
|
||||
warnings.append(f"{name} distant-terrain configuration was not captured; quality equivalence is unknown.")
|
||||
if report.get("iris_capture_status") not in ["available", "not_installed"]:
|
||||
warnings.append(f"{name} Iris state was not captured; shader equivalence is unknown.")
|
||||
if report.get("visual_settings_changed"):
|
||||
mismatches.append(f"{name} visual settings changed during recording")
|
||||
warnings.append(f"{name} visual settings changed between capture boundaries: {report['visual_settings_changed']!r}.")
|
||||
for field in ["compact_object_headers", "garbage_collectors"]:
|
||||
if field not in baseline or field not in candidate:
|
||||
warnings.append(f"{field} was not captured in both reports; JVM configuration equivalence is unknown.")
|
||||
|
||||
Reference in New Issue
Block a user