Tracking: Dynamic GetProcAddress, skipped Wave64 SSR/probes, GPU-owned/HLE races, pipeline lock contention, and test-coverage gaps #541
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner#541
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Third tracking issue covering verified HLE/GPU concurrency races, skipped Wave64 screen-probe shaders, pipeline-creation lock contention, unchecked stream input parsing, and missing CPU/regression tests not listed in Issue #1 or Issue #2.
Critical (Memory Safety, Silent Visual Drops, Crashes)
crates/darner-shader/src/emit/lower/analysis.rs:329-341;emit/mod.rs:1160-1162;pipeline.rs:214)WIDE_SKIP_DEFAULT(20 hashes) drops reflection, temporal-resolve, and screen-probe programs when no exact barrier-free form takes them, leaving the ambient stand-in to light the scene. Fix: A/BDARNER_EXACT64in gameplay and promote it to default for these programs (do not use the wave-wide form, which corrupts glossy surfaces).D3D12_INPUT_LAYOUT_DESCparsing (crates/darner-gpu/src/pipeline/host.rs:236-248)NumElements,pInputElementDescs, andSemanticNamefrom the title stream are passed unchecked toslice::from_raw_partsandCStr::from_ptr, risking title-thread crashes on malformed/truncated streams. Fix: ClampNumElements, null-check pointers, copy via fault-tolerant readers, and add a non-null stream test.DARNER_GPU_OWNED=1/DARNER_LAZY_BACK=1) (crates/darner-gpu/src/gpu_owned.rs:583-605, 858-871)drop_rangeand the failed-arming rollback clear bits/map entries without settinggoneor takingblock_lock, allowing a concurrent faulting thread to copy stale staging bytes into freed title memory and double-decrementACTIVE_COUNT. Fix: Setgonebefore clearing bits, re-check underblock_lock, and decrement only on successful swap.High (Compatibility, Hangs, Frame-Time Hitches)
GetProcAddressdiverges from static import resolution (crates/darner-hle/src/modules/kernel.rs:240-271;registry.rs:59-66)GetProcAddresschecks only the first module serving a DLL, never falls through to the host, and refuses ordinals—returningNULLfor APIs that bind statically. Fix: Route pseudo-handles throughregistry::lookup+ host policy, translate ordinalnto"#n", and test parity with static binding.apps/darner/src/translate.rs:283-287, 567-570;emit/lower.rs:1130-1136;host.rs:2484-2490)translatereadsDARNER_HOST_MAX_WAVE(notDARNER_HOST_WAVE),precompilesets neither, and failedCheckFeatureSupportleaves host wave at0—silently disabling Wave64 lowering and dropping shadows/water/particles. Fix: Alias/unify the env var, set it inprecompile, and default unknown host wave to32with a warning.SHADERSmutex held across shader analysis & repeated container rescans (crates/darner-gpu/src/pipeline.rs:115-139;pipeline/make.rs:276-313, 348-360)SHADERS.lock()is held duringambient::role/mirror::partanalysis, and containers are re-scanned/re-decoded per pipeline creation, serializing title threads and hitching on new content. Fix: Look up under lock, analyze outside the lock, and memoize per-Shaderclassifications inOnceLock.crates/darner-hle/src/mousehook.rs:247-250: Stack/hook imbalance callsstd::process::abort(); log once and return instead.crates/darner-hle/src/modules/xasync.rs:349-388: A panic inTimer::run'sjob()leavesstate.1 = trueforever, halting all delayed async completions; guard withcatch_unwindor aDropreset guard.crates/darner-hle/src/runtime.rs:25-32, 117-132:image_sizere-reads the PE header for every recorded image, risking a UAF if an entry outlives its mapping; cachesize_of_imageinImagePathon registration.crates/darner-hle/src/modules/kernel.rs:122-127:GetModuleFileNameAcopies UTF-8 instead of the Windows ANSI code page; usehost::ansi.Medium (Bookkeeping, Power-Loss Safety, Worker Resilience)
take_outleaves staleheldmarks in descriptor queue (crates/darner-gpu/src/descriptor/host.rs:2107-2132, 2560-2564)take_outclearschecked/mappedbut notheld, keepinghas_heldelevated until a laterroom()pass.sync_all()beforerename(crates/darner-pipeline/src/cache.rs:144-154)Power loss before flush can leave a partial file as a permanent bogus cache hit; call
sync_all()beforerenameand evict entries that fail validation..expect()& silent texture-sweep thread death (crates/darner-gpu/src/host.rs:1039-1058, 3497;capture.rs:416-442)host.rs:3497panics on prelude thread spawn failure (degrade to synchronous preludes);host.rs:1045stops idle texture reclaim forever iflet_go_idle()panics (wrap incatch_unwind);capture.rsuses an unbounded channel and can spin on device removal.Low (Offline Test Coverage & Stale Docs)
s_getpc/far-jump tests require an SM 6.6 GPU or private bench paths (crates/darner-shader/src/emit/folded_tests.rs:181-248;oracle64.rs:1876;fold.rs:1214-1225, 1650-1691)Add default CPU tests using synthetic folded/far-branch programs verified against
oracle64::check_fold.#[ignore]d (crates/darner-gpu/src/texture/ahead.rs:715-716)Re-spawn the test binary with
--exactandDARNER_PRELUDE_UPLOADS=1(matchingsampled.rs) solate_completion_keeps_a_newer_list_refreshruns by default.DARNER_ORACLE_*switches fromdocs/shader-memory-validation.md:62Static cross-check (source reading, no build)
I read the cited files on
main(2026-12-05). 13 items: 5 confirmed, 8 partial, 0 outright not confirmed. A few citations are off, so the partial list is worth a second look.Confirmed by code:
analysis.rs:329-336has 20 hashes inWIDE_SKIP_DEFAULT, including34992f2b65a789a5;emit/mod.rs:1158-1163suppresses the wave-wide form;pipeline.rs:209-215drops the draws. This one is useful. Note: promoting exact64 to default still needs a visual check — exact64 with RT off has been reported to wash out the phone screen.pipeline/host.rs:241-248:NumElements/SemanticNameunchecked.darner-pipeline/src/cache.rs:150-160: write -> drop -> rename, nosync_all.folded_tests.rs:181-185: needs SM 6.6; #12texture/ahead.rs:715-716is#[ignore]d.Partial / citation corrections:
kernel.rs:131useshost::ansi, not UTF-8; theGetModuleFileNameAsub-claim is not true onmain. The other three hazards look real.DARNER_HOST_MAX_WAVEmismatch is real, buttranslate.rs:567-570isprogress_lineandhost.rs:2484-2490is a test.pipeline.rs:115-139holdsSHADERSacrossambient::role/mirror::part;make.rs:276-313isleft_outand:348-360isPending::new, so the "repeated rescans" part is not shown there.host.rs:3497is thePlanePasscomment, not a thread spawn.This is code-level only — no runtime reproduction. I can post the full 13-row table if useful.
I’m taking the texture-queue hold bookkeeping item. On
c8258f9,take_outandputcan leave the retired write recorded inheld. The write ID check already protects queue eligibility. The heap flag can still keep sampled-feedback readback on the four-frame schedule after the last held write is removed or replaced, on the ordinary cadence path. Readback cadenceI’ll test retiring those marks on removal and replacement in both queue layouts, alongside an old completion arriving after a newer hold. #539 cuts the cost of collecting a queue snapshot and touches the same queue. This check is for the lifetime of the mark used outside the queue.