Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 72781

Summary: libsdl not enabling hardware acceleration
Product: Gentoo Linux Reporter: Dave <clippyhater>
Component: [OLD] LibraryAssignee: Gentoo Games <games>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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