Separate ordinary and depth-reference sampler bindings in the HLSL bridge #670
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/676"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T19:23:26Z.
Refs #218. In a mixed module, SPIRV-Cross inferred one comparison sampler type from a shared guest table, preventing DXC from resolving ordinary Sample and SampleLevel overloads. Keep the original descriptor index and texture and clone only the depth-reference access into a second typed view. The host binds the comparison view at s1 in space3.
The self-built PS and CS assemble, validate and cross-compile with the two HLSL sampler types. On Windows 26200.9974, RTX 4060 Laptop 32.0.16.1656 and WARP 10.0.26100.9818 both read ordinary values (0.25, 0.75) and comparison values (0, 1). Swapping only the ordinary pair gave (0.75, 0.25; 0, 1). Swapping only the comparison pair gave (0.25, 0.75; 1, 0). Both reported zero debug errors and zero warnings.
Reproduce with
ctest --preset dev --no-tests=error -R spirv_sampler_views -Vwhen SPIRV-Tools and SPIRV-Cross are installed. Local runs used WSL assembly/cross-compilation, native Windows DXC and the release offscreen_check executable on both adapters. The full-package rerun is being counted separately.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T23:42:19Z.
Source-only implementation at
5748b02. Replayed 26,503 archive records with the original four-entry address window and SM 6.6/native 16-bit compilation settings. Of these, 1,840 records previously stopped at an ordinary sampling call receiving a comparison sampler. Archive multiplicity is preserved.All pipeline outcomes, including resource limits (45 s per identified input, 1,400 MiB per process):
The first full frontend pass generated HLSL for 26,472 records. Two additional CS records hit the per-module time limit and both generated HLSL on isolated retry. The other 29 frontend errors concern PS MinLod.
Original first-error subgroups:
Package output checks on RTX 4060 Laptop (32.0.16.1656) used independent CPU expectations. On the PS, two records shared identical native instructions and generated identical HLSL. Two alpha values and a discard case matched all 4,096 RGBA words per run. The CS wrote an 8 by 4 texture using two different input masks. All 128 words matched for each input. Each deliberately wrong oracle produced exactly one differing word. These controlled inputs cover the observed outputs of these programs. On WARP (10.0.26100.9818), both readback processes passed pipeline creation and submitted commands, then exited with code 2173 before yielding comparable data. No pixel or word mismatch is inferred from the exit code. Windows build 26200.9974 with the debug layer enabled.
Output samples were separately allowed up to 600 s of DXC time. Under the formal 90 s compilation and bounded PSO run, the number of records that also passed hardware readback was: