Giovanni Mascellani (@giomasce) commented about tests/object-parameters.shader_test:
+Texture2D tex;
+struct apple +{
- sampler unused0; // must reserve s0
- sampler sam[3]; // must reserve to s1-s2
- sampler unused1; // doesn't reserve
+};
+float4 main(struct apple input, sampler samp) : sv_target +{
- // samp must reserve s3
- return tex.Sample(samp, float2(0, 0))
+ tex.Sample(input.sam[1], float2(0, 0));
+}
This test doesn't check that the appropriate samplers are picked anyway, since they are all identical, does it? Maybe you can use bigger textures and different samplers to ensure the result changes if the wrong sampler is used.