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.

85 lines
2.4 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. // $NoKeywords: $
  8. //===========================================================================//
  9. #include "buildrenderables_PS3.h"
  10. // memdbgon must be the last include file in a .cpp file!!!
  11. #include "tier0/memdbgon.h"
  12. CPS3BuildRenderablesJob g_BuildRenderablesJob;
  13. CPS3BuildRenderablesJob* g_pBuildRenderablesJob = &g_BuildRenderablesJob;
  14. job_buildrenderables::JobDescriptor_t g_buildRenderablesJobDescriptor ALIGN128;
  15. //-----------------------------------------------------------------------------
  16. // Purpose:
  17. //-----------------------------------------------------------------------------
  18. void CPS3BuildRenderablesJob::Init( void )
  19. {
  20. m_bEnabled = false;
  21. m_buildRenderablesJobData.EnsureCapacity(MAX_CONCURRENT_BUILDVIEWS);
  22. m_buildRenderablesJobCount = 0;
  23. // requires a SPURS instance, so register with VJobs
  24. if( g_pVJobs )
  25. {
  26. g_pVJobs->Register( this );
  27. }
  28. }
  29. //-----------------------------------------------------------------------------
  30. // Purpose:
  31. //-----------------------------------------------------------------------------
  32. void CPS3BuildRenderablesJob::Shutdown()
  33. {
  34. g_pVJobs->Unregister( this );
  35. }
  36. //-----------------------------------------------------------------------------
  37. // Purpose:
  38. //-----------------------------------------------------------------------------
  39. void CPS3BuildRenderablesJob::OnVjobsInit()
  40. {
  41. m_bEnabled = true;
  42. g_buildRenderablesJobDescriptor.header = *m_pRoot->m_pJobBuildRenderables;
  43. g_buildRenderablesJobDescriptor.header.useInOutBuffer = 1;
  44. g_buildRenderablesJobDescriptor.header.sizeStack = (64*1024)/16;
  45. g_buildRenderablesJobDescriptor.header.sizeInOrInOut = 0;
  46. }
  47. //-----------------------------------------------------------------------------
  48. // Purpose:
  49. //-----------------------------------------------------------------------------
  50. void CPS3BuildRenderablesJob::OnVjobsShutdown()
  51. {
  52. m_bEnabled = false;
  53. }
  54. //-----------------------------------------------------------------------------
  55. // Purpose:
  56. //-----------------------------------------------------------------------------
  57. PS3BuildRenderablesJobData *CPS3BuildRenderablesJob::GetJobData( int job )
  58. {
  59. return &m_buildRenderablesJobData[ job ];
  60. }
  61. //-----------------------------------------------------------------------------
  62. // Purpose:
  63. //-----------------------------------------------------------------------------