xmame  

[Xmame] sdlmame0115u2 glpatch03 .. FYI

Sven Gothel
Thu, 24 May 2007 14:57:09 -0700

I guess I have reached a pretty stable state with this...

R. Belmont might integrate it into the tree ..

Have fun ..

I guess the next cool thing would be to use fragment shaders
to do the color table lookup .. etc ..

Cheers, Sven

http://www.jausoft.ca/Files/GLMame/sdlmame0115u2_glpatch03.diff

+++

2007-05-24 sdlmame0115u2_glpatch03.diff sgothel

I have tested this patchset with:
        - ATI Mobility Radeon X1400 fglrx
        - RADEON X800 GTO fglrx (running on main Xorg, while a 2nd Xgl is 
running ;-)
        - GeForce4 4200 Go/AGP/SSE2

        Looks pretty stable now .. even with multithreading enabled ..

Fixed NV PBO async/flickering bug:
        - Usually after TexSubImage2D the DMA result shall be ready,
          this is .. sometimes .. not the case,
          especially if running in multithreading mode.
        - Adding an glFinish at the window_draw function,
          if a texture was used.          

Clean texture enable/disable
        - entering window_draw with now texture enabled
        - leaving  window_draw with now texture enabled
        - using a texture_all_disable function for this purpose,
          which properly unbinds the texCoords array buffer as well.

Cleaned  'exit'/destruction order
        - drawsdl_destroy_all_textures will acquirer a lock,
          else .. a destroy call could disturb the update thread
          while just killing the still used ressources.

        - sdlwindow_video_window_destroy calls
          sdlwindow_video_window_destroy_wt first, before releaseing
          the window->target ressources, which are still needed .

        - no more occasional GL lost-ressource bugs ..

2007-05-24 sdlmame0115u2_glpatch02b.diff sgothel

// Fixed: Proper handling of GL_TEXTURE_COORD_ARRAY, to avoid seg.fault on NV 
cards
// Fixed: No assumption that PBO's may be not pow2 textures,
          they will be pow2 if the non-pow2 ext is not present
// NV cards are working, performance from low to high:
          - no VBO, no PBO
          - VBO
          - VBO and PBO

2007-05-24 sdlmame0115u2_glpatch02.diff sgothel

multithreading 
        // works flawless for me - great performance
        // texture sequence (bind/usage) fixed

Misc
        // unified texture enable/bind usage

Remaining odds
        // cropped artwork is somehow slow, e.g. invaders
        // normal (not cropped) works fine

2007-05-24 sdlmame0115u2_glpatch01.diff sgothel

Proper formatting:
        // tab was 8, I used 4 in my latest patch
        // fixed 

Power of 2 Textures:
        // we don't use GL_EXT_texture_rectangle,
        // because it is somehow buggy, slower and has less features.
        // because GL_EXT_texture_rectangle is somehow buggy, slower and has 
less features.
        // Since the new texture copy code copies only the net data,
        // and not the pow2 data .. it's ok.
        //
        // PBO textures may be not pow2, despite the lack of the extention ..
        //
        // Artwork (cropped and nor cropped) is visible working now.

VBO and PBO GetProcAddress
        - Fetching all functions for both extentions, using GetProcAddress

Adding VBO 
        - tex coordinates are now static within the texture !

Working PBO 
        - Will be compiled in - always
        - Runtime PBO support check
        - PBO usage for !nocopy textures
        - PBO usage allows us to not force pow2 texture size for PBO textures,
          if needed otherwise.

Misc
        - Using VertexPointer for texture/vertices
        - Using VBO TexCoordPointer for texture/coord
        - texture_properties:
                - Fixing the right order of texture_properties: internal, 
format, type, .. 
                - set SDL_TEXFORMAT_RGB32 to copy:TRUE
                - set SDL_TEXFORMAT_RGB15 to copy:TRUE
        - 1st TexImage2D is done with NULL data in texture_create
        - if nocopy, GL_UNPACK_ROW_LENGTH := rowpixels
        - texture_update is called when needed and serves the texture pointer 
if available.

-- 
health & wealth
[EMAIL PROTECTED] ; www  : http://www.jausoft.ca ; pgp: 
http://www.jausoft.ca/gpg/
land : +1 (780) 637 3842 ; cell: +1 (780) 952 4481
Timezone MST: EST-2, UTC-7, CET-8 ; MDT: EDT-2, UTC-6, CEDT-8

_______________________________________________
Xmame mailing list
Xmame@toybox.twisted.org.uk
http://toybox.twisted.org.uk/mailman/listinfo/xmame