Shaders: legacy geometry PSOs retranslate the same ES+GS pair for every pixel shader (verification help wanted) #2876

Open
opened 2026-11-26 20:33:58 +00:00 by KOLESNiii · 0 comments
KOLESNiii commented 2026-11-26 20:33:58 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-26T20:33:58Z.


Could someone verify whether legacy geometry PSOs spend measurable CPU time retranslating the same ES+GS pair when only the pixel shader or fixed-function state changes?

On main at 8b957bec, translated_gs_pso calls console_geometry before either native driver-cache lookup. console_geometry reparses and combines the ES and GS and runs direct DXIL lowering or generates HLSL before looking up the DXC result. By comparison, the NGG mesh path caches its compute pass before making the pixel-signature-specific mesh passthrough. GS caller · ES+GS translation · HLSL cache lookup · NGG compute-pass cache

A Windows check could create two valid PSOs with identical console VS/GS bytes and different PS or fixed-function state, after warming DXC and the driver blobs. Count and time the ES+GS lowering calls separately from passthrough generation and native PSO creation. Please verify whether the repeat work also shows up in a representative title before deciding if it warrants a cache.

This was a static source review on Linux. PR #2103 covers deferring direct geometry lowering during a cached-only probe. This report asks about repeated lowering across builds that proceed to translation.

AI use: Codex (GPT-6, exact serving variant unavailable) for the Graphify-assisted review and issue draft.

<!-- greyfinch-sync:ivall/xcl:issue:6634660952 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2876). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-26T20:33:58Z. --- Could someone verify whether legacy geometry PSOs spend measurable CPU time retranslating the same ES+GS pair when only the pixel shader or fixed-function state changes? On `main` at `8b957bec`, `translated_gs_pso` calls `console_geometry` before either native driver-cache lookup. `console_geometry` reparses and combines the ES and GS and runs direct DXIL lowering or generates HLSL before looking up the DXC result. By comparison, the NGG mesh path caches its compute pass before making the pixel-signature-specific mesh passthrough. [GS caller](https://github.com/xcl-dev/xcl/blob/8b957bec6f82495aec940944c6bf47faa02db590/crates/xcl/src/hle/d3d12x/real.rs#L6305-L6310) · [ES+GS translation](https://github.com/xcl-dev/xcl/blob/8b957bec6f82495aec940944c6bf47faa02db590/crates/xcl/src/gpu/recomp/pso.rs#L1219-L1238) · [HLSL cache lookup](https://github.com/xcl-dev/xcl/blob/8b957bec6f82495aec940944c6bf47faa02db590/crates/xcl/src/gpu/recomp/pso.rs#L1081-L1087) · [NGG compute-pass cache](https://github.com/xcl-dev/xcl/blob/8b957bec6f82495aec940944c6bf47faa02db590/crates/xcl/src/gpu/recomp/pso.rs#L1145-L1163) A Windows check could create two valid PSOs with identical console VS/GS bytes and different PS or fixed-function state, after warming DXC and the driver blobs. Count and time the ES+GS lowering calls separately from passthrough generation and native PSO creation. Please verify whether the repeat work also shows up in a representative title before deciding if it warrants a cache. This was a static source review on Linux. PR #2103 covers deferring direct geometry lowering during a cached-only probe. This report asks about repeated lowering across builds that proceed to translation. AI use: Codex (GPT-6, exact serving variant unavailable) for the Graphify-assisted review and issue draft.
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
xcl-dev/xcl#2876
No description provided.