CmGpuParamDesc.h 1004 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #include "CmPrerequisites.h"
  3. #include "CmCommonEnums.h"
  4. #include "CmGpuProgramParams.h" // TODO - Only here because I need some type definitions (GpuConstantType) - Remove later
  5. namespace CamelotFramework
  6. {
  7. struct GpuParamDataDesc
  8. {
  9. String name;
  10. UINT32 elementSize; // Multiple of 4 bytes
  11. UINT32 arraySize;
  12. UINT32 arrayElementStride; // Multiple of 4 bytes
  13. GpuParamDataType type;
  14. UINT32 paramBlockSlot;
  15. UINT32 gpuMemOffset;
  16. UINT32 cpuMemOffset;
  17. };
  18. struct GpuParamObjectDesc
  19. {
  20. String name;
  21. GpuParamObjectType type;
  22. UINT32 slot;
  23. };
  24. struct GpuParamBlockDesc
  25. {
  26. String name;
  27. UINT32 slot;
  28. UINT32 blockSize;
  29. bool isShareable;
  30. };
  31. struct GpuParamDesc
  32. {
  33. Map<String, GpuParamBlockDesc>::type paramBlocks;
  34. Map<String, GpuParamDataDesc>::type params;
  35. Map<String, GpuParamObjectDesc>::type samplers;
  36. Map<String, GpuParamObjectDesc>::type textures;
  37. Map<String, GpuParamObjectDesc>::type buffers;
  38. };
  39. }