On Fri, Jul 22, 2022 at 8:28 PM Henri Verbeet hverbeet@gmail.com wrote:
I'm not entirely sure we're decoding these correctly. The format is certainly specified in the HLSL; it would seem surprising (though not inconceivable) that the information just gets dropped when generating the bytecode.
It appears from the spec we are not missing anything. The obvious way to encode a format component count is in the dword which specifies the type of each component. Those beyond the last component could be D3D11_SB_RETURN_TYPE_UNUSED, but instead they all have the same type. There's no other place to store it. The output from /dumpbin has four components for the declaration too, and the load instruction specifies a vec4 load. Looks like the actual format component count is left out.