[haiku-development] Re: Where should video driver test for sufficient memory?
- From: Gerald Zajac <zajacg@xxxxxxxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Wed, 17 Dec 2008 11:11:57 -0500
Stephan Aßmus wrote:
I think checking in SetDisplayMode() is the best option.
The S3 driver currently checks for sufficient memory in
SetDisplayMode(); thus, I will leave that unchanged; however, I will
change the error code to B_NO_MEMORY when it detects insufficient frame
buffer memory. Currently, it uses the error code B_ERROR.
Sorry that I have not yet fixed app_server. I don't remember if I
mentioned this already, but
src/servers/app/drawing/AccelerantHWInterface.cpp has a #define at a
central place somewhere (in SetMode()?) that turns off the double
buffering behaviour. It's supposed to detect the failing and fall back
to single buffer. Maybe you can even find out where the error is
there... but at least you should be able to work around the issue by
switching the #define for the time being.
I looked at the code in AccelerantHWInterface.cpp, and it appears to use
double buffering for only 32 bit color; thus, to avoid this problem
when testing a video driver, I can use 16 bit color. Since I hope to
have the code for handling ATI Mach64 chips working soon, I can avoid
this problem by using 16 bit color when testing those chips. Most of
them have 2, 4, or 8 MB's of memory; thus, this problem would certainly
occur when testing those chips.
When do you think this problem in the app_server will be fixed?
Best Regards,
Gerald
Other related posts: