Stub PM4 type 0

This commit is contained in:
mailwl 2025-06-06 16:42:52 +03:00
parent 91d29459fb
commit 2b3a35ce1b

View File

@ -228,10 +228,14 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
const u32 type = header->type;
switch (type) {
case 0:
case 1:
default:
UNREACHABLE_MSG("Unsupported PM4 type {}", type);
break;
case 0:
LOG_ERROR(Render, "Unimplemented PM4 type 2, base reg: {}, count: {}",
header->type0.base.Value(), header->type0.NumWords());
dcb = NextPacket(dcb, header->type3.NumWords() + 1);
continue;
case 2:
// Type-2 packet are used for padding purposes
dcb = NextPacket(dcb, 1);
@ -826,6 +830,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());