[Mesa3d-dev] [PATCH] gallium/docs: format texture formats into real table

2010-02-02 Thread Nathan Kidd

On 10-02-02 10:18 AM, Brian Paul wrote:

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.


The attached patch does so, though unfortunately the latex-pdf 
conversion[1] does a pretty bad job on the table.


-Nathan

[1] PAPER=letter make latex  make -C build/latex all-pdf  evince 
build/latex/Gallium.pdf
From e277a7186d85f85ee05caa969ba408b551ae6b5f Mon Sep 17 00:00:00 2001
From: Nathan Kidd nk...@opentext.com
Date: Tue, 2 Feb 2010 13:02:50 -0500
Subject: [PATCH] gallium/docs: format texture formats into real table

This looks marginally better than preformatted text,
but increases the pain involved to modify the table later:
A grid table must be used to span rows (Z row), grid table
cells must have whitespace around | delimiters, and all
rows must be kept in sync.  Thus, to add one extra character
to the Z:DX9 cell you would have to modify every line in the
table adding a space, -, or =, as needed.
---
 src/gallium/docs/source/tgsi.rst |   52 ++---
 1 files changed, 31 insertions(+), 21 deletions(-)

diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index 17fe76e..02f724d 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -1449,24 +1449,34 @@ Texture Sampling and Texture Formats
 
 This table shows how texture image components are returned as (x,y,z,w)
 tuples by TGSI texture instructions, such as TEX, TXD, and TXP.
-For reference, OpenGL and Direct3D convensions are shown as well::
-
-  Texture Components  Gallium   OpenGLDX9
-  -
-  R,G,B,A (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,B,1)
-  R,G tbd   (R,G,0,1) (R,G,1,1)
-  R   tbd   (R,0,0,1) (R,1,1,1)
-  A   (0,0,0,A) (0,0,0,A) (0,0,0,A)
-  L   (L,L,L,1) (L,L,L,1) (L,L,L,1)
-  LA  (L,L,L,A) (L,L,L,A) (L,L,L,A)
-  I   (I,I,I,I) (I,I,I,I) n/a
-  UV  tbd   (0,0,0,1)*(U,V,1,1)
-  Z   tbd   (Z,Z,Z,Z) or  (0,Z,0,1)
-(Z,Z,Z,1) or
-(0,0,0,Z)**
-
-  Footnotes:
-  * per http://www.opengl.org/registry/specs/ATI/envmap_bumpmap.txt
-  ** depends on GL_DEPTH_TEXTURE_MODE state
- 
\ No newline at end of file
+For reference, OpenGL and Direct3D convensions are shown as well.
+
++--+--++-+
+| Texture Components   | Gallium  | OpenGL | DX9 |
++==+==++=+
+| R,G,B,A  | (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,B,1)   |
++--+--++-+
+| R,G  | tbd  | (R,G,0,1)  | (R,G,1,1)   |
++--+--++-+
+| R| tbd  | (R,0,0,1)  | (R,1,1,1)   |
++--+--++-+
+| A| (0,0,0,A)| (0,0,0,A)  | (0,0,0,A)   |
++--+--++-+
+| L| (L,L,L,1)| (L,L,L,1)  | (L,L,L,1)   |
++--+--++-+
+| LA   | (L,L,L,A)| (L,L,L,A)  | (L,L,L,A)   |
++--+--++-+
+| I| (I,I,I,I)| (I,I,I,I)  | n/a |
++--+--++-+
+| UV   | tbd  | (0,0,0,1) [#]_ | (U,V,1,1)   |
++--+--++-+
+| Z| tbd  | | (Z,Z,Z,Z) or | (0,Z,0,1)   |
+|  |  | | (Z,Z,Z,1) or | |
+|  |  | | (0,0,0,Z) [#]_   | |
++--+--++-+
+
+ .. [#] per http://www.opengl.org/registry/specs/ATI/envmap_bumpmap.txt
+ .. [#] depends on GL_DEPTH_TEXTURE_MODE state
+ 
-- 
1.6.3.3

--
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 

Re: [Mesa3d-dev] [PATCH] gallium/docs: format texture formats into real table

2010-02-02 Thread Corbin Simpson
Great minds think alike, apparently: 516e7159aeb4

And yeah, the PDF output isn't the best; HTML looks a lot better:
http://people.freedesktop.org/~csimpson/gallium-docs/tgsi.html#texture-sampling-and-texture-formats

Thanks for the patch, sorry I beat you to it. :3

~ C.

On Tue, Feb 2, 2010 at 10:28 AM, Nathan Kidd nathan-...@spicycrypto.ca wrote:
 On 10-02-02 10:18 AM, Brian Paul wrote:

 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.

 The attached patch does so, though unfortunately the latex-pdf
 conversion[1] does a pretty bad job on the table.

 -Nathan

 [1] PAPER=letter make latex  make -C build/latex all-pdf  evince
 build/latex/Gallium.pdf

 --
 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





-- 
Only fools are easily impressed by what is only
barely beyond their reach. ~ Unknown

Corbin Simpson
mostawesomed...@gmail.com

--
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