Roland Scheidegger wrote:
> On 01.02.2010 20:23, Brian Paul wrote:
>> Speaking of texture formats and texture sampling, one area of Gallium 
>> that's under-specified is what (x,y,z,w) values are returned by TEX 
>> instructions when sampling from each of the various texture formats.
>>
>> A while back I started a table comparing OpenGL to D3D:
>>
>>
>> texture components    OpenGL          D3D
>> -----------------------------------------------
>> R,G,B,A               (R,G,B,A)      (R,G,B,A)
>> R,G,B                 (R,G,B,1)      (R,G,B,1)
>> R,G                   (R,G,0,1)      (R,G,1,1)
>> R                     (R,0,0,1)      (R,1,1,1)
>> A                     (0,0,0,A)      (0,0,0,A)
>> L                     (L,L,L,1)      (L,?,?,1) (probably L,L,L,1)
>> I                     (I,I,I,I)      (?,?,?,?)
>> UV                    (0,0,0,1)*     (U,V,1,1)
>> Z                     (Z,Z,Z,Z) or   (0,Z,0,1)
>>                        (Z,Z,Z,1) or
>>                        (0,0,0,Z)**
>> other formats?        ...            ...
> AL. Should be (L,L,L,A) for both OGL And D3D. And yes, (L,L,L,1) is
> correct for D3D (that's what i965 at least does). There are no intensity
> textures in d3d (unless you can somehow support that via cap bits, but
> in that case I'd certainly expect it to be (I,I,I,I)).
> UV is of course really odd in OGL, since it says the sample result is
> constant but of course you still use the UV components for the bump
> target. That's just an oddity to make that fit somehow into fixed
> function pipeline rather than it has anything to do with hardware.
> 
> Note that the D3D column is only valid for DX9 (and older). DX10 uses
> the same mappings as OpenGL (if it supports the format, all luminance,
> alpha etc. textures are gone, as are the swizzled bgra formats).

I've added this table to the gallium docs, with the LA format.  Maybe 
someone else more familiar with Sphinx can fix up the formatting.

I've marked a few entries as 'tbd' where the OpenGL and DX9 convention 
differs.  Though, I believe we follow OpenGL conventions for those 
cases in the current drivers.

-Brian

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to