[haiku-development] Re: Video Problem

  • From: Gerald Zajac <zajacg@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 29 Oct 2008 16:58:38 -0500

Stephan Assmus wrote:
Gerald Zajac wrote:
When switching from a color depth of 32 bits/pixel (bpp) to 8, 15, or 16 bpp either the drawing will be extremely slow such that the Screen Preferences dialog will take a couple seconds to redraw, or drawing will be fine at the lower color depth but when trying to switch back to 32 bpp the following error is displayed: "The screen mode could not be set: General system error".

The result depends upon the amount of video memory. If using a resolution of 1280x1024, and the video memory is >= 16 MB, the slow drawing occurs; however, if there is only 8 MB of video memory, drawing is fine but you can't switch back to 32 bpp color depth as described above. This second case might depend upon whether the video driver uses the virtual screen size to compute the required video memory. When switching back to 32 bpp, the virtual screen height in the display_mode struct passed to the video driver is double the actual screen height; thus, with a resolution of 1280x1024, the amount of memory required is 1280 x 2048 x 4 = 10 MB which is greater that 8 MB.

Actually, when switching back to 32 bpp, the virtual screen height is always double the actual screen height, but the error message does not occur if there is enough video memory to cover it.

These problems seemed to have initially appeared between r28289 and r28303. That is, these problems did not occur under r28289, but did occur under r28303.

It was definitely the plan to fall back to using single buffered mode if the memory does not suffice. Perhaps I can make myself a good test case for this.

As for the slow drawing, that is really weird and I wonder if it has something to do with the other problem. But if you say it occured at around the same time... hm.


It was the slow drawing that I originally tracked down which started between r28289 and r28303. It was later using r28350 that I investigated the cause of the error message by adding some TRACE statements to the S3 driver. All the Haiku images that I used were the prebuilt Hard Disk images that I downloaded from the Haiku website.

Regards,
Gerald


Other related posts: