Corpus census: 185 emitted DXIL modules fail dxil.dll validation #201
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#201
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Proudnoob4 on GitHub · 2026-11-24 01:23 UTC · original
Summary
I ran
victory translate --validate --pipelines --listover the 26,503 DXBC containers extracted from my own 1.0.2.1 copy, on main97c78d1+ the Agility exports from #84 (RTX 4080, driver 621.01). AI-assisted (Claude); I ran the translation and grouped the results myself.All 26,084 programs translate. DXIL is emitted for 12,272 / 14,001 VS/PS, 1,685 / 2,581 compute and 8,191 / 8,506 mesh. 185 of the emitted modules fail validation with
dxil.dll1.8.2502 (from Windows SDK 10.0.26100):Grouped by reason:
vertex plus primitive output size is greater than 32768(mesh)Container part 'Program Input/Output Signature' does not match expected for module(25 output, 21 input)Entry function performs some operation that is incompatible with the shader stage(compute)linear_noperspective_centroid/samplewhen writingoDepthGE/oDepthLENotably, the D3D12 runtime still created host pipelines for all of the VS/PS and mesh modules: 12,272/12,272 VS/PS and 8,191/8,191 mesh. So these are validator rejections, not driver rejections, and the game may still be fine with them. I haven't checked whether any of the 185 are among the shaders actually bound in my runs. The full per-shader output is too large to post, but I can extract any specific group.
For contrast, the driver's refusals are a separate matter: 321 compute pipelines with
E_INVALIDARG, cross-tabulated in my #71 comment.github-bot referenced this issue2026-11-26 04:29:49 +00:00
@DaviTostes on GitHub · 2026-11-24 02:03 UTC · original
Ran the synthetic shader suite against a real validator to see which groups reproduce on current
main(d2a4bae):VICTORY_DXILpointing at dxil.dll 1.8.2502,cargo test -p victory-shaderwith--test-threads=1.emit::tests::stub_pipeline_is_created, and only because vkd3d-proton accepts a zeroed container digest (the digest-rejection check); it is not a translator/validator failure.emit::tests::constant_color_validatespasses, so the validator is actually loaded and validating (no "no dxil.dll; skipped" message).One code observation on the groups:
PS input position interpolation must be linear_noperspective_centroid / samplefailures:emit/mod.rsalready sets every pixel-shader position input (kind == 3) to interpolation mode 4 ((3, _) => 4, present since the initial import, before the census commit). So either those modules' position is notkind == 3, or the failure comes from a row that mixes modes (the same shape as the 49 "interpolation modes disagree" group).To reproduce the remaining unowned groups synthetically (53 mesh output size, 23 compute stage-incompatible ops, and the 14 if they persist), could you share the signature layout of one failing module — semantic names, kinds, rows/cols, component types, interpolation — rather than the shader bytes? That is enough to build the same container layout in a test and validate it. With
victory translate --validate --listyou can also tell whether the 14/46/49 groups still occur ond2a4bae; the census was on97c78d1.No game data used.
@AnoHunted on GitHub · 2026-11-24 03:44 UTC · original
#459 addresses the 53 mesh modules in the "vertex plus primitive output size is greater than 32768" group. It measures the outputs the way
dxil.dlldoes, and lowers the declared maxima to the lane count when they don't fit. Each lane writes only its own vertex and primitive, so nothing the shader writes is lost. A module that still doesn't fit at the lane count is emitted as before, so no draw is dropped. Its synthetic tests passdxil.dll(DXC 1.9.2609) validation.If you rerun the census with #459 on top, I'd be glad to know how the 53 split between "now valid" and "still over at the lane count". I can't measure that without the corpus.
AI-assisted (Claude Code). No game files.
@r4tedx on GitHub · 2026-11-24 04:29 UTC · original
The compute group of this census (23 modules,
Entry function performs some operation that is incompatible with the shader stage) now has a cause and an open fix.translate --validaterun on the #233 stack found 43 compute modules with this message, and all 43 callsample. (More than 23 because that stack lets more compute programs translate;mainhas 23, as in this census.)image_sampleis emitted asdx.op.sample, the modules declare validator version 1.6, and under 1.6 / 1.7 rules that operation is not allowed outside pixel shaders. It fails in every thread-group shape and with every wave size. The validator's second line, whichtranslatedoes not print, isFunction uses features incompatible with the shader stage (cs) of the entry function.sampleGradfrom quad gradients. #306's description lists a compute implicit-derivative fix too; I have not compared the two.c4183d3cbee28e8e) is the one compute pipeline an older NVIDIA driver refused, right after a first-chance exception in its shader compiler, in this run. That the invalid module is the reason is the simplest reading, not proven.If you rerun the census, two things would close this group:
e49302a) makestranslate --validateadd to each validator failure what the emitted module declares and calls (thread-group size, wave size, itsdx.opoperations; nothing of the console program). That line is what found the common factor above in one run, and it may sort the other groups the same way.No game data used on my side. AI-assisted.
@Proudnoob4 on GitHub · 2026-11-24 04:59 UTC · original
I reran the census you both asked about, on the full 26,503-container corpus, as a clean A/B. Both builds are
main d2a4bae+ our Agility exports (Win10 SM 6.6), release,translate --validate --list, 10 parallel chunks, all exit 0:Answer to r4tedx's question 1 (#180): yes, cleanly. The 23
Entry function performs some operation that is incompatible with the shader stagefailures all clear (23 → 0), none of those 23 fail for a different reason, and zero programs that validated on base fail on the fix build. So#180removes that whole group with no regressions in this census.Answer to AnoHunted's question 2 (#459): 0 now valid, 53 still over. All 53 still fail with the identical message; none switched to another reason. I checked one of them in detail (
(MS_VS_PedTransformFire_52f61330_Wrapped~3.dxbc, emitted DXIL):NumThreads=(128,1,1),setMeshOutputCounts(…, 128, 128), 79 vertex outputs, 0 primitive outputs.mesh_output_bytes's formula that is 4 × (79 × roundup(128, 32) + 0) = 40,448 B, above the 32 KiB cap as the validator says.So #459 as posted does not clear any of the 53 in this corpus. A fix would need to lower the maxima below the lane count (with the prologue culling lanes whose indices exceed the new maximum), or reduce the declared output rows. I have the emitted DXIL for that example and the per-program failure list if useful.
Note on the other groups: signature mismatches rose 46 → 56 and conservative depth 14 → 15, while 460 more programs got a validation result. Those extra programs come from #180 letting 23 more compute programs translate, several of which now emit DXIL that fails for a different reason; the net failure count still drops 185 → 173. I have not attributed each of the 10 extra signature failures individually.
Counts and build identities only; no game data beyond shader hashes. AI-assisted (Claude Code). I ran the translation on Windows 10, RTX 4080; corpus tooling and the A/B script are mine.
@r4tedx on GitHub · 2026-11-24 05:51 UTC · original
@Proudnoob4 thank you, that settles question 1: with #180 the 23 compute modules of this group go to 0, and nothing that validated on
mainfails.One correction to my comment above. I wrote that the 43 modules were found "on the #233 stack". They were counted on #439's head
9745f35, the top of that stack (that run). The same tester's per-head table gives:mainmaina5ba4a4)9745f35)So the extra ones come in with #320, which lets 21 more compute programs translate, 20 of them with this message. All 43 call
sample, so they are the class #180 fixes.Question 2 (the summary line
translate --validateprints on #439's head) is not needed for this group any more. It may still help sort the other groups, for example the signature mismatches that went from 46 to 56 in your rerun.I ran nothing myself for this comment; the numbers are the linked testers'. AI-assisted.
@iurysf on GitHub · 2026-11-24 06:04 UTC · original
Update on the 53 mesh modules (
vertex plus primitive output size is greater than 32768), measured on maind2a4baewith dxil.dll 1.9.2602.17.MaxVertices = 128,MaxPrimitives = 128, no per-primitive outputs, and 19 packed vertex output rows: 128 × 19 × 16 B = 38,912 B.Options I can see:
GS_ALLOC_REQcount is a known constant ≤ 107 (19 rows) — related to #586, which decodes the request but keeps the declared maxima.Not verified: whether NVIDIA or AMD drivers misbehave on these at runtime. Your census says the runtime still created all mesh pipelines.
@iurysf on GitHub · 2026-11-24 06:29 UTC · original
Measured offline with
victory translate --list --validateover the title'sshaders.rpf+ executable (26,096 programs), dxil.dll 1.9.2602.17, against maind2a4bae: 3,733 translation failures, 185 modules rejected.Best stack that merges cleanly as-is: seven PRs, in this order: #306, #592, #309, #571, #573, #576, #585.
Conflicts as-is (these need a rebase, or a pick between overlapping pairs):
Per-PR numbers are in comments on each PR. This is CPU-side translation and validation only; in-game runs on an RTX 4070 are in progress.
AI-assisted.
@fuzeofficlal on GitHub · 2026-11-24 03:25 UTC · original · edited 2026-11-24 06:52 UTC
I checked the DXIL writer on
d2a4baewith signatures from an SDK-compiled synthetic mesh shader. Both output maxima were 256. The case with 27 vertex scalars and 5 primitive scalars passeddxil.dll1.8.2502 at exactly 32,768 bytes. Adding one primitive scalar reproduced the reported output-size error at 33,792 bytes. The passing case includes partially filled signature rows, so row padding did not inflate its declared scalar count.For one of the failing modules, could you share just the declared maximum vertex and primitive counts and the total scalar count of each output signature, before and after translation? Four integers per side are enough to see whether the emitted declaration grew or the source already exceeds the DXIL limit.
Follow-up on the proposed declaration cap. I compiled two original 128-thread mesh shaders with 19 vertex signature elements, containing 67 and 76 float components respectively and no per-primitive attributes. Both always call
SetMeshOutputCounts(3, 1). Windows SDK DXIL 1.8.2502.11 accepts declaredMaxVertices=96for both and rejects97and107with the same 32 KiB error.The declared maximum is rounded up to a multiple of 32, so 97 through 107 all budget 128 vertices. For these two output widths the declaration needs to be at most 96. This synthetic check establishes the cap threshold. Applying it to a recovered program still requires proving its allocation and export indices fit. D3D12 output-size rule
@Catskan on GitHub · 2026-11-24 07:37 UTC · original
RX 9070 XT (RDNA4): the driver creates every emitted pipeline, compute included (0 refused)
Setup: RX 9070 XT 16 GB, driver 32.0.32029.2010, Windows 11 Pro 26200 (SM 6.6 without the Agility exports),
maind2a4bae, release build,dxil.dll1.9.2602.17 (Windows SDK 10.0.26100). This is an offline run; I did not run the title. I used the same 26,503 DXBC containers from my own 1.0.2.1 copy, passed as 54 files of 500 containers, withvictory translate --validate --pipelines --jobs 8.The 9070 XT is not DXGI adapter 0 in every session on this machine, so I reran one of the 54 files in the same session type and watched the process's GPU memory counters. It allocates only on the 9070 XT's LUID.
Emitted counts are the deduplicated totals of one whole-corpus
--validaterun. None of the 54 per-file runs has apipeline:failure line, and all 54 exit with 0, without a crash or a timeout.dxil.dllrejects 185 modules (12,172 + 1,670 + 8,129 validated), the same count as iurysf's run with the same 1.9 dll. The driver still creates pipelines for the 23 compute modules among them.On NVIDIA, the opening post counts 321 of 1,685 compute pipelines refused with
E_INVALIDARG(RTX 4080,97c78d1, dll 1.8.2502), and the RTX 4070 Ti count in #71 is the same on35b054e. The commits and validators differ, but 0 refusals here fits RDNA's 64-lane waves, so the 321 refusals look specific to 32-lane hosts (#468, #578, the #223/#233 stack). I only checked pipeline creation, not whether those wave64 programs compute correctly on RDNA.AI-assisted (Claude). I ran the translation and checked the counts myself.
@iurysf on GitHub · 2026-11-24 07:48 UTC · original
Driver-side check of the seven-PR stack above (#306, #592, #309, #571, #573, #576, #585), since passing the validator doesn't guarantee the driver accepts a module. I ran
victory translate --list --pipelineson an RTX 4070 (driver 32.0.16.2101, 32-lane waves) over all 26,096 programs:d2a4baeWaveSize(64)compute that the stack now translates. They are refused for the same reason as main's 322, a host without 64-lane waves (see #233 and #578). Another 6 of main's refusals are no longer refused.AI-assisted.
@YouKnowWh on GitHub · 2026-11-24 08:59 UTC · original
RTX 5070 Ti follow-up for three compute containers used in the 1.0.2.1 world-loading path. I checked DXIL validation and actual D3D12 compute PSO creation separately. The hardware reports a 32–32 lane range.
d2a4baewith #322, #643, #193/#704), original emitterThe last two rows use a local diagnostic switch on the same executable. The old integration emitted WaveSize=64 for all three. I used the Windows DXIL validator and the hardware adapter for the PSO tests. The #439 line is a different code base from the first two rows, so the cross-branch comparison does not isolate a single wave-lowering commit.
In a separate story-mode run of #439 plus the #306 compute-derivative changes, all three host PSOs were created and first-bound. Instrumentation immediately after the host command-list calls recorded:
These are totals across the run, stopped after 16 world-stage presents. Recording ExecuteIndirect does not establish a nonzero GPU argument count. Output correctness of these three passes and complete scene rendering remain unverified. This is independent hardware confirmation for #201, #306 and #439.
AI disclosure: Codex integrated the public changes, ran the local tests on my machine, analyzed the logs, and wrote this report at my request.
@BaggyALPHA on GitHub · 2026-11-24 16:05 UTC · original · edited 2026-11-24 16:11 UTC
I checked the shaders selected by the title in a Series S WARP startup and early story-load run on the #211 head
af9a911, with #197 for startup input. A local diagnostic matched title first-bind events to the emitted DXIL in VIctory's cache. I validated those cached modules after exit with Windows SDKdxil.dll1.8.2502.11.Offline mesh follow-up. I checked the one-shader explanation above across the full output-size failure group at the closed #459 revision
dc838d6. The local mesh-only probe logged the existing budget calculation before and after the clamp and paired it with the Windows SDK 1.8.2502.11 validator result. The probe preserved the emitted DXIL.Of 8,191 emitted mesh modules, 8,129 validated, 53 failed the 32 KiB output-size rule, and 9 failed other rules. All 53 of 53 output-size failures had 128 threads and declared maxima of 128 vertices and 128 primitives both before and after the clamp. Their translated signatures had 65–71 vertex scalars and no per-primitive scalars, giving calculated budgets of 33,280–36,352 bytes. The clamp ran in all 53 cases.
With those signatures and rounding to multiples of 32, 96 is the greatest declared vertex maximum that fits. The probe did not establish whether lowering the maximum preserves the shaders' outputs. This offline run did not test runtime rendering.
AI-assisted test execution and write-up (OpenAI Codex).
@Marvisak on GitHub · 2026-11-25 01:49 UTC · original · edited 2026-11-25 06:55 UTC
Automated triage for the maintainers.
Thanks for the rerun on
940d32f. Where each group stands now:ms_ioinnative.rsreads both), so the product exceeds the host's 32,768-byte limit without anything of ours to trim: it needs an emulation choice (split dispatch, or the compute fallback discussed in #1612 and PR #961), which is for the maintainers. The open PRs are #1385 for mesh and #1948 / #1065 for compute.The "Flags must match usage" failures (867 vertex programs across the pack) are a regression from
cd94d35, andmainconfirms it. Incrates/victory-shader/src/emit/shader.rs,Shader::finishdeclares the view-writes UAV (used bymark_view_writeinemit/lower.rs) in vertex programs. Theflagsmodule has noUAVsAtEveryStagebit (1 << 16), and SFI0 does not set its feature bit either. At least one affected vertex program is selected in real runs (latest comment), so this is not only a census finding. This regression is tracked in #1973 (oldest) and #1987. Open PRs #2016 and #1989 already carry the same change as the diff here, so review can continue there; no new PR is needed for it.Generated by Claude Code
@YouKnowWh on GitHub · 2026-11-25 02:41 UTC · original
I reran the census on the same local 1.0.2.1 shader pack at both
97c78d1and940d32f69b22265690a0b5a15d6ded572ba33bafusingvictory translate shaders.rpf --validate --list --jobs 8, validator DLL file version 1.8.2502.11. Both scanned 26,503 containers (614 duplicates skipped) and reported 26,084 programs translated. The old revision reproduced all five original counts exactly.940d32fThe three groups you asked about therefore have 93/109 fully validating and 16/109 with a different first error. None of the 185 historical cases was unmatched. The CLI lists the first validator diagnostic per module; the changed diagnostic alone does not prove every underlying signature problem is gone.
Across the whole pack on
940d32f, 25,591 modules emitted DXIL and 23,918 validated. The 1,673 first-error outcomes were 867 flags/usage, 735 compute stage, and 71 mesh output size. The old build emitted 22,148 modules. This is a different emitted population; the difference in total failed validations is not by itself a regression count. This run did not create host pipelines, launch the game, or measure in-game usage.Cause and verified fix for the remaining 16
All 16 are vertex shaders. Their full validator reports all show exactly one missing module flag: actual minus declared is bit 16 (
0x10000, DXILUAVsAtEveryStage), with no surplus bits. Tracing resource emission on each shader gave the same result: no root UAV slots, no title-memory dirty bitmap, and a declared buffer-view writes bitmap. This is the translator-generated raw UAV used bymark_view_write.With the emitted validator version 1.6, a declared UAV outside the pixel and compute stages requires that module flag. My candidate sets it when emitting that UAV resource list, and mirrors it in SFI0 as
ShaderFeatureInfo_UAVsAtEveryStage(0x4). No signature packing, resource binding, or shader instructions were changed.The 16/16 now pass full DXIL validation. This resolves the old signature question for these exact modules. Across the full pack all 867 former flags failures (all VS) now validate: 23,918 → 24,785 of the same 25,591 emitted modules. A comparison by original DXIL-part identity and shader stage showed no other validation outcome changes. The remaining 735 stage-incompatible and 71 mesh-size failures are unchanged. The synthetic resource/feature regression test also passes. These results are offline and do not measure runtime output or PSO creation.
AI-assisted offline rerun and comparison. No game files attached.
Candidate patch and synthetic regression test (against
940d32f)@fiestorra on GitHub · 2026-11-25 03:43 UTC · original
The mesh refusal is arithmetic, not a flag: 128 vertices × 264 bytes = 33,792, and DXIL's mesh output budget is 32,768
I spent this round on the third class in the census (
For shader 'main', vertex plus primitive output size is greater than 32768, 71 programs, every one a mesh shader), and the answer is that it cannot be fixed the way the last two were. The numbers, from one of the 71 dumped withVICTORY_EMIT_DUMPand read withdxc -dumpbin:The validator's budget is on the product, not on the signature:
Three per cent over. The same signature fits with 124 vertices or fewer, and 128 vertices fit with 125 bytes or fewer per vertex (31 components). So the title asks its console mesh shaders for a combination that the host's mesh pipeline does not allow, and no shader flag changes that.
What that means for whoever picks this up — I would not want to start any of these without a decision, which is why I stopped at the measurement:
max_verticesto 124 and let the extra four vertices be emitted by a second dispatch — same problem as 2, smaller number;Of the four, only the first is a candidate for a small change, and it depends on a fact nobody has written down yet: whether our emitted signature for these mesh shaders has elements the console's does not. That is the next measurement, and it is cheap — the same dump, compared against the title's signature bytes.
For the record, the other classes I looked at this round and did not touch: 195 programs refused for "an address in an SGPR that is no root parameter" (address resolution for computed bases, a feature), 40 for "a register joining a lane mask and data, read as data" and 36 for "a descriptor read only as data" (corners of the structurisation). None is a one-line answer either, and I would rather leave four honest measurements than four half-fixes.
No game data is involved: signature element counts, thread-group sizes and byte arithmetic.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-25 03:44 UTC · original
Correction to what I said one comment ago: the 264 bytes per vertex are the title's own signature, so there is nothing of ours to trim
I proposed that the first thing to check was whether our emitted signature carries elements the console's does not. It does not, and here is the measurement rather than the assumption:
native.rs::ms_iobuilds the mesh stage from the console's own stage data, and the outputs come fromvs_outputs(data)— the same list the emitter writes out.MS_INFO+2andMS_INFO+4aremax_verticesandmax_primitives, read straight from the title's blob: the128, 128in the module is what the title declares, not a default of ours.Which makes this a capability gap between the console's mesh shader and D3D12's, not a bug in the translation: the title asks for an output budget 3% larger than the host allows, and no flag, signature trim or
max_verticesadjustment is faithful — every one of those changes what the shader may produce.The honest options are therefore the emulation ones, and they are the maintainer's call, not a pull request I should open unilaterally:
What I would not do is quietly lower
max_verticesto 124 or drop signature elements to fit: that passes the validator and changes what the shader outputs, which is the kind of green check this repository has been careful to avoid.For the record, of the four classes I have measured this week, this is the only one that is not a defect at all — the other three (195 SGPR addresses, 40 lane-mask-as-data, 36 descriptor-as-data) are features we have not written yet.
No game data is involved: counts, offsets and the byte arithmetic.
Written with an AI assistant.
@YouKnowWh on GitHub · 2026-11-25 05:02 UTC · original
Follow-up on whether any of the 867 VS flag failures are selected during a real run. Matching the full input containers to the census and their BLAKE3 prefixes to our archived Windows RTX 5070 Ti logs gives at least 9 distinct first-bound VS hashes in the union. The fxceless runs at
31714deband7b0f736matched 8 and 9 respectively; an older local integration matched 6. These are runtime selections on those builds, not a patched-versus-unpatched game A/B on940d32f.One stable pair for capture filtering: VS
2634f1e308bc9ae1(VS_TransformPreSkin_VfxVBuffer_c6448ed4_Wrapped) + PS3dc5a8831849e058(PS_VfxVBuffer_c6448ed4_Wrapped). The two first-bind records have the same title pipeline address and frame within each of the three runs (frames 1615, 1566 and 1645 respectively); all three also log successful host creation of that shader pair.Offline on
940d32fand with the candidate flags fix, the VS changes from validation failure to pass. DXC dumpbin shows identical function bodies; only the entry flags and corresponding SFI0 feature differ. The PS blobs are byte-identical. Using the two exact saved VS blobs and that same PS in one WARP graphics-PSO harness, both PSOs created. Consequently this is a concrete runtime-selected validation case, not evidence that the metadata fix restores pixels or unblocks a draw. We have no matching draw-completion readback for this pair. No new game run and no game assets attached.AI-assisted analysis.
@Venom2054 on GitHub · 2026-11-26 09:03 UTC · original
Retested the compute implicit-derivative case on
63bcca43with Windows SDKdxil.dll1.9.2602.17 and an RTX 5070 Ti. All fiveCS_TraceShadowRaysvariants emitted DXIL and failed validation on that revision. I ported just the compute metadata change from wbkepler’s #306 (dx.valver1.8 andPSVRuntimeInfo3) for this test.07c93bfb77fecebb)I adapted the public synthetic example from #306 to store the sampled value to a raw UAV. With the store, implicit samples at
[4,8,1]and[8,8,1]fail validation before the metadata change and pass validation and PSO creation after it. Without the store both examples already passed validation on unmodified63bcca43. A[3,3,1]implicit sample with the store still fails after the change for the expected thread-group shape. An explicit level-zero control emitted byte-identical DXIL before and after.These are offline validation and PSO-creation results. The five shadow variants were not dispatched in this test.