Hey all, I was wondering if some of the gurus here could help me with some details of the GE.
What I'm interested in is the overall operation of the GE and how it processes lists.
First off, the flow. As I understand it, here's what happens in the trivial case (no stalling):
- user builds display list
- user calls sceGeEnQueue with a pointer to the list
- kernel passes off list to GE hardware (DMA copy? how does it know the end?)
--> execution returns to user code
--> GE runs through the list of commands
In the more complicated case of stalling:
- user partially builds display list
- user calls sceGeEnQueue with a pointer to the list and the pointer of the last instruction
- kernel passes partial list to GE
--> user adds more commands to the list
--> GE runs through list of commands until stall address
- user calls sceGeUpdateStallAddr with the new end pointer
- kernel signals GE to continue
- ...
Is this right?
This brings me to callbacks. I think I understand them: the callbacks are executed from an interrupt handler. The signal callback is issued when the GE hits a signal command enqueued with sceGuSignal. The finish callback is issued when the GE hits a finish command enqueued with sceGuFinish. Regarding signals, it looks like signal 0-2 are usable, while 3 indicates some kind of cancel, and 4+=? Is this all correct?
Things like jumps and calls confuse me though; are those executed on the CPU or GE? For example, if I have two lists, with one calling the other, and I submit the master, will the called list get copied at the time of enqueing or will the GE run it when it gets to the call? This issue makes me think that the lists must be pre-processed by the CPU. I read that it does a DMA copy of something, but if it's the list, it means that the CPU has to walk it as it can't copy unless it knows the size. Am I missing something? What is the CPU doing here? I'm thinking specifically of the case of modifying a list called from another list. Also, is there a maximum call depth?
Also, what does a GE END command (12) do? Does it just pause the GE until the next update stall address?
Many thanks to anyone who can shed some light on these details. I've searched the forums, googled, and looked at a lot of the SDK code/samples, and I've inferred all of this; I just couldn't find any document that said, 'this is how it is'. If anyone knows of such a document, I'd appreciate a link :)
GE details
As far as I understand it, the list isn't directly copied to GU, but only the pointer to the list (see the source of sceGuStart). Since the GU can access system RAM directly that makes sense (DMA is only used for the sceGuCopyImage command afaik). Also, the GU doesn't care how large the list actually is, it just keeps on parsing the list until it finds a a finish command (or an invalid command, probably caused by running over the end of the list? Not sure on that).
The stall address case should be correct - at least it sounds logical.
Regarding the list inside list - considering how the list is submitted (by a pointer) it sounds right that the inner list is submitted at the point of execution of the outer list. I'm not sure though if lists are stacked on GU, so it might not be possible to do call a list within a list and return to the first.
The stall address case should be correct - at least it sounds logical.
Regarding the list inside list - considering how the list is submitted (by a pointer) it sounds right that the inner list is submitted at the point of execution of the outer list. I'm not sure though if lists are stacked on GU, so it might not be possible to do call a list within a list and return to the first.
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
well you can have a first call then a second nested call at maximum.Raphael wrote:Regarding the list inside list - considering how the list is submitted (by a pointer) it sounds right that the inner list is submitted at the point of execution of the outer list. I'm not sure though if lists are stacked on GU, so it might not be possible to do call a list within a list and return to the first.
Re: GE details
only 4 signals specific to GE :noxa wrote:Regarding signals, it looks like signal 0-2 are usable, while 3 indicates some kind of cancel, and 4+=? Is this all correct?
Also, what does a GE END command (12) do? Does it just pause the GE until the next update stall address?
- "signal interrupt", issued when CMD_SIGNAL is executed on GE (signals the host cpu about something GE wants to make it aware of)
- "end interrupt", issued when CMD_END is executed on GE (it stops reading the display list)
- "finish interrupt", issued when CMD_FINISH is executed on GE (it means all drawing operations have completed)
- "error interrupt", self speaking