nv2a: Wrap pfifo direct renderer calls

This commit is contained in:
Matt Borgerson 2024-07-26 17:21:01 -07:00 committed by mborgerson
parent 2800b8d22a
commit 093e654725
3 changed files with 16 additions and 2 deletions

View File

@ -461,13 +461,13 @@ void *pfifo_thread(void *arg)
while (true) {
d->pfifo.fifo_kick = false;
d->pgraph.renderer->ops.process_pending(d);
pgraph_process_pending(d);
if (!d->pfifo.halt) {
pfifo_run_pusher(d);
}
d->pgraph.renderer->ops.process_pending_reports(d);
pgraph_process_pending_reports(d);
if (!d->pfifo.fifo_kick) {
qemu_cond_broadcast(&d->pfifo.fifo_idle_cond);

View File

@ -2872,3 +2872,15 @@ void pgraph_write_zpass_pixel_cnt_report(NV2AState *d, uint32_t parameter,
NV2A_DPRINTF("Report result %d @%" HWADDR_PRIx, result, offset);
}
void pgraph_process_pending(NV2AState *d)
{
PGRAPHState *pg = &d->pgraph;
pg->renderer->ops.process_pending(d);
}
void pgraph_process_pending_reports(NV2AState *d)
{
PGRAPHState *pg = &d->pgraph;
pg->renderer->ops.process_pending_reports(d);
}

View File

@ -250,6 +250,8 @@ void pgraph_init(NV2AState *d);
void pgraph_init_thread(NV2AState *d);
void pgraph_destroy(PGRAPHState *pg);
void pgraph_context_switch(NV2AState *d, unsigned int channel_id);
void pgraph_process_pending(NV2AState *d);
void pgraph_process_pending_reports(NV2AState *d);
int pgraph_method(NV2AState *d, unsigned int subchannel, unsigned int method,
uint32_t parameter, uint32_t *parameters,
size_t num_words_available, size_t max_lookahead_words,