Process the entire display list in one go
| 461 | // Process the entire display list in one go |
| 462 | //***************************************************************************** |
| 463 | static u32 DLParser_ProcessDList(u32 instruction_limit) |
| 464 | { |
| 465 | MicroCodeCommand command; |
| 466 | |
| 467 | u32 current_instruction_count {}; |
| 468 | |
| 469 | while(gDlistStackPointer >= 0) |
| 470 | { |
| 471 | DLParser_FetchNextCommand( &command ); |
| 472 | |
| 473 | DL_BEGIN_INSTR(current_instruction_count, command.inst.cmd0, command.inst.cmd1, gDlistStackPointer, gUcodeName[command.inst.cmd]); |
| 474 | |
| 475 | PROFILE_DL_CMD( command.inst.cmd ); |
| 476 | |
| 477 | gUcodeFunc[ command.inst.cmd ]( command ); |
| 478 | |
| 479 | DL_END_INSTR(); |
| 480 | |
| 481 | #ifdef DAEDALUS_DEBUG_DISPLAYLIST |
| 482 | // Note: make sure have frame skip disabled for the dlist debugger to work |
| 483 | if( instruction_limit != kUnlimitedInstructionCount ) |
| 484 | { |
| 485 | if( current_instruction_count >= instruction_limit ) |
| 486 | { |
| 487 | return current_instruction_count; |
| 488 | } |
| 489 | } |
| 490 | current_instruction_count++; |
| 491 | #endif |
| 492 | |
| 493 | // Check limit |
| 494 | if (gDlistStack.limit >= 0) |
| 495 | { |
| 496 | if (--gDlistStack.limit < 0) |
| 497 | { |
| 498 | #ifdef DAEDALUS_DEBUG_DISPLAYLIST |
| 499 | DL_PF("**EndDLInMem"); |
| 500 | #endif |
| 501 | gDlistStackPointer--; |
| 502 | // limit is already reset to default -1 at this point |
| 503 | //gDlistStack.limit = -1; |
| 504 | } |
| 505 | } |
| 506 | } |
| 507 | |
| 508 | return current_instruction_count; |
| 509 | } |
| 510 | //***************************************************************************** |
| 511 | // |
| 512 | //***************************************************************************** |
no test coverage detected