Handle compute packets that are split between the ends of two command buffers (#2476)

* Squashed initial implementation

* Logging for checking if buffers are memory contiguous

* Add check to see if first instruction is valid in the next buffer to avoid false positives

* Oof

* Replace old code with IndecisiveTurtle's new, better implementation

* Add `unlikely` keyword to the split packet handling branches

Co-authored-by: TheTurtle <47210458+raphaelthegreat@users.noreply.github.com>

---------

Co-authored-by: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com>
This commit is contained in:
kalaposfos13 2025-03-25 23:01:21 +01:00 committed by GitHub
parent 5c72030fb8
commit a1ec8b0a88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 41 additions and 19 deletions

View file

@ -1496,10 +1496,13 @@ public:
}
struct AscQueueInfo {
static constexpr size_t Pm4BufferSize = 1024;
VAddr map_addr;
u32* read_addr;
u32 ring_size_dw;
u32 pipe_id;
std::array<u32, Pm4BufferSize> tmp_packet;
u32 tmp_dwords;
};
Common::SlotVector<AscQueueInfo> asc_queues{};
@ -1541,7 +1544,7 @@ private:
Task ProcessGraphics(std::span<const u32> dcb, std::span<const u32> ccb);
Task ProcessCeUpdate(std::span<const u32> ccb);
template <bool is_indirect = false>
Task ProcessCompute(std::span<const u32> acb, u32 vqid);
Task ProcessCompute(const u32* acb, u32 acb_dwords, u32 vqid);
void Process(std::stop_token stoken);