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 

Bug in sceGuDrawBuffer()

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



Joined: 09 Oct 2005
Posts: 54

PostPosted: Sun Oct 23, 2005 9:10 am    Post subject: Bug in sceGuDrawBuffer() Reply with quote

I believe the lines
Code:

   sendCommandi(157,((((unsigned int)gu_draw_buffer.frame_buffer) & 0xff000000) >> 8)||gu_draw_buffer.frame_width);
   sendCommandi(159,((((unsigned int)gu_draw_buffer.depth_buffer) & 0xff000000) >> 8)||gu_draw_buffer.depth_width);

should actually be
Code:

   sendCommandi(157,((((unsigned int)gu_draw_buffer.frame_buffer) & 0xff000000) >> 8) | gu_draw_buffer.frame_width);
   sendCommandi(159,((((unsigned int)gu_draw_buffer.depth_buffer) & 0xff000000) >> 8) | gu_draw_buffer.depth_width);

Been stuck all day and lost half my hair until I noticed the logical OR there was likely to screw up my rendertargets and VRAM allocations. In the meantime, I'll switch to using sceGuDrawBufferList(), but that is likely to be causing some internal troubles in Gu; for example, sceGuDispBuffer() uses the pixel format from sceGuDrawBuffer() in order to set the display mode, which is kinda sucky.

I have no idea how can any code work with that bug... I may be missing something?
_________________
Paco
Back to top
View user's profile Send private message
chp



Joined: 23 Jun 2004
Posts: 313

PostPosted: Sun Oct 23, 2005 9:52 am    Post subject: Reply with quote

Ahhh, so that's why that function was acting up a while back. :) Thanks for locating that bug, a fix has been submitted.

It works because the registers are also written in sceGuStart(), so it wasn't visible until now.
_________________
GE Dominator
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