Mesa (master): gallium: add support for layered rendering

Roland Scheidegger sroland at kemper.freedesktop.org
Sat Jun 1 18:04:20 UTC 2013


Module: Mesa
Branch: master
Commit: 6b53e2b0380ce1617402217cb77d5670a44c3fb5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b53e2b0380ce1617402217cb77d5670a44c3fb5

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Sat Jun  1 20:02:17 2013 +0200

gallium: add support for layered rendering

Since pipe_surface already has all the necessary fields no interface
changes are necessary except adding a new shader semantic value
(TGSI_SEMANTIC_LAYER).
(Note that what GL knows as "gl_Layer" variable d3d10 is naming
"RENDER_TARGET_ARRAY_INDEX".)

v2: drop cap bit (just tied to geometry shader), add docs.

---

 src/gallium/docs/source/tgsi.rst           |   22 ++++++++++++++++++++--
 src/gallium/include/pipe/p_shader_tokens.h |    3 ++-
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index 3af1fb7..9265271 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -2400,14 +2400,32 @@ Edge flags are used to control which lines or points are actually
 drawn when the polygon mode converts triangles/quads/polygons into
 points or lines.
 
+
 TGSI_SEMANTIC_STENCIL
-""""""""""""""""""""""
+"""""""""""""""""""""
 
-For fragment shaders, this semantic label indicates than an output
+For fragment shaders, this semantic label indicates that an output
 is a writable stencil reference value. Only the Y component is writable.
 This allows the fragment shader to change the fragments stencilref value.
 
 
+TGSI_SEMANTIC_VIEWPORT_INDEX
+""""""""""""""""""""""""""""
+
+For geometry shaders, this semantic label indicates that an output
+contains the index of the viewport (and scissor) to use.
+Only the X value is used.
+
+
+TGSI_SEMANTIC_LAYER
+"""""""""""""""""""
+
+For geometry shaders, this semantic label indicates that an output
+contains the layer value to use for the color and depth/stencil surfaces.
+Only the X value is used. (Also known as rendertarget array index.)
+
+
+
 Declaration Interpolate
 ^^^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index b33cf1d..c984d50 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -165,7 +165,8 @@ struct tgsi_declaration_interp
 #define TGSI_SEMANTIC_TEXCOORD   19 /**< texture or sprite coordinates */
 #define TGSI_SEMANTIC_PCOORD     20 /**< point sprite coordinate */
 #define TGSI_SEMANTIC_VIEWPORT_INDEX 21 /**< viewport index */
-#define TGSI_SEMANTIC_COUNT      22 /**< number of semantic values */
+#define TGSI_SEMANTIC_LAYER      22 /**< layer (rendertarget index) */
+#define TGSI_SEMANTIC_COUNT      23 /**< number of semantic values */
 
 struct tgsi_declaration_semantic
 {




More information about the mesa-commit mailing list