vkd3d-shader/hlsl: Broaden resources support v2 (PART 1).
First part of v2 of !27 (closed), which aims to:
- Allow allocation of variables of complex types that contain both numerics and objects across multiple register sets (regsets).
- Support the tex2D and tex3D intrinsics, inferring generic samplers dimension from usage, writing sampler declarations, and writing sample instructions.
- Support for arrays of resources for both SM1 and SM4 (not to be confused with the resource-arrays of SM 5.1, which can have non-constant indexes).
- Support for resources declared within structs.
- Support for synthetic combined samplers for SM1 and synthetic separated samplers for SM4, considering that they can be arrays or members of structs.
- Imitate the way the native compiler assigns the register indexes of the resources on allocation, which proved to be the most difficult thing.
- Support for object components within complex input parameters.
- Small fixes to corner cases.
This part consists on parsing the tex2D()
and tex3D()
intrinsics and beginning to support the allocation of variables across multiple regsets.
The whole series, is on my master6 branch.