PM4 type 2 in acb (#3047)

* Stub PM4 type 0

* fix command size

* revert command size to actual

* return unreachable for PM4t0

* remove skipping command body
This commit is contained in:
mailwl 2025-06-09 11:27:37 +03:00 committed by GitHub
parent d7051f15f4
commit 046cf50412
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -228,9 +228,12 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
const u32 type = header->type;
switch (type) {
default:
UNREACHABLE_MSG("Wrong PM4 type {}", type);
break;
case 0:
case 1:
UNREACHABLE_MSG("Unsupported PM4 type {}", type);
UNREACHABLE_MSG("Unimplemented PM4 type 0, base reg: {}, size: {}",
header->type0.base.Value(), header->type0.NumWords());
break;
case 2:
// Type-2 packet are used for padding purposes
@ -826,6 +829,19 @@ Liverpool::Task Liverpool::ProcessCompute(const u32* acb, u32 acb_dwords, u32 vq
break;
}
if (header->type == 2) {
// Type-2 packet are used for padding purposes
next_dw_off = 1;
acb += next_dw_off;
acb_dwords -= next_dw_off;
if constexpr (!is_indirect) {
*queue.read_addr += next_dw_off;
*queue.read_addr %= queue.ring_size_dw;
}
continue;
}
if (header->type != 3) {
// No other types of packets were spotted so far
UNREACHABLE_MSG("Invalid PM4 type {}", header->type.Value());