Handle compute packets that are split between the ends of two command buffers (#2476)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Update Translation / Update Translation (push) Has been skipped

* 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
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);