empty-struct-interface.vs.hlsl2spv 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Run: %dxc -T vs_6_0 -E main
  2. // There is no interface variable for VSIn or VSOut empty structs (See OpEntryPoint below).
  3. struct VSIn {};
  4. struct VSOut {};
  5. VSOut main(VSIn input)
  6. {
  7. VSOut result;
  8. return result;
  9. }
  10. // CHECK-WHOLE-SPIR-V:
  11. // OpCapability Shader
  12. // OpMemoryModel Logical GLSL450
  13. // OpEntryPoint Vertex %main "main"
  14. // OpSource HLSL 600
  15. // OpName %bb_entry "bb.entry"
  16. // OpName %src_main "src.main"
  17. // OpName %main "main"
  18. // OpName %VSIn "VSIn"
  19. // OpName %param_var_input "param.var.input"
  20. // OpName %VSOut "VSOut"
  21. // OpName %input "input"
  22. // OpName %result "result"
  23. // %void = OpTypeVoid
  24. // %3 = OpTypeFunction %void
  25. // %VSIn = OpTypeStruct
  26. // %_ptr_Function_VSIn = OpTypePointer Function %VSIn
  27. // %VSOut = OpTypeStruct
  28. // %12 = OpTypeFunction %VSOut %_ptr_Function_VSIn
  29. // %_ptr_Function_VSOut = OpTypePointer Function %VSOut
  30. // %main = OpFunction %void None %3
  31. // %5 = OpLabel
  32. // %param_var_input = OpVariable %_ptr_Function_VSIn Function
  33. // %9 = OpCompositeConstruct %VSIn
  34. // %11 = OpFunctionCall %VSOut %src_main %param_var_input
  35. // OpReturn
  36. // OpFunctionEnd
  37. // %src_main = OpFunction %VSOut None %12
  38. // %input = OpFunctionParameter %_ptr_Function_VSIn
  39. // %bb_entry = OpLabel
  40. // %result = OpVariable %_ptr_Function_VSOut Function
  41. // %17 = OpLoad %VSOut %result
  42. // OpReturnValue %17
  43. // OpFunctionEnd