MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / PrepDataPacket

Method PrepDataPacket

pcsx2/MTGS.cpp:794–809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

792}
793
794void MTGS::PrepDataPacket(Command cmd, u32 size)
795{
796 s_packet_size = size;
797 ++size; // takes into account our RingCommand QWC.
798 GenericStall(size);
799
800 // Command qword: Low word is the command, and the high word is the packet
801 // length in SIMDs (128 bits).
802 const unsigned int local_WritePos = s_WritePos.load(std::memory_order_relaxed);
803
804 PacketTagType& tag = (PacketTagType&)RingBuffer[local_WritePos];
805 tag.command = static_cast<u32>(cmd);
806 tag.data[0] = s_packet_size;
807 s_packet_startpos = local_WritePos;
808 s_packet_writepos = (local_WritePos + 1) & RingBufferMask;
809}
810
811// Returns the amount of giftag data processed (in simd128 values).
812// Return value is used by VU1's XGKICK instruction to wrap the data

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected