register_args_lib.hlsl 540 B

1234567891011121314151617
  1. // RUN: %dxc -T lib_6_3 %s | FileCheck %s
  2. // Test that auto-binding-space affects only resources with no
  3. // explicit register nor space binding.
  4. // CHECK: buf_a texture f32 buf T0t4294967295,space4294967295 1
  5. // CHECK: buf_b texture f32 buf T1 t1 1
  6. // CHECK: buf_c texture f32 buf T2t4294967295,space2 1
  7. // CHECK: buf_d texture f32 buf T3 t2,space3 1
  8. Buffer buf_a;
  9. Buffer buf_b : register(t1);
  10. Buffer buf_c : register(space2);
  11. Buffer buf_d : register(t2,space3);
  12. export float foo() {
  13. return buf_a[0] + buf_b[0] + buf_c[0] + buf_d[0];
  14. }