local_resource3.hlsl 557 B

12345678910111213141516171819202122232425
  1. // RUN: %dxc -E main -Od -T ps_6_0 %s | FileCheck %s
  2. // CHECK: local resource not guaranteed to map to unique global resource
  3. float4 Tex2D(Texture2D<float4> t,
  4. SamplerState s, float2 c) {
  5. return t.Sample(s, c);
  6. }
  7. float4 test(Texture2D<float4> t,
  8. SamplerState s, float2 c) {
  9. float4 r = Tex2D(t, s, c);
  10. r += Tex2D(t, s, c+1);
  11. r += Tex2D(t, s, c+2);
  12. r += Tex2D(t, s, c+3);
  13. r += Tex2D(t, s, c+4);
  14. return r;
  15. }
  16. static Texture2D<float4> g_texture;
  17. SamplerState g_ss;
  18. float4 main(float2 c: T) : SV_Target {
  19. return test(g_texture, g_ss, c);
  20. }