forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Display lists

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
uberjack



Joined: 17 Jul 2007
Posts: 34
Location: California, USA

PostPosted: Thu Aug 07, 2008 4:40 am    Post subject: Display lists Reply with quote

Has anyone tried using display lists (not GU_DIRECT) for 2D graphics? I'm curious as to how well this works. In my experience, I found out that I couldn't store texture rendering (GU_SPRITE) in a display list; and even with simple GU_LINES or GU_POINTS rendering, every now and then I get palette corruption and the odd artifact. I'm starting to think that it's probably safer to do direct rendering instead (though speed gained by using display lists will be sorely missed)
Back to top
View user's profile Send private message Visit poster's website
a_noob



Joined: 17 Sep 2006
Posts: 97
Location: _start: jr 0xDEADBEEF

PostPosted: Thu Aug 07, 2008 1:56 pm    Post subject: Reply with quote

Theres nothing wrong with using display lists for 2D ;)
_________________
Code:
.øOº'ºOø.
'ºOo.oOº'
Back to top
View user's profile Send private message AIM Address MSN Messenger
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Thu Aug 07, 2008 8:38 pm    Post subject: Reply with quote

Display list in general are just something like an abstraction layer shorcut. I mean: when you issue command to graphic hardware, the CPU has to do a whole lot of conversions to make your commands understandable by "GPU". Once you have a bunch of commands converted, why to do it again each frame?? (moreover: in PCs where GPUs have their own memory, why should you re-upload data every time?) Because of this, lists exist. So the short answer is : if it's not good, it's not bad anyway. Only thing i'm uncertain about this is PSP specific implementation of matrix algebra; i mean: in traditional PC 3D accelerators, you can issue a display list after some transformations (that always take to a single transformation matrix) and have your list transformed as well before getting drawn. Looking in pspGE and PSPGU sources we can see explicit transformations performed by VFPU and not by graphic hardware....so i could't tell at wich point in the pipeline display lists are implemented on PSP...maybe they're only something that mimc real GPU's behaviour to make devs feeling more comfortable with it...but i really don't know
Back to top
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Thu Aug 07, 2008 9:07 pm    Post subject: Reply with quote

jean wrote:
Looking in pspGE and PSPGU sources we can see explicit transformations performed by VFPU and not by graphic hardware....

You're misunderstanding the "matrix transformations" it seems. The code in pspGL and sceGU only contains methods of creating rotation, translation and scaling matrices and multiplying them together. The transformation of the vectors by those matrices is still done in hardware, so as long as the matrix is set before the call of the display list it works. IIRC you can also just set your matrix inside your list, in which case just the final output matrix will be stored inside the list, so you also save up on all the matrix calculations for each call to the list.
_________________
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
Back to top
View user's profile Send private message Visit poster's website
uberjack



Joined: 17 Jul 2007
Posts: 34
Location: California, USA

PostPosted: Fri Aug 08, 2008 2:01 am    Post subject: Reply with quote

jean wrote:
Display list in general are just something like an abstraction layer shorcut. I mean: when you issue command to graphic hardware, the CPU has to do a whole lot of conversions to make your commands understandable by "GPU". Once you have a bunch of commands converted, why to do it again each frame?? (moreover: in PCs where GPUs have their own memory, why should you re-upload data every time?) Because of this, lists exist. So the short answer is : if it's not good, it's not bad anyway. Only thing i'm uncertain about this is PSP specific implementation of matrix algebra; i mean: in traditional PC 3D accelerators, you can issue a display list after some transformations (that always take to a single transformation matrix) and have your list transformed as well before getting drawn. Looking in pspGE and PSPGU sources we can see explicit transformations performed by VFPU and not by graphic hardware....so i could't tell at wich point in the pipeline display lists are implemented on PSP...maybe they're only something that mimc real GPU's behaviour to make devs feeling more comfortable with it...but i really don't know


In that case, should sceGuDrawArray commands with GU_SPRITES be retained in the display list, or do textures not get stored in the list?

Another question. In OpenGL, we are not required to specify the size of the display list - just a unique constant identifying the list. How is the size of a GU display list computed, and is it possible to determine it before issuing the actual commands?

Thanks
Back to top
View user's profile Send private message Visit poster's website
a_noob



Joined: 17 Sep 2006
Posts: 97
Location: _start: jr 0xDEADBEEF

PostPosted: Fri Aug 08, 2008 10:21 am    Post subject: Reply with quote

Ermm Im sure its possible but there is no function for checking, but you can make a guess based on what you have to render.
_________________
Code:
.øOº'ºOø.
'ºOo.oOº'
Back to top
View user's profile Send private message AIM Address MSN Messenger
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Fri Aug 08, 2008 6:20 pm    Post subject: Reply with quote

Quote:
The code in pspGL and sceGU only contains methods of creating rotation, translation and scaling matrices

oh....ok this clarifies me a lot of things....damn my quick drill-downs: i have to be more professional when i think out loud of internals... ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group