To fully support geometry shaders, we need some means to declare a two-dimensional register file. The following declaration

DCL IN[3][0]

would declare an input register with index 0 (first dimension) and size 3 (second dimension). Since the second dimension is a size, not an index (or, for that matter, an index range), a new token has been added that specifies the declared size of the register.


Thanks.
diff --git a/src/gallium/include/pipe/p_shader_tokens.h 
b/src/gallium/include/pipe/p_shader_tokens.h
index 588ca5e..e5a723f 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -107,10 +107,11 @@ struct tgsi_declaration
    unsigned File        : 4;  /**< one of TGSI_FILE_x */
    unsigned UsageMask   : 4;  /**< bitmask of TGSI_WRITEMASK_x flags */
    unsigned Interpolate : 4;  /**< one of TGSI_INTERPOLATE_x */
+   unsigned Dimension   : 1;  /**< BOOL, any second dimension info? */
    unsigned Semantic    : 1;  /**< BOOL, any semantic info? */
    unsigned Centroid    : 1;  /**< centroid sampling? */
    unsigned Invariant   : 1;  /**< invariant optimization? */
-   unsigned Padding     : 5;
+   unsigned Padding     : 4;
 };
 
 struct tgsi_declaration_range
@@ -119,6 +120,12 @@ struct tgsi_declaration_range
    unsigned Last    : 16; /**< UINT */
 };
 
+struct tgsi_declaration_dimension
+{
+   unsigned Size2D  : 16;  /**< Size of the second dimension */
+   unsigned Padding : 16;
+};
+
 #define TGSI_SEMANTIC_POSITION 0
 #define TGSI_SEMANTIC_COLOR    1
 #define TGSI_SEMANTIC_BCOLOR   2 /**< back-face color */
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to