precise1.hlsl 338 B

12345678910111213141516
  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. SamplerState s;
  5. Texture2D<float4> t;
  6. float4 g1, g2, g3;
  7. float4 main(float4 coord : COORD) : SV_Target
  8. {
  9. float4 a = t.Sample(s, coord.xy);
  10. precise float4 b = a * g1;
  11. b = mad(b, g2, g3);
  12. return -b;
  13. }