static_init_inline.hlsl 504 B

12345678910111213141516
  1. // RUN: %dxc -E main -T ps_6_0 %s -Zi -Od | FileCheck %s
  2. // Make sure when there is non-trivial global variable initialization, the
  3. // inlined initialization instructions have "inlinedAt" property
  4. // Exclude quoted source file (see readme)
  5. // CHECK-LABEL: {{!"[^"]*\\0A[^"]*"}}
  6. // CHECK: !DILocation(line: {{[0-9]+}}, column: {{[0-9]+}}, scope: !{{[0-9]+}}, inlinedAt:
  7. static float4 my_value = float4(1,2,3,4);
  8. static float4 my_value2 = my_value*2;
  9. float4 main() : SV_Target {
  10. return my_value2;
  11. }