nouveau/push: Fix SET_OBJECT handling
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

My first attempt to fix it ended up stomping classes to zero because it
happened too eary.  Now it happens after we have the whole method parsed
but before we go searching for strings.

Fixes: 8e93a763a3 ("nouveau/push: Handle more recent versions of 6F")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37180>
This commit is contained in:
Faith Ekstrand 2025-09-04 11:08:21 -04:00 committed by Marge Bot
parent d5a8233598
commit 40aea06bd0

View file

@ -109,13 +109,6 @@ vk_push_print(FILE *fp, const struct nv_push *push,
fprintf(fp, "HDR %x subch %i", hdr, subchan);
}
if (mthd == 0) { /* SET_OBJECT */
curr_subchans[subchan] = value & 0xffff;
}
int class_id = curr_subchans[subchan];
int cls_hi = (class_id & 0xff00) >> 8;
int cls_lo = class_id & 0xff;
cur++;
const char *mthd_name = "";
@ -174,6 +167,16 @@ vk_push_print(FILE *fp, const struct nv_push *push,
}
while (count--) {
if (!is_immd)
value = *cur;
if (mthd == 0) { /* SET_OBJECT */
curr_subchans[subchan] = value & 0xffff;
}
int class_id = curr_subchans[subchan];
int cls_hi = (class_id & 0xff00) >> 8;
int cls_lo = class_id & 0xff;
if (!is_tert) {
if (mthd < 0x100) {
if (cls_hi >= 0xc5)
@ -250,9 +253,6 @@ vk_push_print(FILE *fp, const struct nv_push *push,
}
}
if (!is_immd)
value = *cur;
fprintf(fp, "\tmthd %04x %s\n", mthd, mthd_name);
if (mthd < 0x100) {
if (cls_hi >= 0xb0)