Skip to content

Preserve descriptor-array indices across compatible handle Phis - #1038

Merged
hckrman101 merged 1 commit into
NotRexed:mainfrom
klimovich008:codex/preserve-texture-phi-indices
Nov 9, 2026
Merged

hckrman101 merged 1 commit into
NotRexed:mainfrom
klimovich008:codex/preserve-texture-phi-indices

Conversation

@klimovich008

@klimovich008 klimovich008 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What this fixes

A texture-handle Phi can select an array index from the wrong incoming branch. Vulkan can reject the resulting shader with VUID-VkShaderModuleCreateInfo-pCode-08737 because that index does not dominate its use.

Why merge

  • Preserve incoming index selection, samples and outputs.
  • Admit only direct GetCbufU32 Phis with matching bank, base, count and default stride.
  • Keep other handle forms and current main's depth and UINT handling unchanged.

Change

  • gpu/vk/eden/shader_recompiler/ir_opt/texture_pass.cpp: carry offsets through matching predecessor edges.
  • tests/texture_phi_dominance_ir.cpp: check the real pass, collector and emitter.
  • nx2/test_texture_phi_dominance.py: build and validate four synthetic cases.
  • tests/run_all.py: register the check without replacing existing entries.

Tested

python -I -B tests/run_all.py --jobs 1 --strict texture_phi_dominance

Fails on the old code, passes now. The Linux regression checks selection, dominance, retained samples/outputs and Vulkan 1.3 validation. Rebased Linux/Windows CI passes; local Windows skips unavailable SPIR-V tools. No new GPU test is claimed.

Not covered

  • The original captured RX 9070 XT shader still reports 08737 with this change; its global-memory handle is outside this rule.
  • GPU and full-game validation remain pending.

No game data is included.

@klimovich008
klimovich008 force-pushed the codex/preserve-texture-phi-indices branch from 1fa00b5 to 195f201 Compare November 9, 2026 15:43
@Nitnek

Nitnek commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Tested on NVIDIA (RTX 3070, Windows 11), merged onto v2.0.8-rc.5 (only tests/run_all.py conflicted).

  • All 44517 programs translate (0 failed).
  • The castle scene matches rc.5, with no new texture warnings in the log.
  • No device lost.

@hckrman101
hckrman101 merged commit 45ee15c into NotRexed:main Nov 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants