shader: treat OpImageQueryLod as an ordinary sampler use in the sampler bridge #1355
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1362"
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 tedin7 on 2026-11-24T09:16:54Z.
What
read_moduleintools/spirv_sampler_views.pynow listsOpImageQueryLodnext to theOpImageSample*,OpImageGather*and sparse forms as an ordinary use of its sampled image (the sampled image is word 4, as for a sample).tests/spirv_window/sampler.pygains a fragment module with an implicit-derivativeOpImageQueryLodand a depth-reference sample on one table. Docs indocs/experiments.mdare updated.Why
HLSL
CalculateLevelOfDetailneeds aSamplerState. A table used by a query and a comparison sample but by no ordinary sample was returned unchanged, and SPIRV-Cross wrote the query againstSamplerComparisonState _3[2](invalid HLSL). With the change the table is split: the query keeps theSamplerStatetable and the comparison sample uses the set 3 view. Existing modules produce the same output as before (24 fixture variants compared againstorigin/main).Tested
Windows:
ctest --preset pr --no-tests=error -R spirv_sampler_views -V(spirv_sampler_views_hardware,spirv_sampler_views_warp). The new module is also compiled with DXC asps_6_0.Linux (ran):
python3 -B tests/spirv_window/sampler.py spirv-as spirv-val spirv-cross,tests/spirv_window/compare_sampler.pywith the same tools, py_compile,tests/docs_links_check.py,tests/bidi_controls_check.py,git diff --check. With theOpImageQueryLodline removed from the tool the new check fails.NOT run locally: DXC, WARP and hardware readback. No LOD value is drawn (needs a mip-chain texture and a draw case), so that part stays Windows-only. Only the SPIRV-Cross on this machine was used; CI's 2021.01.15 was not. The check accepts any
CalculateLevelOfDetail*spelling.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T09:22:13Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
e9a84c0dca01bd514503040787007e28a0a67d78:--preset dev):offscreen_checkbuild25.63s;ctest --preset dev -R '^spirv_sampler_views_warp$' --no-tests=error --output-on-failure: 1/1 passed (0.78s)/O2(--preset release):offscreen_checkbuild39.87s;ctest --preset release -R '^spirv_sampler_views_warp$' --no-tests=error --output-on-failure: 1/1 passed (0.68s)Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T09:22:26Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
e9a84c0ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.