Keith Whitwell wrote:
> 
> Brian Paul wrote:
> >
> > The following TrueColor (and DirectColor) visuals use optimized code
> > which directly pokes pixels into the XImage instead of using XPutPixesl:
> >
> > 32bpp,  Rmask=0x0000ff, Gmask=0x00ff00, Bmask=0xff0000
> > 32bpp,  Rmask=0xff0000, Gmask=0x00ff00, Bmask=0x0000ff
> > 24bpp,  Rmask=0xff0000, Gmask=0x00ff00, Bmask=0x0000ff
> > 16bpp,  Rmask=0xf800, Gmask=0x7e0, Bmask=0x001f   (5-6-5 mode)
> > 8bpp,  Rmask=0xe0, Gmask=0x1c, Bmask=0x3 (HP Color Recovery visual only)
> >
> > Perhaps you're using a 16bpp, depth=15 (5-5-5) visual?
> >
> 
> Hmm...  Looks like something is lost in the translation:
> 
> xdpyinfo puts me in (5-6-5) mode with the same masks as above:
> 
>   default visual id:  0x23
>   visual:
>     visual id:    0x23
>     class:    TrueColor
>     depth:    16 planes
>     available colormap entries:    64 per subfield
>     red, green, blue masks:    0xf800, 0x7e0, 0x1f
>     significant bits in color specification:    6 bits
> 
> Profiling isosurf gives:
> 
>  83.33      3.15     3.15   smooth_TRUEDITHER_z_triangle
>   9.79      3.52     0.37   shade_fast_rgba_one_sided
>   1.59      3.58     0.06   glVertex3fv
>   1.32      3.63     0.05   gl_x86_cliptest_points4
>   0.79      3.66     0.03   glNormal3fv
> 
> Examining smooth_TRUEDITHER_z_triangle shows:
> 
>       if (z < zRow[i])
>          unsigned long p;
>          PACK_TRUEDITHER( p, xx, yy, FixedToInt(ffr),
>                           FixedToInt(ffg), FixedToInt(ffb) );
>          XMesaPutPixel( img, xx, yy, p );
>          zRow[i] = z;
>       }
> 
> I guess that dithering hasn't been brought up to speed with the ability
> to write directly into the XImage.  Turning off dither gives a speedup,
> but it's not huge.  Isosurf is probably dominated by the setup rather
> than fill of these triangles.

Yeah, I just checked, 16bpp w/ dithering does use XPutPixel.  When
dithering is disabled XPutPixel is avoided.  At one time, dithering
wasn't supported in 16bpp mode.  I guess I never optimized it when
I enabled it.

A better benchmark would be the demos/trispd program with a large
triangle size (-size option).

I'll put this optimization on my to-do list.

-Brian

----------------------------------------------------------------------
Brian Paul        Avid Technology / Softimage      [EMAIL PROTECTED]


_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to