vkd3d-shader/hlsl: Properly check argument counts and offset dimensions in texture methods.
The objective of this patch series is to converge to the correct argument count checks and offset parameter dimensions when parsing the Load, Sample, SampleLevel, Gather (and variants) methods, for the different texture types.
I made the following table to summarize the expected arguments and their dimensions:
Getting these required some extensive trial-and-error, because:
- Official documentation about the methods is spread in different pages and in a somewhat inconsistent manner.
- Automatic vector truncation, scalar broadcasting, and type conversion, make shaders that pass inexact types compile.
- clamp and status arguments (for tiled resources) are not present in fxc 9, and yet, they are part of ps_5_0 and vs_5_0.
- Some methods (Load() in particular) require the mipmap level as part of the location parameter (except for Multi-Sampled textures), while other don't.
For implementing new methods I recommend passing an invalid parameter count to them in fxc 10, so that it lists available overloads. And to do this for each texture type.