ReflectionInfo.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Runtime.InteropServices;
  2. namespace Veldrid.SPIRV
  3. {
  4. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  5. internal struct ReflectionInfo
  6. {
  7. public InteropArray VertexElements; // InteropArray<NativeVertexElementDescription>
  8. public InteropArray ResourceLayouts; // InteropArray<NativeResourceLayoutDescription>
  9. }
  10. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  11. internal struct NativeVertexElementDescription
  12. {
  13. public InteropArray Name; // InteropArray<byte>
  14. public VertexElementSemantic Semantic;
  15. public VertexElementFormat Format;
  16. public uint Offset;
  17. }
  18. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  19. internal struct NativeResourceLayoutDescription
  20. {
  21. public InteropArray ResourceElements; // InteropArray<NativeResourceElementDescription>
  22. }
  23. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  24. internal struct NativeResourceElementDescription
  25. {
  26. public InteropArray Name; // InteropArray<byte>
  27. public ResourceKind Kind;
  28. public ShaderStages Stages;
  29. public ResourceLayoutElementOptions Options;
  30. }
  31. }