No. The <format> parameter describes the incoming format of the user's texture image. It may or may not have any bearing on which hardware format is chosen by the driver. More typically, the <internalFormat> parameter is used by the driver to choose the hardware texture format.
I am standing from the driver point of view, and so i wanted to know if i can ask mesa, from the driver, for a special order.
In r300 driver we have to test & find the hardware texture format and for testing all possible path i would like to have the texture provided by mesa in rev or "not" rev order as internal mesa can give it to me in this two format.
What i found is that on big endian machine i get the texture in REV order while on little endian i get it in "normal" order.
Anyway if it isn't possible to ask mesa for having texture
in rev or not order, i can assume that on big endian machine
i will always have texture in rev while on x86 i will get it
in "normal" order ?
I'm not 100% sure I understand your question, but here's now things work.
When glTexImageXD() is called, the ctx->Driver.ChooseTextureFormat() function is called. This gives the driver the opportunity to examine the user's internalFormat, format and type parameters and choose the appropriate texture format, such as _mesa_texformat_rgb565.
In the r200 driver, this is done in the r200ChooseTextureFormat() function. That function will only choose texture formats that are actually supported by the hardware. I think the function is pretty self-explanatory.
For the r300 driver you'd write a similar function, but the selection criteria can be anything you want. For example, you could test the <format> parameter for GL_UNSIGNED_INT_8_8_8_8 vs GL_UNSIGNED_INT_8_8_8_8_REV and either choose _mesa_texformat_rgba8888 or _mesa_texformat_rgba8888_rev.
Once you've chosen the texture format. Mesa will convert the incoming user texture image to the chosen destination format. Mesa can handle all possible (legal) conversions.
Not all the MESA_FORMAT_* texture formats are supported by all drivers.
I think that r300 could support all mesa's texture format :)
OK.
-Brian
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
