mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 03:59:59 -04:00
Refresh read-back ranges in the VRAM mirror, guard the boot pipeline prebuild against driver crashes and count out-of-order event waits.
Small ranges the game invalidates and reads back (the exposure meter) are copied from guest memory into the mirror at every submission that uses their pool, so a CPU write made between recording and the GPU's run is not lost; NX2NAVI_READBACK_SYNC=0 turns it off. While the boot builds the recorded pipelines a marker file exists next to the pipeline cache. A start that finds it left over records the GPU and driver in pipeline-prewarm-skip.txt, and starts on them build those pipelines at their first draw instead. CommandBufferWaitEvent is now recorded as OP_WAIT_EVENT. The replay waits for nothing but counts the waits it reaches before their signal, and how many submissions later that signal comes, in the NX2NAVI_TRACE=gfx frame line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -403,6 +403,7 @@ static uint64_t record_all(void) {
|
||||
CALL(nvnTextureViewSetLevels, U(&view), 1, 3);
|
||||
|
||||
REC(OP_SIGNAL_EVENT, CALL(nvnCommandBufferSignalEvent, U(c), U(&ev), NVN_EVENT_SIGNAL_MODE_ADD, NVN_EVENT_SIGNAL_LOCATION_BOTTOM, 0, 0x55));
|
||||
REC(OP_WAIT_EVENT, CALL(nvnCommandBufferWaitEvent, U(c), U(&ev), NVN_EVENT_WAIT_MODE_EQUAL, 0x55));
|
||||
REC(OP_REPORT_COUNTER, CALL(nvnCommandBufferReportCounter, U(c), NVN_COUNTER_TYPE_SAMPLES_PASSED, 0xaabb00));
|
||||
REC(OP_RESET_COUNTER, CALL(nvnCommandBufferResetCounter, U(c), NVN_COUNTER_TYPE_SAMPLES_PASSED));
|
||||
REC(OP_COPY_B2B, CALL(nvnCommandBufferCopyBufferToBuffer, U(c), 0x1000, 0x2000, 0x40, 0));
|
||||
@@ -494,6 +495,11 @@ static void parse_all(uint64_t h) {
|
||||
CHECK(p->val == (volatile uint32_t *)pmem && p->mode == NVN_EVENT_SIGNAL_MODE_ADD && p->value == 0x55, "SIGNAL_EVENT payload");
|
||||
break;
|
||||
}
|
||||
case OP_WAIT_EVENT: {
|
||||
const p_wait_event *p = a;
|
||||
CHECK(p->val == (volatile uint32_t *)pmem && p->mode == NVN_EVENT_WAIT_MODE_EQUAL && p->value == 0x55, "WAIT_EVENT payload");
|
||||
break;
|
||||
}
|
||||
case OP_REPORT_COUNTER: {
|
||||
const p_report_counter *p = a;
|
||||
CHECK(p->type == NVN_COUNTER_TYPE_SAMPLES_PASSED && p->addr == 0xaabb00, "REPORT_COUNTER payload");
|
||||
|
||||
Reference in New Issue
Block a user