Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef SHADER_VCS_VERSION_H
  7. #define SHADER_VCS_VERSION_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. // 1 = hl2 shipped
  12. // 2 = compressed with diffs version (lostcoast)
  13. // 3 = compressed with bzip
  14. // 4 = v2 + crc32
  15. // 5 = v3 + crc32
  16. // 6 = v5 + duplicate static combo records
  17. #define SHADER_VCS_VERSION_NUMBER 6
  18. #define MAX_SHADER_UNPACKED_BLOCK_SIZE (1<<17)
  19. #define MAX_SHADER_PACKED_SIZE (1+MAX_SHADER_UNPACKED_BLOCK_SIZE)
  20. #pragma pack(1)
  21. struct ShaderHeader_t
  22. {
  23. int32 m_nVersion;
  24. int32 m_nTotalCombos;
  25. int32 m_nDynamicCombos;
  26. uint32 m_nFlags;
  27. uint32 m_nCentroidMask;
  28. uint32 m_nNumStaticCombos; // includes sentinal key
  29. uint32 m_nSourceCRC32; // NOTE: If you move this, update copyshaders.pl, *_prep.pl, updateshaders.pl
  30. };
  31. #pragma pack()
  32. #pragma pack(1)
  33. struct ShaderHeader_t_v4 // still used for assembly shaders
  34. {
  35. int32 m_nVersion;
  36. int32 m_nTotalCombos;
  37. int32 m_nDynamicCombos;
  38. uint32 m_nFlags;
  39. uint32 m_nCentroidMask;
  40. uint32 m_nDiffReferenceSize;
  41. uint32 m_nSourceCRC32; // NOTE: If you move this, update copyshaders.pl, *_prep.pl, updateshaders.pl
  42. };
  43. #pragma pack()
  44. // for old format files
  45. struct ShaderDictionaryEntry_t
  46. {
  47. int m_Offset;
  48. int m_Size;
  49. };
  50. // record for one static combo
  51. struct StaticComboRecord_t
  52. {
  53. uint32 m_nStaticComboID;
  54. uint32 m_nFileOffset;
  55. };
  56. struct StaticComboAliasRecord_t // for duplicate static combos
  57. {
  58. uint32 m_nStaticComboID; // this combo
  59. uint32 m_nSourceStaticCombo; // the combo it is the same as
  60. };
  61. #endif // SHADER_VCS_VERSION_H