shader: lower explicit-LOD 2D gather in the direct DXIL frontend #3066

Closed
opened 2026-11-27 13:46:05 +00:00 by github-bot · 0 comments
Owner

@⁠RonLogic on GitHub · 2026-11-27 13:33 UTC · original

Refs #2935 and #1802. image_gather4_l compiles through the startup HLSL frontend, but the direct C++ frontend refuses it. Using source-built 2D pixel and compute containers built from tests/native_direct_container_check.py, opcode 71 (image_gather4_lz) compiled and opcode 68 (image_gather4_l) failed at guest +0x30 with direct image opcode or descriptor modifiers. The local compiler used main ff04a75e plus the separate #3057 ALU patch, which changes no image handling.

I’ll take the explicit-LOD 2D slice. Start with a normalized clamp sampler and a fixed table-bound 2D view. Use the repository’s explicit-gather mip and tap rules, preserve channel order and make the SRV mip window view-relative. Refuse other dimensions, unsupported sampler/operand fields and any form whose layout is unproved.

Acceptance is source-built direct DXIL and exact readback from two mip levels with a nonzero SRV base and distinct taps, including a wrong-mip control. Cover the supported pixel and compute entry points as their bindings allow. #3065 supplies the desktop reference values. Plain implicit image_gather4 and runtime binding changes have separate requirements.

**@⁠RonLogic** on GitHub · 2026-11-27 13:33 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3066) Refs #2935 and #1802. `image_gather4_l` compiles through the startup HLSL frontend, but the direct C++ frontend refuses it. Using source-built 2D pixel and compute containers built from `tests/native_direct_container_check.py`, opcode 71 (`image_gather4_lz`) compiled and opcode 68 (`image_gather4_l`) failed at guest `+0x30` with `direct image opcode or descriptor modifiers`. The local compiler used main `ff04a75e` plus the separate #3057 ALU patch, which changes no image handling. I’ll take the explicit-LOD 2D slice. Start with a normalized clamp sampler and a fixed table-bound 2D view. Use the repository’s explicit-gather mip and tap rules, preserve channel order and make the SRV mip window view-relative. Refuse other dimensions, unsupported sampler/operand fields and any form whose layout is unproved. Acceptance is source-built direct DXIL and exact readback from two mip levels with a nonzero SRV base and distinct taps, including a wrong-mip control. Cover the supported pixel and compute entry points as their bindings allow. #3065 supplies the desktop reference values. Plain implicit `image_gather4` and runtime binding changes have separate requirements.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 13:46:06 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#3066
No description provided.