Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b589582de |
No files matched your search
@@ -19,6 +19,17 @@ GitHub release body, so a missing section will mean an empty release note.
|
||||
|
||||
### Added
|
||||
|
||||
- **The report's `render -> output` line is computed, not "not computed yet".** Every real-title
|
||||
run since 2026-08-15 printed the raw sizes two lines above an N/A. `UpscaleExtent` takes the
|
||||
MODAL (render, output) tuple over the records that claim both `FL_MEASURED_UPSCALER_PARAMS` and
|
||||
`FL_MEASURED_OUTPUT_RES`, and the line prints the two measured sizes, `03_METRICS` §Upscaling's
|
||||
`sqrt((outW×outH)/(renW×renH))`, the reciprocal as a render-scale percentage, the record counts,
|
||||
and a **SETTINGS MOVED** flag when the window held more than one tuple — modal rather than mean,
|
||||
because averaging across a settings change is the classic way a benchmark number stops meaning
|
||||
anything. Cyberpunk's 1485×835 at 2560×1440 reads `1.72x (58% render scale)`. **No preset name is
|
||||
derived from it**: whether a label such as "≈ Balanced" may appear beside a measured field is
|
||||
HANDOFF item 7a's owner decision, and the quality byte stays what the writer measured.
|
||||
|
||||
- **The SDK 2.x loader is the fourth AMD row, because three loader-shipping titles read silent
|
||||
behind the leaf-only build.** The owner's run on #110 (thirteen captures, nine titles, one launch
|
||||
each) landed rows A1–A3 exactly as pre-committed — Lies of P `Fsr3` / `FsrFg` / `118.98 → 238.02
|
||||
|
||||
+9
-1
@@ -694,7 +694,15 @@ Cyberpunk 2077 never chains `sl::DLSSOptions`, so 0xFF there is the title's trut
|
||||
`quality=` off the `render … quality=… upscaler=…` line. If it reads the preset, criterion 1
|
||||
is 5 of 5 on that title and this item is a spike-notes entry. If it reads 0xFF too, the
|
||||
Streamline options route yields nothing on either measured title, and the decision below is
|
||||
live.
|
||||
live. *(Runbook title 12 is Alan Wake 2 as of 2026-09-04; Epic may update the executable on
|
||||
launch, so launch first and grant after.)*
|
||||
- **The input to that decision is on the report now** (2026-09-04): `render -> output` prints the
|
||||
two measured sizes, `03_METRICS`' ratio and the render-scale percentage — Cyberpunk reads
|
||||
`1485x835 -> 2560x1440 = 1.72x (58% render scale)` — plus a **SETTINGS MOVED** flag when the
|
||||
window held more than one tuple. It prints **no preset name**; that is the decision below,
|
||||
still the owner's. Every FSR title measured on 2026-09-04 also reads `0xFF` for the quality
|
||||
byte, and on that route it is the true value rather than a gap: the ffx-api dispatch carries
|
||||
no quality mode at all, so the derived label is the only route to a preset name for AMD too.
|
||||
- **The decision, if 0xFF everywhere:** `renderW/H ÷ outputW/H` is *exact* (Cyberpunk: 1485×835
|
||||
at 2560×1440 = 0.58, which IS DLSS Balanced, and the menu agreed), and DLSS's preset ratios
|
||||
are documented constants (DLAA 1.0, Quality 0.667, Balanced 0.58, Performance 0.5, Ultra
|
||||
|
||||
@@ -132,8 +132,24 @@ internal sealed record MeasuredFacts
|
||||
public bool CensusInconsistent =>
|
||||
!CensusRan && (RuntimeCensus & ~FlRuntimeCensus.Ran) != FlRuntimeCensus.None;
|
||||
|
||||
/// <summary>Null, because <c>renderW/H</c> are always 0 and the ratio would divide by zero.</summary>
|
||||
public double? UpscaleRatio { get; init; }
|
||||
/// <summary>
|
||||
/// The dominant render → output extent over the records that claim <see cref="FlMeasured.UpscalerParams"/>
|
||||
/// and carry an output size, or null when no record carried both.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>The ratio is <c>03_METRICS</c> §Upscaling's own formula — <c>sqrt((outW×outH)/(renW×renH))</c>
|
||||
/// — and nothing more.</b> A preset NAME derived from it ("58% ≈ Balanced") is HANDOFF item 7a's
|
||||
/// owner decision and is deliberately not printed here: the quality byte stays what the writer
|
||||
/// measured (<c>0xFF</c> on every title so far), and this line says what the title rendered at,
|
||||
/// which is a measurement, beside the ratio, which is arithmetic on two measurements. The modal
|
||||
/// tuple rather than a mean, because averaging across a settings change is the classic way a
|
||||
/// benchmark number stops meaning anything; <see cref="UpscaleExtent.DistinctGroups"/> says
|
||||
/// whether one happened.
|
||||
/// </remarks>
|
||||
public UpscaleExtent? Extent { get; init; }
|
||||
|
||||
/// <summary><c>sqrt((outW×outH)/(renW×renH))</c> of the dominant extent, or null.</summary>
|
||||
public double? UpscaleRatio => Extent?.Ratio;
|
||||
|
||||
public Tri RayTracing { get; init; }
|
||||
|
||||
@@ -199,9 +215,7 @@ internal sealed record MeasuredFacts
|
||||
stream, static r => ((FlMeasured)r.MeasuredMask).HasFlag(FlMeasured.Fg)) < stream.Count,
|
||||
RuntimeCensus = (FlRuntimeCensus)writer.RuntimeCensus,
|
||||
|
||||
// Still a deliberate absence: renderW/H are 0 unless a params hook ran, and the
|
||||
// ratio would divide by zero. See the property doc.
|
||||
UpscaleRatio = null,
|
||||
Extent = UpscaleExtent.From(stream),
|
||||
Upscaler = UpscalerOf(stream),
|
||||
RayTracing = RayTracingOf(stream, writer),
|
||||
RayReconstruction = RayReconstructionOf(stream),
|
||||
|
||||
@@ -161,9 +161,7 @@ internal static class SessionReport
|
||||
+ "upscaling is off in this title's settings, or it runs through a path this build does not "
|
||||
+ "hook — measured on 3 of 5 Streamline titles — or a vendor this build does not decode)"
|
||||
: NoHookRan("upscaler", facts.CensusRan, facts.UpscalerRuntimesLoaded)));
|
||||
sb.Append(" render -> output: ").AppendLine(facts.UpscaleRatio is null
|
||||
? "N/A (the ratio is not computed yet; the raw sizes are above)"
|
||||
: Num(facts.UpscaleRatio));
|
||||
sb.Append(" render -> output: ").AppendLine(RenderToOutput(facts.Extent));
|
||||
sb.Append(" frame generation: ").AppendLine(facts.FgMode
|
||||
?? (facts.FgHookRan
|
||||
? "N/A (a hook ran and saw no frame-generation evaluation — see the FG counts above)"
|
||||
@@ -307,6 +305,25 @@ internal static class SessionReport
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The extent line: two measured sizes, the ratio <c>03_METRICS</c> defines over them, and
|
||||
/// whether the window ran at one tuple. Never a preset name — that is HANDOFF 7a's owner call.
|
||||
/// </summary>
|
||||
private static string RenderToOutput(UpscaleExtent? e)
|
||||
{
|
||||
if (e is null)
|
||||
{
|
||||
return "N/A (no record carried both a render size and an output size)";
|
||||
}
|
||||
|
||||
string line = $"{e.RenderW}x{e.RenderH} -> {e.OutputW}x{e.OutputH} = {Num(e.Ratio)}x "
|
||||
+ $"({e.RenderScalePercent.ToString("0", CultureInfo.InvariantCulture)}% render scale) "
|
||||
+ $"on {Count(e.Records)} of {Count(e.Measured)} record(s)";
|
||||
return e.DistinctGroups > 1
|
||||
? line + $" — SETTINGS MOVED: {Count(e.DistinctGroups)} distinct extents in the window, this is the dominant one"
|
||||
: line;
|
||||
}
|
||||
|
||||
private static string Num(double? v) =>
|
||||
v is null ? "N/A" : v.Value.ToString("0.##", CultureInfo.InvariantCulture);
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
using FrameLedger.Shared;
|
||||
|
||||
namespace FrameLedger.CaptureHost.Consume;
|
||||
|
||||
/// <summary>
|
||||
/// The render → output extent a session ran at, taken as the MODAL tuple over the records
|
||||
/// that claim <see cref="FlMeasured.UpscalerParams"/> and carry an output size.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// <b>Two measurements, one piece of arithmetic.</b> <c>renderW/H</c> come off the upscaler's own
|
||||
/// dispatch (Streamline's scaling-input tag, or the ffx-api descriptor's <c>renderSize</c>) and
|
||||
/// <c>outputW/H</c> off the swapchain the present hook read; the ratio is <c>03_METRICS</c>
|
||||
/// §Upscaling's <c>sqrt((outW×outH)/(renW×renH))</c>, and the render scale is its reciprocal as
|
||||
/// a percentage. Measured on Cyberpunk 2077 at <c>DLSS = Balanced</c>: 1485×835 against 2560×1440
|
||||
/// is 1.72× and 58%, which is a number a writer that hardcoded a plausible resolution could not
|
||||
/// have produced.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>Modal, not mean, and the count of distinct tuples is published beside it.</b> Averaging
|
||||
/// across a settings change or a dynamic-resolution swing is the classic way a benchmark number
|
||||
/// stops meaning anything (<c>03_METRICS</c> §Upscaling, segments); until P2's segmenter cuts the
|
||||
/// session, the throwaway consumer reports the tuple most records ran at and says how many others
|
||||
/// it saw.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
internal sealed record UpscaleExtent
|
||||
{
|
||||
public required ushort RenderW { get; init; }
|
||||
|
||||
public required ushort RenderH { get; init; }
|
||||
|
||||
public required ushort OutputW { get; init; }
|
||||
|
||||
public required ushort OutputH { get; init; }
|
||||
|
||||
/// <summary>Records that ran at exactly this tuple.</summary>
|
||||
public required int Records { get; init; }
|
||||
|
||||
/// <summary>Records in the window that carried both sizes, whatever their tuple.</summary>
|
||||
public required int Measured { get; init; }
|
||||
|
||||
/// <summary>Distinct (render, output) tuples in the window. More than 1 means the settings moved.</summary>
|
||||
public required int DistinctGroups { get; init; }
|
||||
|
||||
/// <summary><c>sqrt((outW×outH)/(renW×renH))</c>.</summary>
|
||||
public double Ratio => Math.Sqrt((double)OutputW * OutputH / ((double)RenderW * RenderH));
|
||||
|
||||
/// <summary>The per-axis render scale as a percentage — <c>100 / Ratio</c>.</summary>
|
||||
public double RenderScalePercent => 100.0 / Ratio;
|
||||
|
||||
/// <summary>The dominant extent over the params-claiming window, or null when no record carried both sizes.</summary>
|
||||
public static UpscaleExtent? From(IReadOnlyList<FlFrameRecord> stream)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(stream);
|
||||
|
||||
int start = RecordWindow.ClaimedSuffixStart(
|
||||
stream, static r => ((FlMeasured)r.MeasuredMask).HasFlag(FlMeasured.UpscalerParams));
|
||||
if (start == stream.Count)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var groups = new Dictionary<(ushort, ushort, ushort, ushort), int>();
|
||||
int measured = 0;
|
||||
for (int i = start; i < stream.Count; i++)
|
||||
{
|
||||
FlFrameRecord r = stream[i];
|
||||
var mask = (FlMeasured)r.MeasuredMask;
|
||||
// BOTH bits, not just the values: a value set while its bit is clear is the writer's
|
||||
// defect (IsHonest counts it), and this must not quietly average it in.
|
||||
if (!mask.HasFlag(FlMeasured.UpscalerParams) || !mask.HasFlag(FlMeasured.OutputRes)
|
||||
|| r.RenderW == 0 || r.RenderH == 0 || r.OutputW == 0 || r.OutputH == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
measured++;
|
||||
(ushort, ushort, ushort, ushort) key = (r.RenderW, r.RenderH, r.OutputW, r.OutputH);
|
||||
groups[key] = groups.GetValueOrDefault(key) + 1;
|
||||
}
|
||||
|
||||
if (measured == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
KeyValuePair<(ushort, ushort, ushort, ushort), int> modal = groups.MaxBy(static g => g.Value);
|
||||
return new UpscaleExtent
|
||||
{
|
||||
RenderW = modal.Key.Item1,
|
||||
RenderH = modal.Key.Item2,
|
||||
OutputW = modal.Key.Item3,
|
||||
OutputH = modal.Key.Item4,
|
||||
Records = modal.Value,
|
||||
Measured = measured,
|
||||
DistinctGroups = groups.Count,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
using System.Diagnostics;
|
||||
using FluentAssertions;
|
||||
using FrameLedger.CaptureHost.Consume;
|
||||
using FrameLedger.Shared;
|
||||
|
||||
namespace FrameLedger.CaptureHost.Tests.Consume;
|
||||
|
||||
/// <summary>
|
||||
/// The render → output line: <c>03_METRICS</c>' ratio over two measured sizes, modal, with the
|
||||
/// settings-moved flag — and never a preset name.
|
||||
/// </summary>
|
||||
public sealed class UpscaleExtentTests
|
||||
{
|
||||
private static FlFrameRecord Record(ushort renderW, ushort renderH, ushort outputW, ushort outputH,
|
||||
FlMeasured extra = FlMeasured.UpscalerParams | FlMeasured.Upscaler) => new()
|
||||
{
|
||||
SwapchainId = 1,
|
||||
OutputW = outputW,
|
||||
OutputH = outputH,
|
||||
RenderW = renderW,
|
||||
RenderH = renderH,
|
||||
UpscalerQuality = 0xFF,
|
||||
UpscalerSharpness = 0xFF,
|
||||
Upscaler = (byte)FlUpscaler.Dlss,
|
||||
MeasuredMask = (ushort)(FlMeasured.OutputRes | FlMeasured.PresentArgs | extra),
|
||||
};
|
||||
|
||||
[Fact]
|
||||
public void CyberpunkAtBalancedIs172xAnd58Percent()
|
||||
{
|
||||
// The number measured on 2026-08-15 against the title's own menu: 1485x835 at 2560x1440 is
|
||||
// DLSS Balanced's 0.58, and a writer that hardcoded a plausible resolution cannot produce it.
|
||||
var stream = Enumerable.Range(0, 40).Select(_ => Record(1485, 835, 2560, 1440)).ToList();
|
||||
|
||||
UpscaleExtent? e = UpscaleExtent.From(stream);
|
||||
|
||||
e.Should().NotBeNull();
|
||||
e!.Ratio.Should().BeApproximately(1.724, 0.001);
|
||||
e.RenderScalePercent.Should().BeApproximately(58.0, 0.5);
|
||||
e.Records.Should().Be(40);
|
||||
e.Measured.Should().Be(40);
|
||||
e.DistinctGroups.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheReportPrintsBothSizesTheRatioAndTheScaleAndNoPresetName()
|
||||
{
|
||||
var stream = Enumerable.Range(0, 40).Select(_ => Record(1485, 835, 2560, 1440)).ToList();
|
||||
var writer = new FlWriterState
|
||||
{
|
||||
HooksInstalledMask = (uint)(FlHookFamily.Present | FlHookFamily.UpscalerIdentity | FlHookFamily.UpscalerParams),
|
||||
RuntimeCensus = (uint)FlRuntimeCensus.Ran,
|
||||
};
|
||||
|
||||
MeasuredFacts facts = MeasuredFacts.From(stream, writer, Stopwatch.Frequency, 0, 0);
|
||||
string text = SessionReport.Render(facts);
|
||||
|
||||
facts.UpscaleRatio.Should().BeApproximately(1.724, 0.001);
|
||||
text.Should().Contain("render -> output: 1485x835 -> 2560x1440 = 1.72x (58% render scale) on 40 of 40 record(s)");
|
||||
text.Should().NotContain("Balanced", "a preset name derived from the ratio is HANDOFF 7a's owner decision, not this line's");
|
||||
text.Should().NotContain("SETTINGS MOVED");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ASettingsChangeMidWindowIsTheDominantTupleWithTheFlag()
|
||||
{
|
||||
// Quality for the first third, Balanced after. Averaging would print a resolution nobody
|
||||
// rendered at; the modal tuple is a resolution somebody did, and the flag says it moved.
|
||||
var stream = Enumerable.Range(0, 30).Select(_ => Record(1707, 960, 2560, 1440))
|
||||
.Concat(Enumerable.Range(0, 60).Select(_ => Record(1485, 835, 2560, 1440))).ToList();
|
||||
|
||||
UpscaleExtent? e = UpscaleExtent.From(stream);
|
||||
string text = SessionReport.Render(MeasuredFacts.From(stream, new FlWriterState
|
||||
{
|
||||
HooksInstalledMask = (uint)(FlHookFamily.Present | FlHookFamily.UpscalerIdentity | FlHookFamily.UpscalerParams),
|
||||
}, Stopwatch.Frequency, 0, 0));
|
||||
|
||||
e.Should().NotBeNull();
|
||||
e!.RenderW.Should().Be(1485);
|
||||
e.Records.Should().Be(60);
|
||||
e.Measured.Should().Be(90);
|
||||
e.DistinctGroups.Should().Be(2);
|
||||
text.Should().Contain("SETTINGS MOVED: 2 distinct extents");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RecordsWithoutBothBitsDoNotCount()
|
||||
{
|
||||
// A value without its bit is the writer's defect; params without an output size cannot make
|
||||
// a ratio; a window with neither is null and the report says so rather than printing 0.
|
||||
List<FlFrameRecord> stream =
|
||||
[
|
||||
Record(1485, 835, 2560, 1440, extra: FlMeasured.Upscaler), // params bit clear
|
||||
Record(1485, 835, 0, 0), // no output size
|
||||
];
|
||||
|
||||
UpscaleExtent.From(stream).Should().BeNull();
|
||||
string text = SessionReport.Render(MeasuredFacts.From(stream,
|
||||
new FlWriterState { HooksInstalledMask = (uint)FlHookFamily.Present }, Stopwatch.Frequency, 0, 0));
|
||||
text.Should().Contain("render -> output: N/A (no record carried both a render size and an output size)");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user