[pr-fix] darner: an empty DARNER_SHADER_ONLY no longer hides every container #410
No reviewers
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!410
Loading…
Reference in a new issue
No description provided.
Delete branch "qnjk/Darner:shader-info-empty-filter"
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?
Contributor role (optional)
What it changes
The problem on main:
darner shader-infoparsed its filter as(
apps/darner/src/shader.rs). A variable that is present but empty givesOk("")and soSome(vec![]), whoseanyis false for every container: the scan skipped every container beforeContainer::parseand reportedcontainers found 0 (in 0 files)plus the "shaders may sit in compressed or encrypted archives" hint, for a folder full of shaders. An empty value really does reach the process this way — a launcher that passes a variable through with nothing set (Command::env(k, ""), .NETProcessStartInfo, Nodeenv) puts aNAME=entry in the environment block; PowerShell deletes the variable instead, which is why the difference was easy to miss.This change extracts the parse into
only_hashes, which returnsNonewhen the value names no hash after splitting and trimming, andNoneandSome(list)keep behaving exactly as before otherwise. It is the rule the tree already follows elsewhere:darner-core'senv_pathfilters empty values (config.rs:100, pinned byempty_env_values_are_ignored), andDARNER_TRANSLATE_ONLYis applied only when non-empty (translate.rs:661).How it was tested
d9928a1(one commit onf3840d7).cargo test --locked -p darner— 149 passed, 0 failed, 1 ignored (the crate has no lib target; the bin's tests are the 149).shader::tests::an_empty_only_list_names_no_hashes:None,Some("")andSome(" , ")all yieldNone(no filter), andSome(" ABC, def ")still yieldsSome(["abc", "def"])— trimming, case folding and comma splitting are unchanged.ProcessStartInfo.EnvironmentVariables['DARNER_SHADER_ONLY'] = ''): onmaina folder holding one synthetic 32-byte DXBC container reportscontainers found 0 (in 0 files)and the "none found" hint; with this change it reportscontainers found 1 (in 1 files). WithDARNER_SHADER_ONLY=" 252D095627775C35 ,"the matching container is still selected and a non-matching hash still reports 0.cargo clippy --locked -p darner --all-targets -- -D warningspasses.cargo clippy --workspace --all-targets --locked -- -D warnings: passes.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passes.cargo test --workspace --locked: not green on this machine, and not because of this change. Three pre-existing failures, each covered by an open pull request:darner-gpustands still in parallel on the test deadlock #224 describes, and serially finishes 1772 passed and 1 failed (pipeline::make::tests::a_capped_draw_waits_once_then_drops, which passes on its own) beside the order-dependent flakes of #150;darner-shaderfailsemit::waterfall_tests::sampled_marks_restore_early_depth_only_when_safe_in_pixel_shaders, whose fixture #227 fixes.darner's own suite is green.shader-infoscan, not the runtime.shader-info's filter was checked end to end;DARNER_SHADER_SAVEand--disasmwere not re-run, and the end-to-end container is synthetic, not from the title.Checklist
shader-infoscan. The evidence is the unit test plus the same-folder before/after run above.main.docs/asset-policy.md. (cargo xtask policy: 555 files ok.)Checked for overlap
apps/darner/src/shader.rs(checked against the file list of all 161 open pull requests), and no open or closed issue mentionsDARNER_SHADER_ONLYorshader-info.