Skip to content

Binding sets and input layouts

Frostbite (skate.)ShadersApplies toskate.

Binding sets connect hashed material parameters to constant-buffer offsets and resource indexes. Pass bindings describe pass-supplied parameters; permutation shared data names these sets. Observed

Resource metadata contains payload size, relocation size and resource id. A binding set has the following little-endian header, followed by 64-byte groups at 0x20. Observed

Binding-set header32 bytes63% known
ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x04u32group countObserved
0x44u32 = 32group table offsetObserved
0x88u64unknownUnknownZero in measured records.
0x108u64resource idObserved
0x184u32unknownUnknownOne in measured records.
0x1C4u32parameter countObserved

Pass-binding headers instead contain four u32 words (version 1 or 0x101, group count, group offset 0x20, zero), then the u64 resource id and a zero u64. Observed

Binding group64 bytes72% known
ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x08u64group name hashObserved
0x84u32buffer size or resource countObserved
0xC4bytesunknown flagsUnknown
0x102u16parameter countObserved
0x126u16[3]unknown wordsUnknown
0x188u64unknownUnknownZero in measured records.
0x208u64all-parameters offsetObserved
0x288u64group-parameters offsetObserved
0x308u64group-entry table offsetObserved
0x388u64end-of-tables offsetObserved

Parameters use the sixteen-byte name/type/count/extra prefix of depot parameters. Entries are eight bytes: u32 byte_offset_or_resource_index, u16 marker, u16 kind. Constant-buffer entries have marker 0xffff and kind equal to four times the parameter byte size; buffer size rounds up to sixteen bytes. Other marker/kind meanings remain unresolved. Observed

The register census covers every space-zero declaration in every program of the game configuration’s 2,931 raster permutations. The table reports exhaustive agreement counts for candidate sources, including mismatches; it does not establish the candidate mapping where a declaration fails to match. Proven · all game-configuration raster programs

Register Candidate source Measurement Confidence
b0 Set 1, group 0 Matching buffer size in 4,069 of 4,613 declarations Proven · exhaustive agreement count
b1 Set 0, group 0 Matching size in 2,867 of 2,887 Proven · exhaustive agreement count
b4 Pass binding, group 0 Matching size in 5,707 of 5,707 Proven · exhaustive agreement count
t0–t31 Set 1, group 1, index equal to register Part of combined resource result Observed
t32–t63 Set 0, group 1, index register minus 32 Part of combined resource result Observed
t64 and above Pass binding, group 1, index register minus 64 Combined result: 31,589 of 31,639 resource declarations have entries Proven · exhaustive agreement count

Across all those programs, 1,866 b2, 38 b3 and 4,277 sampler declarations have no assigned source under this binding-set rule. Proven · all game-configuration raster programs

A size match does not independently name a buffer’s semantic role. Inferred

Input-layout header32 bytes63% known
ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x04u32element countObserved
0x48u64element table pointerObserved0x20 in measured resources
0xC8u64usage table pointerObserved
0x1412bytesunknownUnknownZero in measured resources.
Input-layout element20 bytes100% known
ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x04u32semantic indexObserved
0x44u32input slotObserved
0x84u32byte offsetObserved
0xC4u32slot classObserved
0x104u32format wordObservedByte 1 is DXGI format; byte 0 has no established meaning.

One usage byte follows per element; the element and usage arrays are separately sixteen-byte aligned. Relocations identify pointer slots 4 and 0xc. Observed

The exhaustive input comparison covers every vertex program of the game configuration’s 2,931 raster permutations, with no unmapped inputs. Of their 15,383 inputs, 15,336 match by name/index and width, six by elimination and width, and 41 by name with shader reads wider than the stored format. Proven · all game-configuration vertex inputs

A raster permutation’s shared data (RasterPermutationSharedData, type 0x250047b2) holds the program’s packed fixed-function state. Thirteen distinct values occur in a fifteen-bundle sample, with payload sizes 148–300 bytes. Observed The bit layouts are those of the executable’s RC2 state printers (rasterizer Skate+0x4130300, depth-stencil +0x4130430, blend +0x4130550), and the decoded values agree with the pipeline descriptions the game hands to D3D12 at run time. Observed

Raster shared-state fieldsvariable29% known

Offsets in the payload.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x784f32slope-scaled depth biasObserved
0x7C2i16depth biasObserved
0x7E1u8forced sample countObserved
0x7F1bitsrasterizer bitsObservedb0 fill mode; b1-2 cull None/Front/Back; b3 front counter-clockwise; b4 depth clip
0x801bitsdepth-stencil bitsObservedb0 depth test; b1 depth write; b2 stencil test; b3-5 depth function Never, Less, Equal, LessEqual, Greater, NotEqual, GreaterEqual, Always
0x811u8stencil read maskObserved
0x821u8stencil write maskObserved
0x871bitsblend bitsObserved
0x8C40u8[8][5]render-target blend recordsObservedFinal byte 0x0f is the All colour-write mask

Most render-target records are 02 00 01 00 0f; two state values use 03 05 01 05 0f for target zero. Observed The per-byte blend factor mapping inside a record is not separately anchored. Inferred

Over all 3,619 dingolevel_root programs the states fall into a few classes. Depth is reversed: opaque programs test GreaterEqual and write depth with stencil write mask 0xfe and no bias; G-buffer programs after the depth prepass test Equal without writing; shadow-depth programs test GreaterEqual and write with depth bias −10 and slope −4. Every decal and transparent-decal program tests GreaterEqual without writing depth, tests stencil with read mask 0x08 (or 0xe0), uses depth bias 200 and slope-scaled bias 0.1, and blends premultiplied into render targets 0–3. Observed Their consequence for overlays is described under decals.

A capture of the 24,218 pipeline descriptions the running game creates shows the main depth buffer as DXGI_FORMAT_D32_FLOAT_S8X24_UINT, DepthBiasClamp 0 on every pipeline, decals with stencil read 0x08 and write 0, opaque with read 0x08 and write 0xfe, and shadows with bias −10/−4 on D16 targets and −1000/−4 on D32 targets. Observed

What explains the register exceptions and the remaining render-state bytes?

The b0/b1 mismatches, fifty resource exceptions and unassigned buffers/samplers require additional binding sources or a narrower rule. The shared-state bytes outside the fields above have no established decode. Unknown