We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 781

Summary: Pixel format problems in testsprite and testsprite2
Product: SDL Reporter: Alberto Luaces <aluaces>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: Linux   

Description Alberto Luaces 2009-08-14 07:18:05 UTC
The test programs using blits (testsprite, testsprite2, testalpha...) are
not working for me. I suppose that is some problem with the pixel format of my screen:

* testsprite2 fails displaying a black stripe at the right side, as shown in http://img39.imageshack.us/img39/3635/softrendbug.png when using the "software" renderer.

* testsprite and testalpha show incorrect blittings, maybe because they choose a bad pixel format.See it at http://img141.imageshack.us/i/testsprite.jpg/

* testsprite and testalpha work correctly with SDL 1.2 on this computer.

This is the output of testvidcard with SDL 1.3:

$ ./testvidinfo
Built-in video drivers: x11, dummy
Video driver: x11
Number of displays: 1
Display 0:
  Current mode: 1400x1050@0Hz, 24 bits-per-pixel
      Red Mask = 0x00ff0000
      Green Mask = 0x0000ff00
      Blue Mask = 0x000000ff
  Fullscreen video modes:
    Mode 0: 1400x1050@0Hz, 24 bits-per-pixel
        Red Mask = 0x00ff0000
        Green Mask = 0x0000ff00
        Blue Mask = 0x000000ff
Current resolution: 1400x1050

$ ./testsprite2 --info render
Built-in render drivers:
  Renderer x11:
    Flags: 0x0000005F (SingleBuffer | PresentCopy | PresentFlip2 | PresentFlip3 | PresentDiscard | Accelerated)
    Blend: 0x00000000 ()
    Scale: 0x00000000 ()
    Texture formats (6): RGB888, YV12, IYUV, YUY2, UYVY, YVYU
  Renderer opengl:
    Flags: 0x00000071 (SingleBuffer | PresentDiscard | PresentVSync | Accelerated)
    Blend: 0x0000000F (Mask | Blend | Add | Mod)
    Scale: 0x00000003 (Fast | Slow)
    Texture formats (15): Index1LSB, Index1MSB, Index8, RGB332, RGB444, RGB555, ARGB4444, ARGB1555, RGB565, RGB24, BGR24, RGB888, BGR888, ARGB8888, ABGR8888
  Renderer software:
    Flags: 0x0000003F (SingleBuffer | PresentCopy | PresentFlip2 | PresentFlip3 | PresentDiscard | PresentVSync)
    Blend: 0x0000000F (Mask | Blend | Add | Mod)
    Scale: 0x00000001 (Fast)
    Texture formats (14): Index8, RGB555, RGB565, RGB888, BGR888, ARGB8888, RGBA8888, ABGR8888, BGRA8888, YV12, IYUV, YUY2, UYVY, YVYU
Current renderer:
  Renderer x11:
    Flags: 0x00000042 (PresentCopy | Accelerated)
    Blend: 0x00000000 ()
    Scale: 0x00000000 ()
    Texture formats (6): RGB888, YV12, IYUV, YUY2, UYVY, YVYU
Couldn't create texture: Compatible pixel format can't be found

Thank you.
Comment 1 Sam Lantinga 2009-09-26 03:34:03 UTC
Can you retest with the current SDL snapshot?
http://www.libsdl.org/tmp/SDL-1.3.zip

Thanks!
Comment 2 Alberto Luaces 2009-09-28 03:53:14 UTC
Hello Sam, 

that release gave me problems compiling because some issues with the assembler in SDL_cpuinfo.c. However I could build the latest SVN version.

The pixel format issue is gone now, and the smiling faces are blitted correctly in both programs. The testalpha program is not behaving completely well, but I think it's a different problem than the one that this bug report is covering.

For me, this bug is solved.

Thank you!
Comment 3 Sam Lantinga 2009-09-28 08:28:39 UTC
Okay, thanks!