Miklós Fazekas wrote:
> 
> Hello!
> 
> >> I'm just wondering if it's always necessary to maintain  a copy of the
> >> texture in Mesa?
> Sorry I wasn't clear in this. There is need for a copy in main memory, I
> don't have problem with it.
> 
> But currently Mesa and the FX driver is also has one copy in
> the main memory.
> 
> My problem is that the driver has no way to avoid the sometimes very
> inefficient conversions made by Mesa.
> 
> We could let the driver to handle the glTexImage/SubImage call nearly
> directly, with it's optimized conversion, if it can.
> And if Mesa needs for the image data for software rendering, etc.  It could
> ask the driver for the texture-image. I think this could be more efficient
> for most applications.

Yes.  The driver should be given the texture image sooner in the
pipeline.  For simple, common cases, Mesa's glTexImage2D and glTex-
SubImage2D functions could certainly be made faster.

When the texture is given to the driver, the driver can indicate
whether the texture data is acceptable as-is or whether core Mesa
should massage it.  Remember there are lots of datatypes and formats
for texture data.  There's also the pixel transfer scale, bias
and lookup tables and pixelstore memory packing parameters.  After
all this processing you'd typically wind up with a 1, 2, 3 or 4-
channel GLubyte texture which the driver could more easily accept.

The driver could also indicate to core Mesa whether or not it should
retain a copy of the texture or discard the data after download.

I don't think I'll be able to work on this for a while.

-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