Counter Strike : Global Offensive Source Code
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.

107 lines
4.5 KiB

  1. //========== Copyright � 2005, Valve Corporation, All rights reserved. ========
  2. #ifndef HARDWARECONFIG_PS3NONVIRT_H
  3. #define HARDWARECONFIG_PS3NONVIRT_H
  4. #ifdef _PS3
  5. #include "ihardwareconfiginternal.h"
  6. //////////////////////////////////////////////////////////////////////////
  7. //
  8. // PS3 non-virtual implementation proxy
  9. //
  10. // cat hardwareconfig_ps3nonvirt.h | nonvirtualscript.pl > hardwareconfig_ps3nonvirt.inl
  11. struct CPs3NonVirt_IHardwareConfigInternal
  12. {
  13. //NONVIRTUALSCRIPTBEGIN
  14. //NONVIRTUALSCRIPT/PROXY/CPs3NonVirt_IHardwareConfigInternal
  15. //NONVIRTUALSCRIPT/DELEGATE/g_pHardwareConfig->CHardwareConfig::
  16. //
  17. // IMaterialSystemHardwareConfig
  18. //
  19. static bool HasSetDeviceGammaRamp();
  20. static VertexCompressionType_t SupportsCompressedVertices();
  21. static int MaximumAnisotropicLevel();
  22. static int MaxTextureWidth();
  23. static int MaxTextureHeight();
  24. static int TextureMemorySize();
  25. static bool SupportsMipmappedCubemaps();
  26. static int MaxTextureAspectRatio();
  27. static int MaxVertexShaderBlendMatrices();
  28. static bool UseFastClipping();
  29. static bool ReadPixelsFromFrontBuffer();
  30. static bool PreferDynamicTextures();
  31. static bool NeedsAAClamp();
  32. static bool SpecifiesFogColorInLinearSpace();
  33. static bool IsAAEnabled(); // Is antialiasing being used?
  34. static int GetVertexSamplerCount();
  35. static int GetMaxVertexTextureDimension();
  36. static int MaxTextureDepth();
  37. static bool SupportsStreamOffset();
  38. static int StencilBufferBits();
  39. static int MaxViewports();
  40. static void OverrideStreamOffsetSupport( bool bOverrideEnabled, bool bEnableSupport );
  41. static int MaxHWMorphBatchCount();
  42. static float GetShadowDepthBias();
  43. static float GetShadowSlopeScaleDepthBias();
  44. static bool PreferZPrepass();
  45. static bool SuppressPixelShaderCentroidHackFixup();
  46. static bool PreferTexturesInHWMemory();
  47. static bool PreferHardwareSync();
  48. static bool SupportsShadowDepthTextures();
  49. static ImageFormat GetShadowDepthTextureFormat();
  50. static ImageFormat GetHighPrecisionShadowDepthTextureFormat();
  51. static ImageFormat GetNullTextureFormat();
  52. static float GetLightMapScaleFactor();
  53. //NONVIRTUALSCRIPTEND
  54. //
  55. // Predefined implementation
  56. //
  57. static inline bool SupportsStaticControlFlow() { return true; }
  58. static inline bool FakeSRGBWrite() { return false; }
  59. static inline bool CanDoSRGBReadFromRTs() { return true; }
  60. static inline bool SupportsGLMixedSizeTargets() { return true; }
  61. static inline int MaxNumLights() { return MAX_NUM_LIGHTS; }
  62. static inline int MaxUserClipPlanes() { return 0; }
  63. static inline ShadowFilterMode_t GetShadowFilterMode( bool bForceLowQualityShadows, bool bPS30 ) { return SHADOWFILTERMODE_DEFAULT; } // PCF filter
  64. static inline bool SupportsHDRMode( HDRType_t nHDRMode ) { return ( nHDRMode == HDR_TYPE_NONE ) || ( nHDRMode == HDR_TYPE_INTEGER ); }
  65. static inline HDRType_t GetHDRType() { return HDR_TYPE_INTEGER; }
  66. static inline HDRType_t GetHardwareHDRType() { return HDR_TYPE_INTEGER; }
  67. static inline bool HasFastVertexTextures() { return false; }
  68. static inline bool ActualHasFastVertexTextures() { return false; }
  69. static int NeedsShaderSRGBConversion() { return false; }
  70. static inline bool SupportsBorderColor() { return true; }
  71. static inline bool SupportsFetch4() { return false; }
  72. static inline bool NeedsATICentroidHack() { return false; }
  73. static inline int NumVertexShaderConstants() { return 256; }
  74. static inline int NumPixelShaderConstants() { return MAX_FRAGMENT_PROGRAM_CONSTS; }
  75. static inline bool GetHDREnabled() { return true; }
  76. static inline void SetHDREnabled( bool bEnable ) {}
  77. static inline bool IsUnsupported() { return false; }
  78. static inline int GetFrameBufferColorDepth() { return 4; }
  79. static inline int GetSamplerCount() { return 16; }
  80. static inline int GetDXSupportLevel() { return 98; }
  81. static inline int GetMaxDXSupportLevel() { return GetDXSupportLevel(); }
  82. static inline int GetMinDXSupportLevel() { return GetDXSupportLevel(); }
  83. static inline bool SupportsHDR() { return true; }
  84. static inline bool SupportsSRGB() { return true; }
  85. static inline bool UsesSRGBCorrectBlending() { return IsX360(); }
  86. static inline bool SupportsPixelShaders_2_b() { return true; }
  87. static inline const char *GetShaderDLLName() { return "shaderapidx9"; }
  88. static inline const char *GetHWSpecificShaderDLLName() { return "shaderapidx9"; }
  89. static inline bool SupportsCascadedShadowMapping() { return false; }
  90. static inline bool SupportsBilinearPCFSampling() { return true; }
  91. };
  92. inline CPs3NonVirt_IHardwareConfigInternal* HardwareConfig()
  93. {
  94. return ( CPs3NonVirt_IHardwareConfigInternal * ) 1;
  95. }
  96. #endif
  97. #endif