![]() | ||
Views: 6,000,494 | Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search | 11-30-23 05:09 PM |
Guest: |
0 users reading GX timings | 1 bot |
Main - Development - GX timings | Hide post layouts | New reply |
Arisotura |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() Big fire melon magical melon girl Level: 55 ![]() Posts: 240/870 EXP: 1267213 Next: 46976 Since: 03-28-17 From: France Last post: 10 days ago Last view: 9 days ago |
Actually GBAtek isn't too far off, as far as individual timings are concerned.
Matrix command timings The timings for commands 0x11-0x1C depend on the current matrix mode. Mode 0:
Mode 1: Timings are identical to mode 0. Mode 2: Timings are identical to mode 0. MULT/TRANS take 30 more cycles.
Mode 3: This mode has completely different timings. Probably because the texture matrices are smaller internally, or because it doesn't have to update the clip matrix, or both. The latter would explain the huge timing difference for command 0x15.
Other commands
All other commands (nop/invalid) take one cycle. Vertex parallel execution Vertex commands are able to execute in parallel with most other commands. Timings are expressed from the moment the vertex command starts. VTX_16 is preceded by one cycle because it takes two parameters, and starts upon the second cycle. Commands 0x20, 0x30, 0x31, 0x72 can run 6 cycles after a vertex command. Commands 0x29, 0x2A, 0x2B, 0x33, 0x34, 0x41, 0x60, 0x71 run 8 cycles after a vertex command (they cannot run in parallel). Commands 0x32, 0x40, 0x70 stall the pipeline (see below for what this implies). All other commands are able to run 4 cycles after a vertex command. Further commands also abide by these rules, atleast until the end of the vertex command. For example: vertex/texcoord/color: texcoord runs 4 cycles after the vertex, color is delayed by one cycle (starts 6 cycles after). Normal parallel execution Normals are able to run in parallel with vertices coming right after. The vertex can run 2/2/3/4/5 cycles after the normal starts, for 0/1/2/3/4 lights enabled respectively. Under these circumstances, further commands don't get delayed until the normal has finished. (maybe some commands do! I haven't tested them all) This explains why "texcoord/normal/vertex" runs faster than "normal/texcoord/vertex". Polygon pipeline Each vertex which completes a polygon places restrictions on when further vertices can run. The process lasts 27 cycles for a triangle and 36 cycles for a quad. This duration is divided into 9-cycle slots in which vertices have to fit. The first slot is obviously occupied by the vertex that is executing (and building a polygon). Exceptions for strips: for triangle strips, all 3 slots are occupied; for quad strips, the first 2 slots are occupied. EXCEPT: the process only lasts one slot if the polygon is rejected by culling/clipping When a vertex starts within one slot, the slot is occupied, and the next vertex is delayed until the next slot. Vertices running outside of the polygon-building process are free of any restrictions, and can run 4 cycles after the start of a previous vertex. Pipeline stalls Commands 0x32, 0x40 and 0x70 stall the pipeline. That is, if they happen during the polygon-building process described above, they are delayed until the end of the process. Commands 0x32 and 0x70 get an extra delay when a pipeline stall happens: 8 and 10 cycles respectively. If 0x32 happens outside of the polygon-building process, it can run 6 cycles after a vertex. ____________________ Kuribo64 |
Main - Development - GX timings | Hide post layouts | New reply |
Page rendered in 0.036 seconds. (2048KB of memory used) MySQL - queries: 28, rows: 75/75, time: 0.012 seconds. ![]() © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |