mirror of https://github.com/xemu-project/xemu.git
nv2a: Wrap nv2a_vm_state_change direct renderer calls
This commit is contained in:
parent
093e654725
commit
27531ec1ca
|
@ -375,10 +375,10 @@ static void nv2a_vm_state_change(void *opaque, bool running, RunState state)
|
|||
if (state == RUN_STATE_SAVE_VM) {
|
||||
nv2a_lock_fifo(d);
|
||||
qatomic_set(&d->pfifo.halt, true);
|
||||
d->pgraph.renderer->ops.pre_savevm_trigger(d);
|
||||
pgraph_pre_savevm_trigger(d);
|
||||
nv2a_unlock_fifo(d);
|
||||
qemu_mutex_unlock_iothread();
|
||||
d->pgraph.renderer->ops.pre_savevm_wait(d);
|
||||
pgraph_pre_savevm_wait(d);
|
||||
qemu_mutex_lock_iothread();
|
||||
nv2a_lock_fifo(d);
|
||||
} else if (state == RUN_STATE_RESTORE_VM) {
|
||||
|
@ -391,10 +391,10 @@ static void nv2a_vm_state_change(void *opaque, bool running, RunState state)
|
|||
nv2a_unlock_fifo(d);
|
||||
} else if (state == RUN_STATE_SHUTDOWN) {
|
||||
nv2a_lock_fifo(d);
|
||||
d->pgraph.renderer->ops.pre_shutdown_trigger(d);
|
||||
pgraph_pre_shutdown_trigger(d);
|
||||
nv2a_unlock_fifo(d);
|
||||
qemu_mutex_unlock_iothread();
|
||||
d->pgraph.renderer->ops.pre_shutdown_wait(d);
|
||||
pgraph_pre_shutdown_wait(d);
|
||||
qemu_mutex_lock_iothread();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2884,3 +2884,28 @@ void pgraph_process_pending_reports(NV2AState *d)
|
|||
PGRAPHState *pg = &d->pgraph;
|
||||
pg->renderer->ops.process_pending_reports(d);
|
||||
}
|
||||
|
||||
void pgraph_pre_savevm_trigger(NV2AState *d)
|
||||
{
|
||||
PGRAPHState *pg = &d->pgraph;
|
||||
pg->renderer->ops.pre_savevm_trigger(d);
|
||||
}
|
||||
|
||||
void pgraph_pre_savevm_wait(NV2AState *d)
|
||||
{
|
||||
PGRAPHState *pg = &d->pgraph;
|
||||
pg->renderer->ops.pre_savevm_wait(d);
|
||||
}
|
||||
|
||||
void pgraph_pre_shutdown_trigger(NV2AState *d)
|
||||
{
|
||||
PGRAPHState *pg = &d->pgraph;
|
||||
pg->renderer->ops.pre_shutdown_trigger(d);
|
||||
}
|
||||
|
||||
void pgraph_pre_shutdown_wait(NV2AState *d)
|
||||
{
|
||||
PGRAPHState *pg = &d->pgraph;
|
||||
pg->renderer->ops.pre_shutdown_wait(d);
|
||||
}
|
||||
|
||||
|
|
|
@ -252,6 +252,11 @@ 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);
|
||||
void pgraph_pre_savevm_trigger(NV2AState *d);
|
||||
void pgraph_pre_savevm_wait(NV2AState *d);
|
||||
void pgraph_pre_shutdown_trigger(NV2AState *d);
|
||||
void pgraph_pre_shutdown_wait(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,
|
||||
|
|
Loading…
Reference in New Issue