sample_cmp2.hlsl 666 B

12345678910111213141516171819202122
  1. // RUN: %fxc /T ps_5_0 %s /Fo %t.dxbc
  2. // RUN: %dxbc2dxil %t.dxbc /emit-llvm /o %t.ll.converted
  3. // RUN: fc %b.ref %t.ll.converted
  4. SamplerComparisonState samp1 : register(s5);
  5. Texture2D<float4> text1 : register(t3);
  6. float4 main(float2 a : A) : SV_Target
  7. {
  8. uint status;
  9. uint cmp = a.y + a.x;
  10. float4 r = 0;
  11. r += text1.SampleCmpLevelZero(samp1, a, cmp);
  12. r += text1.SampleCmpLevelZero(samp1, a, cmp, uint2(-5, 7));
  13. r += text1.SampleCmpLevelZero(samp1, a, cmp, uint2(-4, 1));
  14. r += text1.SampleCmpLevelZero(samp1, a, cmp, uint2(-3, 2), status); r += status;
  15. r += text1.SampleCmpLevelZero(samp1, a, cmp, uint2(-3, 2), status); r += status;
  16. return r;
  17. }