Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72781 - libsdl not enabling hardware acceleration
Summary: libsdl not enabling hardware acceleration
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-28 18:00 UTC by Dave
Modified: 2004-12-01 20:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave 2004-11-28 18:00:04 UTC
SDL_GetVideoInfo() is showing that hardware acceleration is not being used.

I'm using the current nvidia driver on a 2.6 kernel.  My glxgears shows a decent frame rate and glxinfo shows hardware acceleration is being used there.

I've asked about this on Gentoo Forums, and the few answers I've received showed the same results.  For whatever reason (ebuild, or libsdl source), libsdl is not using hardware acceleration, even though there's no reason it shouldn't.


Reproducible: Always
Steps to Reproduce:
1. Enter the following simple program and save as "test.cc":
#include "SDL/SDL.h"
#include <stdlib.h>

const SDL_VideoInfo* g_pVideoInfo = NULL;

int main(int argc, char* argv[])
{
   SDL_Init(SDL_INIT_VIDEO);
   atexit(SDL_Quit);
   g_pVideoInfo = SDL_GetVideoInfo();
   fprintf(stdout, "\nVideo Information:\n");
   fprintf(stdout, "hw_available? %d\n", g_pVideoInfo->hw_available);
   fprintf(stdout, "wm_available? %d\n", g_pVideoInfo->wm_available);
   fprintf(stdout, "blit_hw? %d\n", g_pVideoInfo->blit_hw);
   fprintf(stdout, "blit_hw_CC? %d\n", g_pVideoInfo->blit_hw_CC);
   fprintf(stdout, "blit_hw_A? %d\n", g_pVideoInfo->blit_hw_A);
   fprintf(stdout, "blit_sw? %d\n", g_pVideoInfo->blit_sw);
   fprintf(stdout, "blit_sw_CC? %d\n", g_pVideoInfo->blit_sw_CC);
   fprintf(stdout, "blit_sw_A? %d\n", g_pVideoInfo->blit_sw_A);
   fprintf(stdout, "blit_fill? %d\n", g_pVideoInfo->blit_fill);
   fprintf(stdout, "video memory (in K)? %d\n", g_pVideoInfo->video_mem);
   fprintf(stdout, "bits per pixel? %d\n", g_pVideoInfo->vfmt->BitsPerPixel);

   return 0;
}

2. Compile with:

g++ -Wall -ISDL -L/usr/lib -lSDL test1.cc

Actual Results:  
Video Information:
hw_available? 0
wm_available? 1
blit_hw? 0
blit_hw_CC? 0
blit_hw_A? 0
blit_sw? 0
blit_sw_CC? 0
blit_sw_A? 0
blit_fill? 0
video memory (in K)? 0
bits per pixel? 16




Expected Results:  
hw_available should have something != 0.
blit_hw should have something != 0.
etc.
Comment 1 SpanKY gentoo-dev 2004-12-01 20:18:38 UTC
going by the FAQ on libsdl.org (which you should have read :P) this is correct behavior