This++. I've been scratching my head at some of these; having them specified
would be great.

Posting from a mobile, pardon my terseness. ~ C.

On Feb 1, 2010 11:25 AM, "Brian Paul" <bri...@vmware.com> 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?        ...            ...


* per http://www.opengl.org/registry/specs/ATI/envmap_bumpmap.txt
** depends on GL_DEPTH_TEXTURE_MODE state

For OpenGL, see page 141 of the OpenGL 3.1 spec.
For D3D, see http://msdn.microsoft.com/en-us/library/ee422472(VS.85).aspx


We should first add a column to the above table for Gallium and then
decide whether to implement swizzling (and GL_DEPTH_TEXTURE_MODE) with
extra GPU instructions or new texture/sampler swizzle state.

-Brian


------------------------------------------------------------------------------
The Planet: dedicate...
------------------------------------------------------------------------------
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