optForNoOpt3.hlsl 526 B

12345678910111213141516171819
  1. // RUN: %dxc -Zi -E main -Od -T ps_6_0 %s | FileCheck %s -check-prefix=CHK_DB
  2. // RUN: %dxc -E main -Od -T ps_6_0 %s | FileCheck %s -check-prefix=CHK_NODB
  3. // CHK_DB: 16:7: error: Offsets to texture access operations must be immediate values
  4. // CHK_NODB: Offsets to texture access operations must be immediate values.
  5. SamplerState samp1 : register(s5);
  6. Texture2D<float4> text1 : register(t3);
  7. int x;
  8. int y;
  9. float4 main(float2 a : A) : SV_Target {
  10. float4 r = 0;
  11. r = text1.Sample(samp1, a, int2(x+y,x-y));
  12. return r;
  13. }