vkd3d-shader/hlsl: Add support for SampleGrad() method
This one's marked as a draft, as there seems to be a blocker with the method parameters.
The first commit totally works, if the ddx/ddy parameters are literals - they do not work when passing a variable of any kind. The test comes from tests/d3d12.c, so I'm mostly just trying to migrate that to the HLSL test suite, but it currently hits an assert before we get to the resource load (which does eventually work) and I'm not sure what's causing it:
vkd3d-compiler: libs/vkd3d-shader/tpf.c:3190: sm4_register_from_node: Assertion `instr->reg.allocated' failed.
Seems like it's surprised when we try to load from the constant buffer maybe? Fixed!
Edited by Ethan Lee