add xe::clear_lowest_bit, use it in place of shift-andnot in some bit iteration code make is_allocated_ and is_enabled_ volatile in xma_context preallocate avpacket buffer in XMAContext::Setup, the reallocations of the buffer in ffmpeg were showing up on profiles check is_enabled and is_allocated BEFORE locking an xmacontext. XMA worker was spending most of its time locking and unlocking contexts Removed XeDMAC, dma:: namespace. It was a bad idea and I couldn't make it work in the end. Kept vastcpy and moved it to the memory namespace instead Made the rest of global_critical_region's members static. They never needed an instance. Removed ifdef'ed out code from ring_buffer.h Added EventInfo struct to threading, added Event::Query to aid with implementing NtQueryEvent. Removed vector from WaitMultiple, instead use a fixed array of 64 handles that we populate. WaitForMultipleObjects cannot handle more than 64 objects. Remove XE_MSVC_OPTIMIZE_SMALL() use in x64_sequences, x64 backend is now always size optimized because of premake Make global_critical_region_ static constexpr in shared_memory.h to get rid of wasteage of 8 bytes (empty class=1byte, +alignment for next member=8) Move trace-related data to the tail of SharedMemory to keep more important data together In IssueDraw build an array of fetch constant addresses/sizes, then pre-lock the global lock before doing requestrange for each instead of individually locking within requestrange for each of them Consistent access specifier protected for pm4_command_processor_declare Devirtualize WriteOneRegisterFromRing. Move ExecutePacket and ExecutePrimaryBuffer to pm4_command_buffer_x Remove many redundant header inclusions access xenia-gpu Minor microoptimization of ExecutePacketType0 Add TextureCache::RequestTextures for batch invocation of LoadTexturesData Add TextureCache::LoadTexturesData for reducing the number of times we release and reacquire the global lock. Ideally you should hold the global lock for as little time as possible, but if you are constantly acquiring and releasing it you are actually more likely to have contention Add already_locked param to ObjectTable::LookupObject to help with reducing lock acquire/release pairs Add missing checks to XAudioRegisterRenderDriverClient_entry. this is unlikely to fix anything, it was just an easy thing to do Add NtQueryEvent system call implementation. I don't actually know of any games that need it. Instead of using std::vector + push_back in KeWaitForMultipleObjects and xeNtWaitForMultipleObjectsEx use a fixed size array of 64 and track the count. More than 64 objects is not permitted by the kernel. The repeated reallocations from push_back were appearing unusually high on the profiler, but were masked until now by waitformultipleobjects natural overhead Pre-lock the global lock before looking up each handle for xeNtWaitForMultipleObjectsEx and KeWaitForMultipleObjects. Pre-lock before looking up the signal and waiter in NtSignalAndWaitForSingleObjectEx add missing checks to NtWaitForMultipleObjectsEx Support pre-locking in XObject::GetNativeObject
114 lines
4.1 KiB
C++
114 lines
4.1 KiB
C++
|
|
|
|
void ExecuteIndirectBuffer(uint32_t ptr, uint32_t count) XE_RESTRICT;
|
|
virtual uint32_t ExecutePrimaryBuffer(uint32_t start_index, uint32_t end_index) XE_RESTRICT;
|
|
virtual bool ExecutePacket();
|
|
|
|
public:
|
|
void ExecutePacket(uint32_t ptr, uint32_t count);
|
|
|
|
protected:
|
|
XE_NOINLINE
|
|
bool ExecutePacketType0( uint32_t packet) XE_RESTRICT;
|
|
XE_NOINLINE
|
|
bool ExecutePacketType1( uint32_t packet) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType2( uint32_t packet) XE_RESTRICT;
|
|
XE_NOINLINE
|
|
bool ExecutePacketType3( uint32_t packet) XE_RESTRICT;
|
|
XE_NOINLINE
|
|
bool ExecutePacketType3_ME_INIT( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
bool ExecutePacketType3_NOP( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
XE_NOINLINE
|
|
bool ExecutePacketType3_INTERRUPT( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
XE_NOINLINE
|
|
bool ExecutePacketType3_XE_SWAP( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType3_INDIRECT_BUFFER( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
XE_NOINLINE
|
|
bool ExecutePacketType3_WAIT_REG_MEM( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
XE_NOINLINE
|
|
bool ExecutePacketType3_REG_RMW( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType3_REG_TO_MEM( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
XE_NOINLINE
|
|
bool ExecutePacketType3_MEM_WRITE( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
XE_NOINLINE
|
|
bool ExecutePacketType3_COND_WRITE( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType3_EVENT_WRITE( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
XE_NOINLINE
|
|
bool ExecutePacketType3_EVENT_WRITE_SHD( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType3_EVENT_WRITE_EXT( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
XE_NOINLINE
|
|
bool ExecutePacketType3_EVENT_WRITE_ZPD( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType3Draw( uint32_t packet,
|
|
const char* opcode_name,
|
|
uint32_t viz_query_condition,
|
|
uint32_t count_remaining) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType3_DRAW_INDX( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType3_DRAW_INDX_2( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
XE_FORCEINLINE
|
|
bool ExecutePacketType3_SET_CONSTANT( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
XE_NOINLINE
|
|
bool ExecutePacketType3_SET_CONSTANT2( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
XE_FORCEINLINE
|
|
bool ExecutePacketType3_LOAD_ALU_CONSTANT( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType3_SET_SHADER_CONSTANTS(
|
|
uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType3_IM_LOAD( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType3_IM_LOAD_IMMEDIATE( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType3_INVALIDATE_STATE( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
|
|
bool ExecutePacketType3_VIZ_QUERY( uint32_t packet,
|
|
uint32_t count) XE_RESTRICT;
|
|
|
|
|
|
XE_FORCEINLINE
|
|
void WriteEventInitiator(uint32_t value) XE_RESTRICT;
|
|
|
|
XE_NOINLINE
|
|
XE_COLD
|
|
bool HitUnimplementedOpcode(uint32_t opcode, uint32_t count) XE_RESTRICT;
|
|
|
|
XE_NOINLINE
|
|
XE_NOALIAS
|
|
uint32_t GetCurrentRingReadCount();
|
|
|
|
XE_NOINLINE
|
|
XE_COLD
|
|
bool ExecutePacketType3_CountOverflow(uint32_t count);
|
|
XE_NOINLINE
|
|
XE_COLD
|
|
bool ExecutePacketType0_CountOverflow(uint32_t count); |