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.

110 lines
2.3 KiB

  1. #include "shaderlib/cshader.h"
  2. class downsample_nohdr_ps20b_Static_Index
  3. {
  4. private:
  5. int m_nSRGB_ADAPTER;
  6. #ifdef _DEBUG
  7. bool m_bSRGB_ADAPTER;
  8. #endif
  9. public:
  10. void SetSRGB_ADAPTER( int i )
  11. {
  12. Assert( i >= 0 && i <= 1 );
  13. m_nSRGB_ADAPTER = i;
  14. #ifdef _DEBUG
  15. m_bSRGB_ADAPTER = true;
  16. #endif
  17. }
  18. void SetSRGB_ADAPTER( bool i )
  19. {
  20. m_nSRGB_ADAPTER = i ? 1 : 0;
  21. #ifdef _DEBUG
  22. m_bSRGB_ADAPTER = true;
  23. #endif
  24. }
  25. private:
  26. int m_nCONVERT_TO_SRGB;
  27. #ifdef _DEBUG
  28. bool m_bCONVERT_TO_SRGB;
  29. #endif
  30. public:
  31. void SetCONVERT_TO_SRGB( int i )
  32. {
  33. Assert( i >= 0 && i <= 1 );
  34. m_nCONVERT_TO_SRGB = i;
  35. #ifdef _DEBUG
  36. m_bCONVERT_TO_SRGB = true;
  37. #endif
  38. }
  39. void SetCONVERT_TO_SRGB( bool i )
  40. {
  41. m_nCONVERT_TO_SRGB = i ? 1 : 0;
  42. #ifdef _DEBUG
  43. m_bCONVERT_TO_SRGB = true;
  44. #endif
  45. }
  46. private:
  47. int m_nCSTRIKE;
  48. #ifdef _DEBUG
  49. bool m_bCSTRIKE;
  50. #endif
  51. public:
  52. void SetCSTRIKE( int i )
  53. {
  54. Assert( i >= 0 && i <= 1 );
  55. m_nCSTRIKE = i;
  56. #ifdef _DEBUG
  57. m_bCSTRIKE = true;
  58. #endif
  59. }
  60. void SetCSTRIKE( bool i )
  61. {
  62. m_nCSTRIKE = i ? 1 : 0;
  63. #ifdef _DEBUG
  64. m_bCSTRIKE = true;
  65. #endif
  66. }
  67. public:
  68. downsample_nohdr_ps20b_Static_Index( )
  69. {
  70. #ifdef _DEBUG
  71. m_bSRGB_ADAPTER = false;
  72. #endif // _DEBUG
  73. m_nSRGB_ADAPTER = 0;
  74. #ifdef _DEBUG
  75. m_bCONVERT_TO_SRGB = true;
  76. #endif // _DEBUG
  77. m_nCONVERT_TO_SRGB = g_pHardwareConfig->NeedsShaderSRGBConversion();
  78. #ifdef _DEBUG
  79. m_bCSTRIKE = false;
  80. #endif // _DEBUG
  81. m_nCSTRIKE = 0;
  82. }
  83. int GetIndex()
  84. {
  85. // Asserts to make sure that we aren't using any skipped combinations.
  86. // Asserts to make sure that we are setting all of the combination vars.
  87. #ifdef _DEBUG
  88. bool bAllStaticVarsDefined = m_bSRGB_ADAPTER && m_bCONVERT_TO_SRGB && m_bCSTRIKE;
  89. Assert( bAllStaticVarsDefined );
  90. #endif // _DEBUG
  91. return ( 1 * m_nSRGB_ADAPTER ) + ( 2 * m_nCONVERT_TO_SRGB ) + ( 4 * m_nCSTRIKE ) + 0;
  92. }
  93. };
  94. #define shaderStaticTest_downsample_nohdr_ps20b psh_forgot_to_set_static_SRGB_ADAPTER + psh_forgot_to_set_static_CSTRIKE + 0
  95. class downsample_nohdr_ps20b_Dynamic_Index
  96. {
  97. public:
  98. downsample_nohdr_ps20b_Dynamic_Index()
  99. {
  100. }
  101. int GetIndex()
  102. {
  103. // Asserts to make sure that we aren't using any skipped combinations.
  104. // Asserts to make sure that we are setting all of the combination vars.
  105. #ifdef _DEBUG
  106. #endif // _DEBUG
  107. return 0;
  108. }
  109. };
  110. #define shaderDynamicTest_downsample_nohdr_ps20b 0