Skip to main content

Module statistics

Module statistics 

Source
Expand description

The STAT part of a Shader Model 4 or 5 container: the compiler’s counts of what the program does, as 32-bit words.

fxc writes 37 words for a Shader Model 5 program and 29 for Shader Model 4.0 and 4.1 ones (148 and 116 bytes). Most words this reader names are fields of D3D11_SHADER_DESC that the compiler’s own reflection reports for the same container, checked by calling D3DReflect (d3dcompiler_47) on every container that has the part: the 432 Shader Model 5 programs of Sekiro (37 words), the 16 Shader Model 4.0 programs of a Unity player (29 words) and 21 programs compiled with fxc from small sources (6 with 29 words and 15 with 37). A name is a word that equalled the field in every one of those containers and was not zero in all of them; word 20 is not a field of that structure and is named from the decoder’s count (below). The other words are kept as stored (Statistics::words): 2, 9 to 13, 17 and 22 to 36 are zero in all 448 of Sekiro’s and the Unity player’s, and words 19 and 21 are nonzero but no count of the decoder’s instructions that was tried (mov; the conversions) equals them.

In a DXIL container the STAT part is a bitcode module, not counters; statistics refuses it.

Structs§

Statistics
The counters of a STAT part, as stored.

Functions§

statistics
The STAT part of a Shader Model 4 or 5 container: None for a container without one (Riders Republic’s have none; Sekiro’s have it in all 432, 16 of the Unity player’s 4,854 do). Refuses a container parts refuses, a DXIL container (its STAT part is a bitcode module) and a part whose size is not a multiple of four bytes.