Skip to content

v0.1.9-alpha - the hook wait that never waited, and the slider that did nothing

Choose a tag to compare

@perseval-BLR perseval-BLR released this 17 Sep 19:35
· 105 commits to main since this release

Important

Test build: collect logs from real AMD Radeon cards and see how it goes. The neural pass has never run on a Radeon here. The program starts on any card and says so when the card is not supported. The black picture on a Radeon is NOT fixed by this release - what is fixed are three real defects found while chasing it, one of which is the documented route to a silent passthrough.

This comes from the third report from a real 9070 XT. Comparing our host against the one external implementation that works turned up traps that are silent when they are wrong - which is why each one is now tested.

1. The hook wait returned instantly and waited for nothing

The runtime's log is opened in append mode across runs. Our wait searched the whole file for hooked IDXGISwapChain1::Present1, so from the second launch onward it found a previous run's line immediately and skipped the wait:

[amd] the runtime's D3D12/DXGI hooks are in place (0 ms)

Zero milliseconds is not "fast", it is "did not wait". That is the documented route to a silent passthrough: the runtime installs its D3D12/DXGI detours from a thread it starts on load, and a swapchain created before those land never enters its swapchain-to-queue map. Its only fallback cannot work on D3D12, so the frame is discarded and never retried.

Fixed: the log's size is recorded before the module loads, and the wait reads only bytes written after that.

2. The Intensity slider never reached the network

On the AMD path the network's strength is not an in-image parameter - the runtime reads Scale from its own ini. We passed intensity through the parameter block, where the runtime does not look, so on a Radeon moving Intensity changed nothing about the effect.

Fixed: the value is written to the ini as Scale, and the slider's 1.0 maps to the calibrated value (0.03), not the runtime's ceiling (0.125) - 0.005 is invisible, 0.03 is where skin and fabric gain detail without ringing, 0.125 produces halos. NS_AMD_NR_SCALE_MAX moves the top for taste. The change is logged once:

[amd] intensity 0.70 -> the runtime's Scale=0.02100

3. A barrier that lied about its state

up_out was CREATED in UNORDERED_ACCESS, while the barrier that opens every
frame claimed it was leaving NON_PIXEL_SHADER_RESOURCE.

A D3D12 barrier says "this resource is in state A; make it B". If A is not where the resource really is, undefined behaviour - no error, no warning, a wrong picture if you are unlucky.

Fixed: both engine surfaces follow the working reference exactly, created writable (which is what their dispatches declare) and returned there at the end of each frame.

4. The engine's verdict is now in OUR log

The third report had everything healthy on our side - pass active, network at 16 ms a job, self-check fine - while the picture was black. The one line that said so was in the ENGINE's log: auto-exposure: encoded mean 0.000. The periodic [amd] summary now reads the engine's log and repeats what decides it, with the black case in words. One file carries both sides.

What was measured and dropped

The creation state was the first suspect and it was wrong. probe_fsr creates the dispatch output readable and writable, dispatches in both cases, and counts the pixels:

net created readable     dispatched=yes  non-black pixels=230400
net created writable     dispatched=yes  non-black pixels=230400

Both write every pixel, so a creation state alone does not black a frame. The probe also runs the HOST'S OWN CONVERSION SHADER then the dispatch on its output, counting at each step: 230400/230400. Our conversion is not the cause either. The black picture's cause is still open, and will not be named again without a measurement.

Tests

Three new checks, all registered in the suite and all verified by negative control (they fail on the previous commits):

  • test_amd_state_bookkeeping.py - no barrier may leave a state the resource cannot be in, none may be a no-op, and each frame must close its cycle. Reports 2 problems on the old code.
  • test_amd_runtime_traps.py - the hook wait reads only this run's lines, the log mark is taken before the load, and the slider's top is the calibrated value. Reports 5 problems on the old code.
  • probe_fsr.exe - the whole frame chain on real hardware, three stages, all green.

Files

  • neuralscreen-amd-v0.1.9-alpha-full.zip
  • README.md, README.ru.md, TECHNICAL.md, TECHNICAL.ru.md
  • THIRD-PARTY-NOTICES.md

Still open

  • The black picture is not fixed. The defects above were real and are gone; the cause of encoded mean 0.000 on a real card is not yet known. The next report will carry the engine's own numbers into NeuralScreen.log, so the answer is one file away.
  • network job 1 repeating with history off, and three-second capture waits, are our host being slow. If that survives the next round it is a separate problem worth its own fix.