pspgl freezes

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

I don't think the code in pspgl_ge_init() is the same as Holger's original version. In your implementation, you set the registers which are "lazy", so they aren't written until all pending changes are flushed. For starters, you don't set the ge_reg_touched bitmap for the registers in the init table, so it seems like only registers that are updated elsewhere in the API will ever be sent during a flush. I tried doing this, and it still didn't work. I think the problem here was that some of the registers used during init were either being overwritten by other OGL calls or they weren't being sent in the correct order. Holger's version of pspgl_ge_init.c just queued the entire init list as sceGuInit() does.

Here's a fix:

Code: Select all

Index: pspgl_ge_init.c
===================================================================
--- pspgl_ge_init.c     (revision 1527)
+++ pspgl_ge_init.c     (working copy)
@@ -94,7 +94,7 @@
 
        for &#40;i=0; i<sizeof&#40;ge_init_state&#41;/sizeof&#40;ge_init_state&#91;0&#93;&#41;; i++&#41; &#123;
                unsigned long cmd = ge_init_state&#91;i&#93;;
-               c->ge_reg&#91;cmd >> 24&#93; = cmd;
+               __pspgl_dlist_enqueue_cmd&#40;c->dlist_current, cmd&#41;;
        &#125;
 
        glScissor&#40;0, 0, c->draw->width, c->draw->height&#41;;
I've checked it in... I would've rather just sent the list all at once, but there didn't seem to be a non-trivial way to do it :).
Post Reply