Miklós Fazekas wrote:
>
> I'm just wondering if it's always necessary to maintain a copy of the
> texture in Mesa?
> Couldn't it avoided in some ways?
Yes, usually.
> What is your opinion from the following thing:
> From glTexSubImage2D, we'd first asked the driver to handle it if it can.
> If
> it can handle it, Mesa wouldn't create the whole texture image, since it's
> already at the driver. Mesa would just notice that the image is at the
> driver. There would be also a function which would ask the driver to
> construct the image, in case Mesa needs it for some reason.
> So it drivers could be optimized for most common texture cases.
>
> Isn't this sounds solvable?
> Any comments?
>
> Miklos.
>
> Btw. I'm asking this since in Mac version of Q2 we spend 5% of time just
> converting between the app/Mesa/driver.
The code paths for glTexImage and glTexSubImage could certainly be
optimized. It's on my list of things to do after 3.1 is finished.
One thing to be aware of is the glGetTexImage calls. If for some
reason you can't pull texture data back out of the graphics card
you'll have to keep a backup copy.
Also, if you fall into a GL state which the hardware can't accomodate
you'll need the texture data for software-based texturing.
-Brian
----------------------------------------------------------------------
Brian Paul Avid Technology / Softimage [EMAIL PROTECTED]
_______________________________________________
Mesa-dev maillist - [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev