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.

69 lines
2.0 KiB

  1. //========== Copyright � Valve Corporation, All rights reserved. ========
  2. #if !defined( VJOBS_EDGEGEOM_JOBPARAMS_SHARED_HDR ) && defined( _PS3 )
  3. #define VJOBS_EDGEGEOM_JOBPARAMS_SHARED_HDR
  4. #include "ps3/spu_job_shared.h"
  5. #include "edge/geom/edgegeom_structs.h"
  6. struct SpuGcmEdgeGeomParams_t;
  7. namespace job_edgegeom
  8. {
  9. struct JobParams_t
  10. {
  11. uint32 m_nFlags;
  12. uint32 m_eaEdgeGcmControl;
  13. uint32 m_numEdgeIndices;
  14. uint32 m_numEdgeVertices;
  15. EdgeGeomViewportInfo m_edgeGeomViewportInfo;
  16. EdgeGeomLocalToWorldMatrix m_edgeGeomLocalToWorldMatrix;
  17. uint32 m_nAdjustOutputIndices; // this gets added to the output indices, to adjust for the skipped vertices
  18. uint32 m_uiGcmCount;
  19. uint32 m_nLocalMemoryIndexBuffer;
  20. uint32 m_nCmdBufferHoleBytes;
  21. uint32 m_nQueueTag;
  22. uint32 m_eaEdgeGeomJts;
  23. uint32 m_eaEdgeDmaInputBase;
  24. uint32 m_nEdgeDmaInputIdx;
  25. uint32 m_nEdgeDmaInputVtx;
  26. uint32 m_nEdgeDmaInputEnd;
  27. uint32 m_nEdgeDmaIoBufferSize;
  28. uint32 m_nExecutedOnSpu; // this must be 0xFFFF FFFF before it's executed, and the SpuId when it's executed
  29. uint32 m_nEdgeJobId;
  30. uint16 m_uiMarkupVersionFlags;
  31. uint8 m_uiGcmMode;
  32. uint8 m_uiCullFlavor;
  33. };
  34. struct ALIGN128 JobDescriptor_t
  35. {
  36. CellSpursJobHeader header;
  37. enum { DMA_LIST_CAPACITY = 1 + 4 + 4 + 4 + 1 };
  38. union {
  39. uint64_t dmaList[DMA_LIST_CAPACITY];
  40. uint64_t userData[DMA_LIST_CAPACITY];
  41. } workArea;
  42. // pad it so that params END exactly at the end of the structure, this leaves the maximum safety slack
  43. // between the params and DMA list just in case the DMA list overflows
  44. uint8 paddingToMakeJobDescriptorBigEnough[ sizeof(JobParams_t) ];
  45. //uint8 padding[ 127 & ~( sizeof( CellSpursJobHeader ) + sizeof( uint64 ) * DMA_LIST_CAPACITY ) ];
  46. //JobParams_t params;
  47. }ALIGN128_POST;
  48. inline JobParams_t * GetJobParams( void *pJob )
  49. {
  50. COMPILE_TIME_ASSERT( sizeof( JobDescriptor_t ) <= 896 ); // the absolute maximum for the job descriptor
  51. return VjobGetJobParams< JobParams_t, JobDescriptor_t >( pJob );
  52. }
  53. }
  54. #endif