Merge pull request #2428 from jackchentwkh/fix_pushbuffer_subroutine

fix COMMAND_TYPE_CALL pushbuffer command handling
This commit is contained in:
Luke Usher 2023-09-03 21:45:52 +01:00 committed by GitHub
commit e1ea10c4cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -469,12 +469,15 @@ extern void EmuExecutePushBufferRaw
LOG_TEST_CASE("Pushbuffer COMMAND_TYPE_JUMP_LONG");
dma_get_jmp_shadow = dma_get;
dma_get = (uint32_t *)(CONTIGUOUS_MEMORY_BASE | (word & COMMAND_WORD_MASK_JUMP_LONG));
//NV2A uses COMMAND_TYPE_JUMP_LONG as return for COMMAND_TYPE_CALL. we clear the subr_active here to indicate we have returned from COMMAND_TYPE_CALL.
subr_active = false;
continue; // while
case COMMAND_TYPE_CALL: // Note : NV2A return is said not to work?
if (subr_active) {
LOG_TEST_CASE("Pushbuffer COMMAND_TYPE_CALL while another call was active!");
// TODO : throw DMA_PUSHER(CALL_SUBR_ACTIVE);
return; // For now, don't even attempt to run through
// For now, don't even attempt to run through, this should never happened, if it happened, the pgraph handler will go crazy.
CxbxrAbort("Pushbuffer COMMAND_TYPE_CALL called without return!");
}
else {
LOG_TEST_CASE("Pushbuffer COMMAND_TYPE_CALL");