cbuffer_fn.hlsl 482 B

12345678910111213141516171819202122
  1. // RUN: %dxc -E VSMain -T vs_6_0 %s | FileCheck %s
  2. // CHECK: call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(
  3. cbuffer C {
  4. float4 f4;
  5. float4 get_f4() { return f4; }
  6. };
  7. struct PSInput {
  8. float4 position : SV_POSITION;
  9. float4 color : COLOR;
  10. };
  11. PSInput VSMain(float4 position: POSITION, float4 color: COLOR) {
  12. float aspect = 320.0 / 200.0;
  13. PSInput result;
  14. result.position = position;
  15. result.position.y *= aspect;
  16. result.color = color * get_f4();
  17. return result;
  18. }