Video memory reporting problem

Hello all,

I’ve just compiled SDL 1.2.0 on my Debian Linux 2.2 box with a
generic S3 Virge/DX video card, and I’ve run into a problem.
I am running XFree86 3.3.6, using the S3V accelerated Xserver
(but the same thing happens with the SVGA Xserver). When I run
the test program “testvidinfo”, it basically tells me that no
acceleration is available. I wrote a small program that calls
SDL_GetVideoInfo() and prints out the SDL_VideoInfo struct,
and this pretty much tells me the same thing (i.e. wm_available
is set to 1, but everything else like hw_available, blit_hw,
etc. are set to 0, and so is the amount of video memory reported).

Seeing as I know my card (although pathetic…) is capable
of acceleration (and has 4MB of vram), does anyone know what
the problem could be? I’ve checked the mailing list archives
but have found no solution.

Regards,

Simos Hadjiyiannis±------------------------------------------------------------+
| Simos Hadjiyiannis sdl at chinesetearoom.com |
±------------------------------------------------------------+

When I run
the test program “testvidinfo”, it basically tells me that no
acceleration is available. I wrote a small program that calls
SDL_GetVideoInfo() and prints out the SDL_VideoInfo struct,
and this pretty much tells me the same thing (i.e. wm_available
is set to 1, but everything else like hw_available, blit_hw,
etc. are set to 0, and so is the amount of video memory reported).

What about adding something like the following to the FAQ (not that people
ever read FAQs of course):

Q: I have an accelerated video card, but SDL tells me that that I have
zero video memory and no acceleration!

In particular, this is the case for the X11 target which always
presents you with a software framebuffer. Your video memory will always
be reported to be zero if no acceleration is available.

(Note that DGA in XFree86 4.x, a separate display target, will give you
hardware acceleration.)A: Not all display targets can make use of hardware acceleration.

What about adding something like the following to the FAQ (not that people
ever read FAQs of course):

[FAQ snipped]

Sounds good, I’m adding it now.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

When I run
the test program “testvidinfo”, it basically tells me that no
acceleration is available. I wrote a small program that calls
SDL_GetVideoInfo() and prints out the SDL_VideoInfo struct,
and this pretty much tells me the same thing (i.e. wm_available
is set to 1, but everything else like hw_available, blit_hw,
etc. are set to 0, and so is the amount of video memory reported).

What about adding something like the following to the FAQ (not that people
ever read FAQs of course):

Q: I have an accelerated video card, but SDL tells me that that I have
zero video memory and no acceleration!

In particular, this is the case for the X11 target which always
presents you with a software framebuffer. Your video memory will always
be reported to be zero if no acceleration is available.

(Note that DGA in XFree86 4.x, a separate display target, will give you
hardware acceleration.)

Mattias,

Can I assume then that although SDL is reporting that no acceleration
is available, but since SDL is using the underlying accelerated Xserver,
then acceleration will be used by the Xserver regardless of what SDL
thinks?

Regards,

Simos

P.S. If this had been in the FAQ, I would have read it…On Mon, 9 Apr 2001, Mattias Engdegard wrote:

A: Not all display targets can make use of hardware acceleration.

±------------------------------------------------------------+
| Simos Hadjiyiannis @Simos_Hadjiyiannis |
±------------------------------------------------------------+

Can I assume then that although SDL is reporting that no acceleration
is available, but since SDL is using the underlying accelerated Xserver,
then acceleration will be used by the Xserver regardless of what SDL
thinks?

No. The only thing SDL uses the X11 server for is for XShmPutImage(),
which copies the back buffer (residing in system RAM) to the actual screen.
This is usually done by the CPU.

Also note that there are no hardware surfaces when using the X11 target.