Francisco Casas (@fcasas) commented about libs/vkd3d-shader/hlsl.y:
{ return add_sample_lod_method_call(ctx, instrs, object, name, params, loc); }
- else if (!strcmp(name, "SampleGrad")
&& object_type->sampler_dim != HLSL_SAMPLER_DIM_2DMS
&& object_type->sampler_dim != HLSL_SAMPLER_DIM_2DMSARRAY)
SampleGrad is also not supported for TextureCube, TextureCubeArray.
It is probably better to use positive logic here and numerate all the allowed values for sampler_dim.