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

Closed
opened 2026-11-27 13:33:00 +00:00 by RonLogic · 0 comments
RonLogic commented 2026-11-27 13:33:00 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-27T13:33:00Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6647469116 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3066). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-27T13:33:00Z. --- 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.
Sign in to join this conversation.
No labels
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.

Reference
R0Y00/Xbox2Windows#3066
No description provided.