mirror of https://github.com/xemu-project/xemu.git
nv2a/vk: Finish when queue is empty
This commit is contained in:
parent
a2a193b4e3
commit
c41853a3f3
|
@ -72,6 +72,7 @@
|
||||||
_X(NV2A_PROF_FINISH_PRESENTING) \
|
_X(NV2A_PROF_FINISH_PRESENTING) \
|
||||||
_X(NV2A_PROF_FINISH_FLIP_STALL) \
|
_X(NV2A_PROF_FINISH_FLIP_STALL) \
|
||||||
_X(NV2A_PROF_FINISH_FLUSH) \
|
_X(NV2A_PROF_FINISH_FLUSH) \
|
||||||
|
_X(NV2A_PROF_FINISH_STALLED) \
|
||||||
_X(NV2A_PROF_CLEAR) \
|
_X(NV2A_PROF_CLEAR) \
|
||||||
_X(NV2A_PROF_QUEUE_SUBMIT) \
|
_X(NV2A_PROF_QUEUE_SUBMIT) \
|
||||||
_X(NV2A_PROF_QUEUE_SUBMIT_AUX) \
|
_X(NV2A_PROF_QUEUE_SUBMIT_AUX) \
|
||||||
|
|
|
@ -1244,6 +1244,7 @@ const enum NV2A_PROF_COUNTERS_ENUM finish_reason_to_counter_enum[] = {
|
||||||
[VK_FINISH_REASON_PRESENTING] = NV2A_PROF_FINISH_PRESENTING,
|
[VK_FINISH_REASON_PRESENTING] = NV2A_PROF_FINISH_PRESENTING,
|
||||||
[VK_FINISH_REASON_FLIP_STALL] = NV2A_PROF_FINISH_FLIP_STALL,
|
[VK_FINISH_REASON_FLIP_STALL] = NV2A_PROF_FINISH_FLIP_STALL,
|
||||||
[VK_FINISH_REASON_FLUSH] = NV2A_PROF_FINISH_FLUSH,
|
[VK_FINISH_REASON_FLUSH] = NV2A_PROF_FINISH_FLUSH,
|
||||||
|
[VK_FINISH_REASON_STALLED] = NV2A_PROF_FINISH_STALLED,
|
||||||
};
|
};
|
||||||
|
|
||||||
void pgraph_vk_finish(PGRAPHState *pg, FinishReason finish_reason)
|
void pgraph_vk_finish(PGRAPHState *pg, FinishReason finish_reason)
|
||||||
|
|
|
@ -507,6 +507,7 @@ typedef enum FinishReason {
|
||||||
VK_FINISH_REASON_PRESENTING,
|
VK_FINISH_REASON_PRESENTING,
|
||||||
VK_FINISH_REASON_FLIP_STALL,
|
VK_FINISH_REASON_FLIP_STALL,
|
||||||
VK_FINISH_REASON_FLUSH,
|
VK_FINISH_REASON_FLUSH,
|
||||||
|
VK_FINISH_REASON_STALLED,
|
||||||
} FinishReason;
|
} FinishReason;
|
||||||
|
|
||||||
// draw.c
|
// draw.c
|
||||||
|
|
|
@ -137,4 +137,13 @@ void pgraph_vk_process_pending_reports_internal(NV2AState *d)
|
||||||
|
|
||||||
void pgraph_vk_process_pending_reports(NV2AState *d)
|
void pgraph_vk_process_pending_reports(NV2AState *d)
|
||||||
{
|
{
|
||||||
|
PGRAPHState *pg = &d->pgraph;
|
||||||
|
PGRAPHVkState *r = pg->vk_renderer_state;
|
||||||
|
|
||||||
|
uint32_t *dma_get = &d->pfifo.regs[NV_PFIFO_CACHE1_DMA_GET];
|
||||||
|
uint32_t *dma_put = &d->pfifo.regs[NV_PFIFO_CACHE1_DMA_PUT];
|
||||||
|
|
||||||
|
if (*dma_get == *dma_put && r->in_command_buffer) {
|
||||||
|
pgraph_vk_finish(pg, VK_FINISH_REASON_STALLED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue