Repository navigation
Conversation
A join of two immediate samplers (one clamping, one wrapping) was refused as a descriptor chosen by control flow: descriptor_phi only joins heap loads. The join now picks a static sampler number; the sample is made with each sampler it can be and its channels are selected by that number.
|
Two things before this can merge:
Also: this and #55 both add to the top of "Newest" in |
When the sample cannot be made again with another sampler a join picks, or a level-of-detail query takes a picked sampler, the program is refused as a sampler chosen by control flow instead of drawing with the first sampler. A gather's four texel reads take no sampler and keep their path. AI-assisted.
|
Thanks, both points taken.
On |
What changed
R-7 (partial): the 40 programs that failed with "emit: a descriptor chosen by control flow" now translate (37 pixel shaders:
PS_TexturedLit*,PS_TexturedDeferred,PS_MirrorReflectionTexturedDeferred,PS_PuddleDetect; 3 mesh shaders:MST_DS_TerrainTransform,MST_DS_CascadeShadows_PNTriTexture). The join was between two immediate samplers (one clamping, one wrapping), anddescriptor_phionly joins heap loads. The join now picks a static sampler number; the sample is made with each sampler it can be and its channels are selected by that number. Exact, at the cost of one more sample per affected read. A join of an immediate and a loaded sampler is still refused ("a sampler chosen by control flow").How it was tested
Checks run on this branch:
cargo test --workspace --locked: 656 passed, 0 failed, 18 ignored (run with-j 2 -- --test-threads=4)cargo clippy --workspace --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo xtask policyNew unit test:
emit::lower::tests::a_sampler_chosen_by_control_flow_samples_with_each(a compute program picks one of two immediate samplers by a root constant; both are declared).leonida translate --list --validate --jobs 2with a release build:All 40 are emitted and pass the DXIL validator. The validator failures that remain (output signatures, mesh output over 32,768, out-of-bound coordinates) are on other programs; none of the 40 is among them.
AI