native compute: accept comparison static samplers (smpc) on the in-process route #3075
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#3075
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?
@Not-Saii on GitHub · 2026-11-27 14:18 UTC · original
Part of #2935 (its "Samplers" item, which is not filed yet).
Problem. On
mainate1ea515d, the in-process native compute route (X2W_NATIVE_SHADERS,src/startup_stubs/d3d12_compute_dispatch.inl) refuses any manifest line that starts withsmpcand returnsa comparison sampler(lines 174-175). The pieces on both sides already exist:sampler_index,src/gfx1013_compute_native.cpp), for exampleimage_gather4_c_lzsince #2971, andsrc/direct_compute_cache.cppwrites them assmpclines.TranslatedSamplers::read_manifest_lineanddecode_statics(src/startup_stubs/translated_sampler_bindings.h) already parsesmpcand decode it to a comparison static sampler for the draw path.So a compute request that the translator compiles is still sent back to the
gfx2hlsl.pyfallback at its first Dispatch because of its sampler line.Plan.
smpc <i> <w0> <w1> <w2> <w3>in the route under the same index and whole-line checks assmpandsmpl, throughread_manifest_line.smpheaprefused under its current message. The sampler-heap path is a separate item.Test (source-built only). A compute fixture that compiles a comparison gather or sample with a constant comparison sampler and runs it through the in-process route. The readback is compared against a CPU model of the compare, on
_hardware. The route refuses WARP today (#2958), so there is no_warprun beyond the host-side manifest check. Negative control: the same fixture with the route change reverted is refused witha comparison sampler.I'm taking this one. Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP. The PR will target
main.AI-assisted.
github-bot referenced this issue2026-11-27 14:41:54 +00:00
@Not-Saii on GitHub · 2026-11-27 14:39 UTC · original
Correction to the description above. The refusal is not on the in-process route.
a comparison sampler(src/startup_stubs/d3d12_compute_dispatch.inl, lines 174-175 ate1ea515d) is inload_compute_translation, the reader of a published<key>.txt. The in-process route (X2W_NATIVE_SHADERS,translate_compute_natively) reads no manifest lines. It refuses every sampler, and every view that is not a raw buffer, with its own messages.tools/startup/gfx2hlsl.pywritessmpcfor a compute program today.format_compute_runtime_manifest(src/direct_compute_cache.cpp) returns no manifest for a comparison sampler; thesmpcwriter in that file is the graphics one. So the request does not fall back togfx2hlsl.pybecause of this line. The translationgfx2hlsl.pypublishes is the one the runtime refuses, and a compute request with a comparison sampler cannot be dispatched at all._warprun as well as a_hardwareone.The plan is otherwise the same: accept
smpcin that reader under the checks ofsmpandsmpl, and leavesmpheaprefused. The fixture goes intotests/startup_compute_dispatch_texture_check.py.Not part of this issue: static samplers on the in-process route (after #3049) and
smpcfromformat_compute_runtime_manifest.AI-assisted.